diff mbox

[09/10] drm/vc4: Use drm_crtc_mask()

Message ID 20180626194716.12522-9-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä June 26, 2018, 7:47 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Use drm_crtc_mask() where appropriate.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Rodrigo Vivi June 26, 2018, 8:17 p.m. UTC | #1
On Tue, Jun 26, 2018 at 10:47:15PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Use drm_crtc_mask() where appropriate.
> 
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/vc4/vc4_crtc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
> index dcadf793ee80..d222358fa8a7 100644
> --- a/drivers/gpu/drm/vc4/vc4_crtc.c
> +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
> @@ -1081,7 +1081,7 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data)
>  		if (IS_ERR(plane))
>  			continue;
>  
> -		plane->possible_crtcs = 1 << drm_crtc_index(crtc);
> +		plane->possible_crtcs = drm_crtc_mask(crtc);
>  	}
>  
>  	/* Set up the legacy cursor after overlay initialization,
> @@ -1090,7 +1090,7 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data)
>  	 */
>  	cursor_plane = vc4_plane_init(drm, DRM_PLANE_TYPE_CURSOR);
>  	if (!IS_ERR(cursor_plane)) {
> -		cursor_plane->possible_crtcs = 1 << drm_crtc_index(crtc);
> +		cursor_plane->possible_crtcs = drm_crtc_mask(crtc);
>  		crtc->cursor = cursor_plane;
>  	}
>  
> @@ -1118,7 +1118,7 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data)
>  err_destroy_planes:
>  	list_for_each_entry_safe(destroy_plane, temp,
>  				 &drm->mode_config.plane_list, head) {
> -		if (destroy_plane->possible_crtcs == 1 << drm_crtc_index(crtc))
> +		if (destroy_plane->possible_crtcs == drm_crtc_mask(crtc))
>  		    destroy_plane->funcs->destroy(destroy_plane);
>  	}
>  err:
> -- 
> 2.16.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Eric Anholt June 26, 2018, 11:08 p.m. UTC | #2
Ville Syrjala <ville.syrjala@linux.intel.com> writes:

> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Use drm_crtc_mask() where appropriate.

Reviewed-by: Eric Anholt <eric@anholt.net>
diff mbox

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index dcadf793ee80..d222358fa8a7 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -1081,7 +1081,7 @@  static int vc4_crtc_bind(struct device *dev, struct device *master, void *data)
 		if (IS_ERR(plane))
 			continue;
 
-		plane->possible_crtcs = 1 << drm_crtc_index(crtc);
+		plane->possible_crtcs = drm_crtc_mask(crtc);
 	}
 
 	/* Set up the legacy cursor after overlay initialization,
@@ -1090,7 +1090,7 @@  static int vc4_crtc_bind(struct device *dev, struct device *master, void *data)
 	 */
 	cursor_plane = vc4_plane_init(drm, DRM_PLANE_TYPE_CURSOR);
 	if (!IS_ERR(cursor_plane)) {
-		cursor_plane->possible_crtcs = 1 << drm_crtc_index(crtc);
+		cursor_plane->possible_crtcs = drm_crtc_mask(crtc);
 		crtc->cursor = cursor_plane;
 	}
 
@@ -1118,7 +1118,7 @@  static int vc4_crtc_bind(struct device *dev, struct device *master, void *data)
 err_destroy_planes:
 	list_for_each_entry_safe(destroy_plane, temp,
 				 &drm->mode_config.plane_list, head) {
-		if (destroy_plane->possible_crtcs == 1 << drm_crtc_index(crtc))
+		if (destroy_plane->possible_crtcs == drm_crtc_mask(crtc))
 		    destroy_plane->funcs->destroy(destroy_plane);
 	}
 err: