drm: omapdrm: Fix race condition between GO and vblank IRQ
The vblank interrupt is used by the driver as a completion signal when applying new settings. A race condition exist between enabling the vblank interrupt and applying new settings to the hardware by setting the GO bit. If a vblank interrupt occurs in-between, the driver will incorrectly consider the new settings to be applied. Fix this by enabling the interrupt after setting the GO bit. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
82e58855bc
commit
5dbe443368
|
@ -501,8 +501,8 @@ static void apply_worker(struct work_struct *work)
|
||||||
DBG("%s: GO", omap_crtc->name);
|
DBG("%s: GO", omap_crtc->name);
|
||||||
|
|
||||||
if (dispc_mgr_is_enabled(channel)) {
|
if (dispc_mgr_is_enabled(channel)) {
|
||||||
omap_irq_register(dev, &omap_crtc->apply_irq);
|
|
||||||
dispc_mgr_go(channel);
|
dispc_mgr_go(channel);
|
||||||
|
omap_irq_register(dev, &omap_crtc->apply_irq);
|
||||||
} else {
|
} else {
|
||||||
struct omap_drm_private *priv = dev->dev_private;
|
struct omap_drm_private *priv = dev->dev_private;
|
||||||
queue_work(priv->wq, &omap_crtc->apply_work);
|
queue_work(priv->wq, &omap_crtc->apply_work);
|
||||||
|
|
Loading…
Reference in New Issue