Skip to contentSkip to conversation

drm/radeon: enable native backlight control on old macs

PATCH Applied Nathan-J. Hirschauer 2 participants 2 messages Feb 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 27 lines · Alex Deucher

Commit b7bc596ebbe0cddc97d76ef9309f64471bbf13eb accidently broke backlight control on old mac laptops that use the on-GPU backlight controller.

Reported by nathanhi on IRC.

Signed-off-by Alex Deucher <alexander.deucher at amd.com>
Cc stable at vger.kernel.org
---
 drivers/gpu/drm/radeon/radeon_encoders.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_encoders.c +3 -1
index 6b670b0..275ed45 100644
@@ -179,6 +179,9 @@ static void radeon_encoder_add_backlight(struct radeon_encoder *radeon_encoder,
             (rdev->pdev->subsystem_vendor == 0x1734) &&
             (rdev->pdev->subsystem_device == 0x1107))
             use_bl = false;
+        /* enable native backlight control on apple */
+        else if (rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE)
+            use_bl = true;
         /* disable native backlight control on older asics */
         else if (rdev->family < CHIP_R600)
             use_bl = false;
--
Quoted 1 line

1.8.3.1

Hi,
thanks for your patch. I've tested it but it didn't won't work as the graphics chip is (unfortunately) detected with PCI_VENDOR_ID_ATI instead of PCI_VENDOR_ID_APPLE. I therefore propose the following patch:

Commit b7bc596ebbe0 ("drm/radeon: disable native backlight control on pre-r6xx asics (v2)") accidently broke backlight control on old mac laptops that use the on-GPU backlight controller.

---
 drivers/gpu/drm/radeon/radeon_encoders.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_encoders.c +3 -0
index 6b670b0..3a29703 100644
@@ -179,9 +179,12 @@ static void radeon_encoder_add_backlight(struct radeon_encoder *radeon_encoder,
             (rdev->pdev->subsystem_vendor == 0x1734) &&
             (rdev->pdev->subsystem_device == 0x1107))
             use_bl = false;
+/* Older PPC macs use on-GPU backlight controller */
+#ifndef CONFIG_PPC_PMAC
         /* disable native backlight control on older asics */
         else if (rdev->family < CHIP_R600)
             use_bl = false;
+#endif
         else
             use_bl = true;
     }
Signature · 9 lines
2.1.4

BR,
Nathan

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#1 lore raw
Quoted 38 lines · Nathan-J. Hirschauer
Quoted 28 lines · Alex Deucher

Commit b7bc596ebbe0cddc97d76ef9309f64471bbf13eb accidently broke backlight control on old mac laptops that use the on-GPU backlight controller.

Reported by nathanhi on IRC.

Signed-off-by Alex Deucher <alexander.deucher at amd.com>
Cc stable at vger.kernel.org
---
 drivers/gpu/drm/radeon/radeon_encoders.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_encoders.c +3 -0
index 6b670b0..275ed45 100644
@@ -179,6 +179,9 @@ static void radeon_encoder_add_backlight(struct
 radeon_encoder *radeon_encoder,
             (rdev->pdev->subsystem_vendor == 0x1734) &&
             (rdev->pdev->subsystem_device == 0x1107))
             use_bl = false;
+        /* enable native backlight control on apple */
+        else if (rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE)
+            use_bl = true;
         /* disable native backlight control on older asics */
         else if (rdev->family < CHIP_R600)
             use_bl = false;
Quoted 2 lines

--
1.8.3.1

Hi,
thanks for your patch. I've tested it but it didn't won't work as the graphics chip is (unfortunately) detected with PCI_VENDOR_ID_ATI instead of PCI_VENDOR_ID_APPLE. I therefore propose the following patch:

Quoted 6 lines

Commit b7bc596ebbe0 ("drm/radeon: disable native backlight control on pre-r6xx asics (v2)") accidently broke backlight control on old mac laptops that use the on-GPU backlight controller.

Applied. thanks!

Alex

Quoted 26 lines
---
 drivers/gpu/drm/radeon/radeon_encoders.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_encoders.c +3 -0
index 6b670b0..3a29703 100644
@@ -179,9 +179,12 @@ static void radeon_encoder_add_backlight(struct
 radeon_encoder *radeon_encoder,
             (rdev->pdev->subsystem_vendor == 0x1734) &&
             (rdev->pdev->subsystem_device == 0x1107))
             use_bl = false;
+/* Older PPC macs use on-GPU backlight controller */
+#ifndef CONFIG_PPC_PMAC
         /* disable native backlight control on older asics */
         else if (rdev->family < CHIP_R600)
             use_bl = false;
+#endif
         else
             use_bl = true;
     }

--
2.1.4

Quoted 7 lines

BR,
Nathan

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel