[PATCHv2 43/45] drm: omapdrm: don't wait in crtc_atomic_flush

Tomi Valkeinen tomi.valkeinen at ti.com
Thu Jun 4 02:03:00 PDT 2015


omap_crtc_atomic_flush() sets the GO bit and waits for it to get unset,
which tells us the HW has taken the new configuration into use.

This is unnecessary as omap_atomic_complete() waits for all the GO bits
to get unset. In fact, waiting is wrong, as with multiple CRTCs we would
not get the the changes to all the CRTCs as soon as possible, but only
one after another.

This patch removes the wait.

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

diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 8f905d2c8074..2ec34dc0c66c 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -17,8 +17,6 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/completion.h>
-
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
@@ -52,8 +50,6 @@ struct omap_crtc {
 	/* pending event */
 	struct drm_pending_vblank_event *event;
 
-	struct completion completion;
-
 	bool ignore_digit_sync_lost;
 };
 
@@ -317,8 +313,6 @@ static void omap_crtc_vblank_irq(struct omap_drm_irq *irq, uint32_t irqstatus)
 
 	/* wakeup userspace */
 	omap_crtc_complete_page_flip(&omap_crtc->base);
-
-	complete(&omap_crtc->completion);
 }
 
 static int omap_crtc_flush(struct drm_crtc *crtc)
@@ -332,10 +326,6 @@ static int omap_crtc_flush(struct drm_crtc *crtc)
 	if (dispc_mgr_is_enabled(omap_crtc->channel)) {
 		dispc_mgr_go(omap_crtc->channel);
 		omap_irq_register(crtc->dev, &omap_crtc->vblank_irq);
-
-		WARN_ON(!wait_for_completion_timeout(&omap_crtc->completion,
-						     msecs_to_jiffies(100)));
-		reinit_completion(&omap_crtc->completion);
 	}
 
 	return 0;
@@ -517,8 +507,6 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
 
 	crtc = &omap_crtc->base;
 
-	init_completion(&omap_crtc->completion);
-
 	omap_crtc->channel = channel;
 	omap_crtc->name = channel_names[channel];
 
-- 
2.1.4



More information about the dri-devel mailing list