[PATCH 26/36] drm/omap: fix plane update warning when crtc is disabled

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Nov 30 11:17:28 UTC 2016


If omap_plane_atomic_update() is called when the crtc is disabled, and
the timings are zero, we'll see the following warning:

omapdss DISPC error: cannot calculate scaling settings: pclk is zero
omapdrm omapdrm.0: Failed to setup plane vid2

It shouldn't cause any issues, as the crtc is disabled so the plane is
not used by the HW.

To remove the warning, check whether the crtc is enabled at the
beginning of omap_plane_atomic_update(), and bail out if not.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
---
 drivers/gpu/drm/omapdrm/omap_plane.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 278d079b77da..b3e55496d180 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -88,6 +88,11 @@ static void omap_plane_atomic_update(struct drm_plane *plane,
 
 	DBG("%s, crtc=%p fb=%p", omap_plane->name, state->crtc, state->fb);
 
+	if (!state->crtc->state->enable) {
+		priv->dispc_ops->ovl_enable(omap_plane->id, false);
+		return;
+	}
+
 	memset(&info, 0, sizeof(info));
 	info.rotation_type = OMAP_DSS_ROT_DMA;
 	info.rotation = OMAP_DSS_ROT_0;
-- 
2.7.4



More information about the dri-devel mailing list