drm/armada: clean up armada_drm_crtc_plane_disable()

Merge armada_drm_primary_disable() into armada_drm_crtc_plane_disable()
and rename to armada_drm_plane_disable().  Use this to simplify
armada_ovl_plane_disable().

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
Russell King
2017-07-08 10:16:42 +01:00
parent 28b3043399
commit f1f1bffcf0
3 changed files with 14 additions and 20 deletions

View File

@@ -264,15 +264,12 @@ static int armada_ovl_plane_disable(struct drm_plane *plane,
{
struct armada_ovl_plane *dplane = drm_to_armada_ovl_plane(plane);
struct drm_framebuffer *fb;
struct armada_crtc *dcrtc;
if (!dplane->base.base.crtc)
return 0;
armada_drm_plane_disable(plane, ctx);
dcrtc = drm_to_armada_crtc(dplane->base.base.crtc);
armada_drm_crtc_plane_disable(dcrtc, plane);
if (dplane->base.base.crtc)
drm_to_armada_crtc(dplane->base.base.crtc)->plane = NULL;
dcrtc->plane = NULL;
dplane->base.state.ctrl0 = 0;
fb = xchg(&dplane->old_fb, NULL);