[PATCH v3 3/5] drm/gma500: Use backlight_get_brightness() to get the brightness
Hans de Goede
hdegoede at redhat.com
Sat Sep 17 20:59:18 UTC 2022
Use backlight_get_brightness() instead of directly referencing
bd->props.brightness. This will take backlight_is_blank() into account,
properly setting brightness to 0 when screen-blanking has been requested
through the backlight sysfs interface.
Suggested-by: Sam Ravnborg <sam at ravnborg.org>
Acked-by: Sam Ravnborg <sam at ravnborg.org>
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
Changes in v2 of the patch-set:
- New patch in v2 of the patch-set
---
drivers/gpu/drm/gma500/backlight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/gma500/backlight.c b/drivers/gpu/drm/gma500/backlight.c
index 5a40414e5748..e85fd181f2f3 100644
--- a/drivers/gpu/drm/gma500/backlight.c
+++ b/drivers/gpu/drm/gma500/backlight.c
@@ -52,7 +52,7 @@ static int gma_backlight_get_brightness(struct backlight_device *bd)
static int gma_backlight_update_status(struct backlight_device *bd)
{
struct drm_device *dev = bl_get_data(bd);
- int level = bd->props.brightness;
+ int level = backlight_get_brightness(bd);
/* Percentage 1-100% being valid */
if (level < 1)
--
2.37.3
More information about the dri-devel
mailing list