]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/radeon: Fix backlight control on iMac 12,1
authorNicholas Bishop <nicholasbishop@google.com>
Fri, 11 Feb 2022 19:57:39 +0000 (14:57 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 Apr 2022 09:32:18 +0000 (11:32 +0200)
BugLink: https://bugs.launchpad.net/bugs/1967582
commit 364438fd629f7611a84c8e6d7de91659300f1502 upstream.

The iMac 12,1 does not use the gmux driver for backlight, so the radeon
backlight device is needed to set the brightness.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1838
Signed-off-by: Nicholas Bishop <nicholasbishop@google.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/radeon/atombios_encoders.c

index cc8f32a1b03c678690d59dfdd0f6adccb8cca44c..92ffed5c1d6906210706681f92e0e4d96695bc24 100644 (file)
@@ -197,7 +197,8 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
         * so don't register a backlight device
         */
        if ((rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) &&
-           (rdev->pdev->device == 0x6741))
+           (rdev->pdev->device == 0x6741) &&
+           !dmi_match(DMI_PRODUCT_NAME, "iMac12,1"))
                return;
 
        if (!radeon_encoder->enc_priv)