Message ID | 1455875288-4370-19-git-send-email-tomi.valkeinen@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Tomi, Thank you for the patch. On Friday 19 February 2016 11:47:53 Tomi Valkeinen wrote: > omap_crtc_wait_pending() waits until the config changes have been taken > into use, usually at next vblank. The wait-timeout used is 50ms, which > usually is enough, but in some rare cases not. > > As time wait-timeout is just a safety measure for cases where something > is broken, we can just as well increase the timeout considerably. Would it make sense to capture this in a comment in the code ? Apart from that, Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > This patch makes the timeout 250ms. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > --- > drivers/gpu/drm/omapdrm/omap_crtc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c > b/drivers/gpu/drm/omapdrm/omap_crtc.c index f5b19d18fa8b..86b77c4f299a > 100644 > --- a/drivers/gpu/drm/omapdrm/omap_crtc.c > +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c > @@ -82,7 +82,7 @@ int omap_crtc_wait_pending(struct drm_crtc *crtc) > > return wait_event_timeout(omap_crtc->pending_wait, > !omap_crtc->pending, > - msecs_to_jiffies(50)); > + msecs_to_jiffies(250)); > } > > /* > --------------------------------------------------------------------------- > --
On 24/02/16 00:43, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Friday 19 February 2016 11:47:53 Tomi Valkeinen wrote: >> omap_crtc_wait_pending() waits until the config changes have been taken >> into use, usually at next vblank. The wait-timeout used is 50ms, which >> usually is enough, but in some rare cases not. >> >> As time wait-timeout is just a safety measure for cases where something >> is broken, we can just as well increase the timeout considerably. > > Would it make sense to capture this in a comment in the code ? > > Apart from that, > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> I added a comment: /* * timeout is set to a "sufficiently" high value, which should cover * a single frame refresh even on slower displays. */ Tomi
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index f5b19d18fa8b..86b77c4f299a 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -82,7 +82,7 @@ int omap_crtc_wait_pending(struct drm_crtc *crtc) return wait_event_timeout(omap_crtc->pending_wait, !omap_crtc->pending, - msecs_to_jiffies(50)); + msecs_to_jiffies(250)); } /* -----------------------------------------------------------------------------
omap_crtc_wait_pending() waits until the config changes have been taken into use, usually at next vblank. The wait-timeout used is 50ms, which usually is enough, but in some rare cases not. As time wait-timeout is just a safety measure for cases where something is broken, we can just as well increase the timeout considerably. This patch makes the timeout 250ms. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/omapdrm/omap_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)