Message ID | 1433408582-9828-41-git-send-email-tomi.valkeinen@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Tomi, Thank you for the patch. On Thursday 04 June 2015 12:02:57 Tomi Valkeinen wrote: > omap_plane_atomic_update() calls dispc_ovl_setup(), which can fail (but > shouldn't). To make the code a bit more robust, make sure the plane gets > disabled if dispc_ovl_setup() fails, as otherwise we might get illegal > HW configuration leading to error interrupts. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/omapdrm/omap_plane.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c > b/drivers/gpu/drm/omapdrm/omap_plane.c index b13fb2fd4a9a..cfa8276c4deb > 100644 > --- a/drivers/gpu/drm/omapdrm/omap_plane.c > +++ b/drivers/gpu/drm/omapdrm/omap_plane.c > @@ -132,8 +132,10 @@ static void omap_plane_atomic_update(struct drm_plane > *plane, /* and finally, update omapdss: */ > ret = dispc_ovl_setup(omap_plane->id, &info, false, > omap_crtc_timings(state->crtc), false); > - if (WARN_ON(ret)) > + if (WARN_ON(ret)) { > + dispc_ovl_enable(omap_plane->id, false); > return; > + } > > dispc_ovl_enable(omap_plane->id, true); > }
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index b13fb2fd4a9a..cfa8276c4deb 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -132,8 +132,10 @@ static void omap_plane_atomic_update(struct drm_plane *plane, /* and finally, update omapdss: */ ret = dispc_ovl_setup(omap_plane->id, &info, false, omap_crtc_timings(state->crtc), false); - if (WARN_ON(ret)) + if (WARN_ON(ret)) { + dispc_ovl_enable(omap_plane->id, false); return; + } dispc_ovl_enable(omap_plane->id, true); }
omap_plane_atomic_update() calls dispc_ovl_setup(), which can fail (but shouldn't). To make the code a bit more robust, make sure the plane gets disabled if dispc_ovl_setup() fails, as otherwise we might get illegal HW configuration leading to error interrupts. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/omapdrm/omap_plane.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)