Skip to content

Commit 6292b8e

Browse files
committed
drm/edid: Fix off-by-one in DispID DTD pixel clock
The DispID DTD pixel clock is documented as: "00 00 00 h → FF FF FF h | Pixel clock ÷ 10,000 0.01 → 167,772.16 Mega Pixels per Sec" Which seems to imply that we to add one to the raw value. Reality seems to agree as there are tiled displays in the wild which currently show a 10kHz difference in the pixel clock between the tiles (one tile gets its mode from the base EDID, the other from the DispID block). Cc: [email protected] References: https://gitlab.freedesktop.org/drm/intel/-/issues/27 Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Manasi Navare <[email protected]>
1 parent 9da6743 commit 6292b8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_edid.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5111,7 +5111,7 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d
51115111
struct drm_display_mode *mode;
51125112
unsigned pixel_clock = (timings->pixel_clock[0] |
51135113
(timings->pixel_clock[1] << 8) |
5114-
(timings->pixel_clock[2] << 16));
5114+
(timings->pixel_clock[2] << 16)) + 1;
51155115
unsigned hactive = (timings->hactive[0] | timings->hactive[1] << 8) + 1;
51165116
unsigned hblank = (timings->hblank[0] | timings->hblank[1] << 8) + 1;
51175117
unsigned hsync = (timings->hsync[0] | (timings->hsync[1] & 0x7f) << 8) + 1;

0 commit comments

Comments
 (0)