summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/armada/armada_overlay.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-07-15 18:11:25 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-10-01 14:33:28 +0100
commit5740d27fa5594344ed4d2c18d7ae7bea69002004 (patch)
tree0492fb981e3d3ac7c19b2a83e91d911adb362aa3 /drivers/gpu/drm/armada/armada_overlay.c
parent6908cf755af74b38d67195ee6607976a55f53d95 (diff)
downloadtalos-obmc-linux-5740d27fa5594344ed4d2c18d7ae7bea69002004.tar.gz
talos-obmc-linux-5740d27fa5594344ed4d2c18d7ae7bea69002004.zip
drm/armada: move frame wait into armada_frame
Both the CRTC and overlay frames have their own wait queues. It would make more sense if these were part of the plane - the primary plane for the CRTC and overlay plane for the overlay. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_overlay.c')
-rw-r--r--drivers/gpu/drm/armada/armada_overlay.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index 6ec42eb85981..9a5bab765085 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -39,7 +39,6 @@ struct armada_ovl_plane {
struct {
struct armada_vbl_event update;
struct armada_regs regs[13];
- wait_queue_head_t wait;
} vbl;
struct armada_ovl_plane_properties prop;
};
@@ -90,7 +89,7 @@ static void armada_ovl_plane_vbl(struct armada_crtc *dcrtc, void *data)
armada_drm_crtc_update_regs(dcrtc, dplane->vbl.regs);
armada_ovl_retire_fb(dplane, NULL);
- wake_up(&dplane->vbl.wait);
+ wake_up(&dplane->base.frame_wait);
}
static int
@@ -163,7 +162,7 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
dcrtc->base + LCD_SPU_SRAM_PARA1);
}
- wait_event_timeout(dplane->vbl.wait,
+ wait_event_timeout(dplane->base.frame_wait,
list_empty(&dplane->vbl.update.node),
HZ/25);
@@ -451,7 +450,12 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs)
if (!dplane)
return -ENOMEM;
- init_waitqueue_head(&dplane->vbl.wait);
+ ret = armada_drm_plane_init(&dplane->base);
+ if (ret) {
+ kfree(dplane);
+ return ret;
+ }
+
armada_drm_vbl_event_init(&dplane->vbl.update, armada_ovl_plane_vbl,
dplane);
OpenPOWER on IntegriCloud