All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/edid: Fix off-by-one in DispID DTD pixel clock
@ 2020-04-23 15:17 ` Ville Syrjala
  0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjala @ 2020-04-23 15:17 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, stable

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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: stable@vger.kernel.org
References: https://gitlab.freedesktop.org/drm/intel/-/issues/27
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 43b6ca364daa..544d2603f5fc 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -5120,7 +5120,7 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d
 	struct drm_display_mode *mode;
 	unsigned pixel_clock = (timings->pixel_clock[0] |
 				(timings->pixel_clock[1] << 8) |
-				(timings->pixel_clock[2] << 16));
+				(timings->pixel_clock[2] << 16)) + 1;
 	unsigned hactive = (timings->hactive[0] | timings->hactive[1] << 8) + 1;
 	unsigned hblank = (timings->hblank[0] | timings->hblank[1] << 8) + 1;
 	unsigned hsync = (timings->hsync[0] | (timings->hsync[1] & 0x7f) << 8) + 1;
-- 
2.24.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-04-26 15:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 15:17 [PATCH] drm/edid: Fix off-by-one in DispID DTD pixel clock Ville Syrjala
2020-04-23 15:17 ` Ville Syrjala
2020-04-23 15:17 ` [Intel-gfx] " Ville Syrjala
2020-04-23 15:28 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-04-23 15:53 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-04-23 18:45 ` [Intel-gfx] [PATCH] " Manasi Navare
2020-04-23 18:45   ` Manasi Navare
2020-04-23 18:45   ` Manasi Navare
2020-04-23 21:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-23 22:19 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-04-26 15:03 ` [PATCH] " Sasha Levin
2020-04-26 15:03   ` [Intel-gfx] " Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.