diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:52:34 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:52:34 +0300 |
commit | 63b93c0834a0cb7d537b30f8e815a9f63d0da37f (patch) | |
tree | 89bdb9de43cc8315c894ca1c1e3d535fde7c9805 /drivers/gpu/drm/armada/armada_overlay.c | |
parent | d40af7b1ae23da718ba916fcd07f5b064efff921 (diff) | |
download | linux-63b93c0834a0cb7d537b30f8e815a9f63d0da37f.tar.xz |
drm/armada: move plane works to overlay
Only overlay makes use of these now, so move these to the overlay code.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_overlay.c')
-rw-r--r-- | drivers/gpu/drm/armada/armada_overlay.c | 12 |
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 214b2171a8f4..40868e485ae8 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -36,6 +36,8 @@ struct armada_ovl_plane_properties { struct armada_ovl_plane { struct armada_plane base; + struct armada_plane_work works[2]; + bool next_work; bool wait_vblank; struct armada_ovl_plane_properties prop; }; @@ -245,7 +247,7 @@ static int armada_overlay_commit(struct drm_plane *plane, if (ret) goto put_state; - work = &dplane->base.works[dplane->base.next_work]; + work = &dplane->works[dplane->next_work]; if (plane->state->fb != state->fb) { /* @@ -295,7 +297,7 @@ static int armada_overlay_commit(struct drm_plane *plane, ret = 0; } - dplane->base.next_work = !dplane->base.next_work; + dplane->next_work = !dplane->next_work; put_state: drm_atomic_helper_plane_destroy_state(plane, state); @@ -515,8 +517,10 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs) return ret; } - dplane->base.works[0].fn = armada_ovl_plane_work; - dplane->base.works[1].fn = armada_ovl_plane_work; + dplane->works[0].plane = &dplane->base.base; + dplane->works[0].fn = armada_ovl_plane_work; + dplane->works[1].plane = &dplane->base.base; + dplane->works[1].fn = armada_ovl_plane_work; drm_plane_helper_add(&dplane->base.base, &armada_overlay_plane_helper_funcs); |