mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 14:56:53 +02:00
All three patches are merged (but not yet released) upstream. See:f53b127ca9
.patch See:7853cbfc28
.patch See:e0605c9cdf
.patch
54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
From 7853cbfc28bc62e87db79f612568b25315397dd0 Mon Sep 17 00:00:00 2001
|
|
From: Kamila Wojciechowska <nullbytepl@gmail.com>
|
|
Date: Mon, 29 Jul 2024 21:23:29 +0200
|
|
Subject: [PATCH] Adjust to backlight changes in Linux 6.10
|
|
Patch-Source: https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/-/commit/7853cbfc28bc62e87db79f612568b25315397dd0.patch
|
|
|
|
Reference: https://lore.kernel.org/all/20240305162425.23845-11-tzimmermann@suse.de/
|
|
---
|
|
ddcci-backlight/ddcci-backlight.c | 14 ++++++++++++++
|
|
1 file changed, 14 insertions(+)
|
|
|
|
diff --git a/ddcci-backlight/ddcci-backlight.c b/ddcci-backlight/ddcci-backlight.c
|
|
index 9439b24..40dc9f8 100644
|
|
--- a/ddcci-backlight/ddcci-backlight.c
|
|
+++ b/ddcci-backlight/ddcci-backlight.c
|
|
@@ -88,6 +88,15 @@ static int ddcci_monitor_readctrl(struct ddcci_device *device,
|
|
return -EIO;
|
|
}
|
|
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
|
|
+static bool ddcci_backlight_controls_device(struct backlight_device *bl,
|
|
+ struct device *display_dev)
|
|
+{
|
|
+ struct ddcci_monitor_drv_data *drv_data = bl_get_data(bl);
|
|
+
|
|
+ return drv_data->fb_dev == NULL || drv_data->fb_dev == display_dev;
|
|
+}
|
|
+#else
|
|
static int ddcci_backlight_check_fb(struct backlight_device *bl,
|
|
struct fb_info *info)
|
|
{
|
|
@@ -95,6 +104,7 @@ static int ddcci_backlight_check_fb(struct backlight_device *bl,
|
|
|
|
return drv_data->fb_dev == NULL || drv_data->fb_dev == info->dev;
|
|
}
|
|
+#endif
|
|
|
|
static int ddcci_backlight_update_status(struct backlight_device *bl)
|
|
{
|
|
@@ -135,7 +145,11 @@ static const struct backlight_ops ddcci_backlight_ops = {
|
|
.options = 0,
|
|
.update_status = ddcci_backlight_update_status,
|
|
.get_brightness = ddcci_backlight_get_brightness,
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
|
|
+ .controls_device = ddcci_backlight_controls_device,
|
|
+#else
|
|
.check_fb = ddcci_backlight_check_fb,
|
|
+#endif
|
|
};
|
|
|
|
static const char *ddcci_monitor_vcp_name(unsigned char vcp)
|
|
--
|
|
GitLab
|
|
|