summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-06-26 22:47:07 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-02 18:45:55 +0300
commit62f77ad0969594ee428043523bf28329df191b39 (patch)
treef3a9bbf33b04bdc5a3e22be1ba4eb8ea204d0ae1 /drivers/gpu/drm/drm_atomic.c
parente35a2f9aee31fb9e85ebbf4820481ce3f5e94db2 (diff)
downloadlinux-62f77ad0969594ee428043523bf28329df191b39.tar.xz
drm: Add drm_plane_mask()
Add drm_plane_mask() which returns the 1<<index for the plane. We already have an identical drm_crtc_mask() for crtcs. Mostly performed with coccinelle: @@ @@ - (1<<drm_plane_index( + drm_plane_mask( ...) - ) @@ @@ - 1<<drm_plane_index( + drm_plane_mask( ...) @@ @@ - BIT(drm_plane_index( + drm_plane_mask( ...) - ) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 178842380f75..684c9d3a1d6c 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1581,7 +1581,7 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
if (WARN_ON(IS_ERR(crtc_state)))
return PTR_ERR(crtc_state);
- crtc_state->plane_mask &= ~(1 << drm_plane_index(plane));
+ crtc_state->plane_mask &= ~drm_plane_mask(plane);
}
plane_state->crtc = crtc;
@@ -1591,7 +1591,7 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
- crtc_state->plane_mask |= (1 << drm_plane_index(plane));
+ crtc_state->plane_mask |= drm_plane_mask(plane);
}
if (crtc)