[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170615204130.19255-5-eric@anholt.net>
Date: Thu, 15 Jun 2017 13:41:27 -0700
From: Eric Anholt <eric@...olt.net>
To: dri-devel@...ts.freedesktop.org,
Archit Taneja <architt@...eaurora.org>,
Andrzej Hajda <a.hajda@...sung.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Thierry Reding <thierry.reding@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Eric Anholt <eric@...olt.net>
Subject: [PATCH 4/7] drm/vc4: Use drm_mode_vrefresh() in DSI fixup, in case vrefresh is 0.
I'm not sure what changed where I started getting vrefresh=0 from the
mode to be fixed up.
Signed-off-by: Eric Anholt <eric@...olt.net>
---
drivers/gpu/drm/vc4/vc4_dsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
index 629d372633e6..fca4d7fd677e 100644
--- a/drivers/gpu/drm/vc4/vc4_dsi.c
+++ b/drivers/gpu/drm/vc4/vc4_dsi.c
@@ -866,7 +866,9 @@ static bool vc4_dsi_encoder_mode_fixup(struct drm_encoder *encoder,
adjusted_mode->clock = pixel_clock_hz / 1000 + 1;
/* Given the new pixel clock, adjust HFP to keep vrefresh the same. */
- adjusted_mode->htotal = pixel_clock_hz / (mode->vrefresh * mode->vtotal);
+ adjusted_mode->htotal = pixel_clock_hz / (drm_mode_vrefresh(mode) *
+ mode->vtotal);
+
adjusted_mode->hsync_end += adjusted_mode->htotal - mode->htotal;
adjusted_mode->hsync_start += adjusted_mode->htotal - mode->htotal;
--
2.11.0
Powered by blists - more mailing lists