drm/radeon: Fix eDP for single-display iMac11,2
authorjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 04:23:40 +0000 (04:23 +0000)
committerjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 04:23:40 +0000 (04:23 +0000)
From Mark Hawrylak
8551ddbff0c3cd9e68a58649820754f471ca49a7 in linux-6.1.y/6.1.16
05eacc198c68cbb35a7281ce4011f8899ee1cfb8 in mainline linux

sys/dev/pci/drm/radeon/atombios_encoders.c

index c841c27..3e24fa1 100644 (file)
@@ -2122,11 +2122,12 @@ int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx)
 
        /*
         * On DCE32 any encoder can drive any block so usually just use crtc id,
-        * but Apple thinks different at least on iMac10,1, so there use linkb,
+        * but Apple thinks different at least on iMac10,1 and iMac11,2, so there use linkb,
         * otherwise the internal eDP panel will stay dark.
         */
        if (ASIC_IS_DCE32(rdev)) {
-               if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
+               if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
+                   dmi_match(DMI_PRODUCT_NAME, "iMac11,2"))
                        enc_idx = (dig->linkb) ? 1 : 0;
                else
                        enc_idx = radeon_crtc->crtc_id;