Skip to content

Commit 3fdf847

Browse files
yueshuck_zhang
authored andcommitted
drm/edid: Hack for some acer screen
Change-Id: I3bdd76dff3fa29d52a3c1df6273b8c3cd839d3dd Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
1 parent ead20c6 commit 3fdf847

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

drivers/gpu/drm/drm_edid.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,12 +1014,6 @@ static const struct drm_display_mode edid_4k_modes[] = {
10141014
2160, 2168, 2178, 2250, 0,
10151015
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
10161016
.vrefresh = 24, },
1017-
/* 5 - 3840x2160@50Hz */
1018-
{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000,
1019-
3840, 4896, 4984, 5280, 0,
1020-
2160, 2168, 2178, 2250, 0,
1021-
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
1022-
.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
10231017
/* 6 - 3840x2160@60Hz */
10241018
{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000,
10251019
3840, 4016, 4104, 4400, 0,
@@ -2644,6 +2638,13 @@ static u8 drm_match_hdmi_mode(const struct drm_display_mode *to_match)
26442638
clock1 = hdmi_mode->clock;
26452639
clock2 = hdmi_mode_alternate_clock(hdmi_mode);
26462640

2641+
/* Hack For Acer Screen */
2642+
if(to_match->hdisplay == 3840 && to_match->hsync_start == 3888 &&
2643+
to_match->hsync_end == 3920 && to_match->htotal == 4000 &&
2644+
to_match->vsync_start ==2163 && to_match->vsync_end == 2168 &&
2645+
to_match->vtotal == 2222){
2646+
return 5;
2647+
}
26472648
if ((KHZ2PICOS(to_match->clock) == KHZ2PICOS(clock1) ||
26482649
KHZ2PICOS(to_match->clock) == KHZ2PICOS(clock2)) &&
26492650
drm_mode_equal_no_clocks_no_stereo(to_match, hdmi_mode))

0 commit comments

Comments
 (0)