aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-09-17 22:59:17 +0200
committerHans de Goede <hdegoede@redhat.com>2022-09-18 21:03:06 +0200
commitdec4ddbe1d4a4414092309611cc97e6b9dc7ec3f (patch)
tree64d92f1d3609301a5f17a1a4bef328ff61324c09
parentdrm/gma500: Refactor backlight support (v2) (diff)
downloadlinux-dev-dec4ddbe1d4a4414092309611cc97e6b9dc7ec3f.tar.xz
linux-dev-dec4ddbe1d4a4414092309611cc97e6b9dc7ec3f.zip
drm/gma500: Change registered backlight device type to raw/native
Change the type for the registered backlight class device from platform to raw/native. The poulsbo/cedarview/oaktrail backlight support is using native GPU backlight control and as such the type should be raw (aka native) as is done by all the other native GPU backlight driver code. Note this will not change much from userspace's point of view. poulsbo/cedarview laptops typically offer both an ACPI-video backlight interface as well as the native GPU backlight interface. The /sys/class/backlight/acpi_video0 has a type of firmware and userspace typically looks for firmware devices before looking for platform devices. The typical standard lookup order is: firmware -> platform -> raw This means that both before and after this change typical userspace backlight consumers (sich as e.g. GNOME) will prefer the firmware acpi_video0 backlight device. This has been tested on a Packard Bell Dot SC (Intel Atom N2600, cedarview) and a Sony Vaio vpc-x11s1e (Intel N540, poulsbo) laptop. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-3-hdegoede@redhat.com
-rw-r--r--drivers/gpu/drm/gma500/backlight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/gma500/backlight.c b/drivers/gpu/drm/gma500/backlight.c
index b804325eb64a..5a40414e5748 100644
--- a/drivers/gpu/drm/gma500/backlight.c
+++ b/drivers/gpu/drm/gma500/backlight.c
@@ -83,7 +83,7 @@ int gma_backlight_init(struct drm_device *dev)
#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
props.brightness = dev_priv->backlight_level;
props.max_brightness = PSB_MAX_BRIGHTNESS;
- props.type = BACKLIGHT_PLATFORM;
+ props.type = BACKLIGHT_RAW;
dev_priv->backlight_device =
backlight_device_register(dev_priv->ops->backlight_name,