Skip to content

Commit 89308cb

Browse files
kleinermgregkh
authored andcommitted
drm/radeon: Fix eDP for single-display iMac10,1 (v2)
commit 564d8a2 upstream. The late 2009, 27 inch Apple iMac10,1 has an internal eDP display and an external Mini- Displayport output, driven by a DCE-3.2, RV730 Radeon Mobility HD-4670. The machine worked fine in a dual-display setup with eDP panel + externally connected HDMI or DVI-D digital display sink, connected via MiniDP to DVI or HDMI adapter. However, booting the machine single-display with only eDP panel results in a completely black display - even backlight powering off, as soon as the radeon modesetting driver loads. This patch fixes the single dispay eDP case by assigning encoders based on dig->linkb, similar to DCE-4+. While this should not be generally necessary (Alex: "...atom on normal boards should be able to handle any mapping."), Apple seems to use some special routing here. One remaining problem not solved by this patch is that an external Minidisplayport->DP sink does still not work on iMac10,1, whereas external DVI and HDMI sinks continue to work. The problem affects at least all tested kernels since Linux 3.13 - didn't test earlier kernels, so backporting to stable probably makes sense. v2: With the original patch from 2016, Alex was worried it will break other DCE3.2 systems. Use dmi_match() to apply this special encoder assignment only for the Apple iMac 10,1 from late 2009. Signed-off-by: Mario Kleiner <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0157e2a commit 89308cb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/gpu/drm/radeon/atombios_encoders.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "radeon_audio.h"
3131
#include "atom.h"
3232
#include <linux/backlight.h>
33+
#include <linux/dmi.h>
3334

3435
extern int atom_debug;
3536

@@ -2183,9 +2184,17 @@ int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx)
21832184
goto assigned;
21842185
}
21852186

2186-
/* on DCE32 and encoder can driver any block so just crtc id */
2187+
/*
2188+
* On DCE32 any encoder can drive any block so usually just use crtc id,
2189+
* but Apple thinks different at least on iMac10,1, so there use linkb,
2190+
* otherwise the internal eDP panel will stay dark.
2191+
*/
21872192
if (ASIC_IS_DCE32(rdev)) {
2188-
enc_idx = radeon_crtc->crtc_id;
2193+
if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
2194+
enc_idx = (dig->linkb) ? 1 : 0;
2195+
else
2196+
enc_idx = radeon_crtc->crtc_id;
2197+
21892198
goto assigned;
21902199
}
21912200

0 commit comments

Comments
 (0)