aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2016-09-06 15:55:33 -0400
committerJyri Sarha <jsarha@ti.com>2016-09-07 08:54:41 -0400
commit4e910c7a1860bbc22d06da2f62010ab20a19834f (patch)
treec19a0b21f5c8bb4eb59485cb55858ac41a018169 /drivers/gpu/drm/tilcdc
parent642e51677d29c9f21891b571be4473ec482acaf0 (diff)
drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup()
Flush flip-work workqueue before drm_flip_work_cleanup(). It causes a nasty warning if there is unfinished flip-work in the queue when drm_flip_work_cleanup() is called. The flush_workqueue() has to be called before drm_crtc_cleanup() for unref_worker() to be able to do its job. Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_crtc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 5579d97b08e6..41ce411a64f9 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -18,6 +18,7 @@
18#include "drm_flip_work.h" 18#include "drm_flip_work.h"
19#include <drm/drm_plane_helper.h> 19#include <drm/drm_plane_helper.h>
20#include <drm/drm_atomic_helper.h> 20#include <drm/drm_atomic_helper.h>
21#include <linux/workqueue.h>
21 22
22#include "tilcdc_drv.h" 23#include "tilcdc_drv.h"
23#include "tilcdc_regs.h" 24#include "tilcdc_regs.h"
@@ -227,9 +228,12 @@ static bool tilcdc_crtc_is_on(struct drm_crtc *crtc)
227static void tilcdc_crtc_destroy(struct drm_crtc *crtc) 228static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
228{ 229{
229 struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc); 230 struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
231 struct tilcdc_drm_private *priv = crtc->dev->dev_private;
230 232
231 tilcdc_crtc_disable(crtc); 233 tilcdc_crtc_disable(crtc);
232 234
235 flush_workqueue(priv->wq);
236
233 of_node_put(crtc->port); 237 of_node_put(crtc->port);
234 drm_crtc_cleanup(crtc); 238 drm_crtc_cleanup(crtc);
235 drm_flip_work_cleanup(&tilcdc_crtc->unref_work); 239 drm_flip_work_cleanup(&tilcdc_crtc->unref_work);