drm/radeon: restore backlight level on resume
Restore the backlight level on resume. Some systems
need to explicitly restore the backlight level on
resume.
Fixes panel resume on my Trinity laptop and may fix the
following bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=43829
https://bugzilla.kernel.org/show_bug.cgi?id=46241
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 5ce13b8fb..806cbcc 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -32,8 +32,6 @@
extern int atom_debug;
-#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
-
static u8
radeon_atom_get_backlight_level_from_reg(struct radeon_device *rdev)
{
@@ -134,6 +132,8 @@
}
}
+#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
+
static u8 radeon_atom_bl_level(struct backlight_device *bd)
{
u8 level;