[PATCHv2 10/17] drm/omap: fix WBDELAYCOUNT for HDMI

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Feb 28 11:26:07 UTC 2018


For HDMI, WBDELAYCOUNT starts counting at the start of vsync, not at the
start of vfp.

This patch adjusts the wbdelay for HDMI accordingly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
---
 drivers/gpu/drm/omapdrm/dss/dispc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index ccfafce1ea89..7398039954a5 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -2816,8 +2816,12 @@ int dispc_wb_setup(struct dispc_device *dispc,
 	} else {
 		int wbdelay;
 
-		wbdelay = min(vm->vfront_porch +
-			      vm->vsync_len + vm->vback_porch, (u32)255);
+		if (channel_in == DSS_WB_TV_MGR)
+			wbdelay = min(vm->vsync_len + vm->vback_porch,
+				(u32)255);
+		else
+			wbdelay = min(vm->vfront_porch +
+				vm->vsync_len + vm->vback_porch, (u32)255);
 
 		/* WBDELAYCOUNT */
 		REG_FLD_MOD(dispc, DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



More information about the dri-devel mailing list