diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-08-06 18:37:18 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-10-01 16:33:28 +0300 |
commit | 4b5dda82c20c2eee500520010c0558789592d62f (patch) | |
tree | 6c7c804a0816d5b67bd2e0fb431de3953b6fc7bb /drivers/gpu/drm/armada/armada_crtc.h | |
parent | 5740d27fa5594344ed4d2c18d7ae7bea69002004 (diff) | |
download | linux-4b5dda82c20c2eee500520010c0558789592d62f.tar.xz |
drm/armada: move CRTC flip work to primary plane work
Add a plane work implementation, and move the CRTC framebuffer flip
work to it for the primary plane. The idea is to have a common
plane work implementation for both the primary and overlay planes.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_crtc.h')
-rw-r--r-- | drivers/gpu/drm/armada/armada_crtc.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/armada/armada_crtc.h b/drivers/gpu/drm/armada/armada_crtc.h index 3ec5101e13f7..aaad5ab78673 100644 --- a/drivers/gpu/drm/armada/armada_crtc.h +++ b/drivers/gpu/drm/armada/armada_crtc.h @@ -31,16 +31,27 @@ struct armada_regs { #define armada_reg_queue_end(_r, _i) \ armada_reg_queue_mod(_r, _i, 0, 0, ~0) -struct armada_frame_work; +struct armada_crtc; +struct armada_plane; struct armada_variant; +struct armada_plane_work { + void (*fn)(struct armada_crtc *, + struct armada_plane *, + struct armada_plane_work *); +}; + struct armada_plane { struct drm_plane base; wait_queue_head_t frame_wait; + struct armada_plane_work *work; }; #define drm_to_armada_plane(p) container_of(p, struct armada_plane, base) int armada_drm_plane_init(struct armada_plane *plane); +int armada_drm_plane_work_queue(struct armada_crtc *dcrtc, + struct armada_plane *plane, struct armada_plane_work *work); +int armada_drm_plane_work_wait(struct armada_plane *plane, long timeout); struct armada_crtc { struct drm_crtc crtc; @@ -74,8 +85,6 @@ struct armada_crtc { uint32_t dumb_ctrl; uint32_t spu_iopad_ctrl; - struct armada_frame_work *frame_work; - spinlock_t irq_lock; uint32_t irq_ena; struct list_head vbl_list; |