summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/atombios_encoders.c
diff options
context:
space:
mode:
authorKendall Smith <kendallsm2@icloud.com>2024-05-15 21:20:09 +0200
committerAlex Deucher <alexander.deucher@amd.com>2024-05-17 23:40:38 +0200
commit347eccc4053f0a34e564dd98b029808f365ee479 (patch)
treea510668320a5a2dfbf0e0f779de0bc63222aa7fe /drivers/gpu/drm/radeon/atombios_encoders.c
parentdrm/amd/pm: support pp_dpm_pcie on smu v14.0.2/3 (diff)
downloadlinux-347eccc4053f0a34e564dd98b029808f365ee479.tar.xz
linux-347eccc4053f0a34e564dd98b029808f365ee479.zip
drm/radeon: initialize backlight for iMac12,2 with Radeon 6750M
If a Radeon 6750M GPU from an iMac12,1 is installed into an iMac 12,2, there is no backlight device initialized during boot. Everything else is functional, but the display brightness cannot be controlled. There are no directories present in /sys/class/backlight after booting. A simple one line modification to an if statement fixes this issue by initializing the radeon backlight device for an iMac12,2 as well if it has a 6750M. After the patch, brightness can be controlled and radeon_bl0 is present in /sys/class/backlight. This was tested by compiling the latest kernel with and without the patch. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3378 Signed-off-by: Kendall Smith <kendallsm2@icloud.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_encoders.c')
-rw-r--r--drivers/gpu/drm/radeon/atombios_encoders.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 2bff0d9e20f5..7b11674f5d45 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -201,7 +201,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
*/
if ((rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) &&
(rdev->pdev->device == 0x6741) &&
- !dmi_match(DMI_PRODUCT_NAME, "iMac12,1"))
+ !(dmi_match(DMI_PRODUCT_NAME, "iMac12,1") || dmi_match(DMI_PRODUCT_NAME, "iMac12,2")))
return;
if (!radeon_encoder->enc_priv)