diff mbox

[10/10] drm/vmwgfx: Use drm_plane_mask() & co.

Message ID 20180626194716.12522-10-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_{plane,connector}_mask() where appropriate.

Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Rodrigo Vivi June 26, 2018, 8:17 p.m. UTC | #1
On Tue, Jun 26, 2018 at 10:47:16PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Use drm_{plane,connector}_mask() where appropriate.
> 
> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> index ef96ba7432ad..17e01423ead1 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> @@ -535,9 +535,9 @@ int vmw_du_crtc_atomic_check(struct drm_crtc *crtc,
>  			     struct drm_crtc_state *new_state)
>  {
>  	struct vmw_display_unit *du = vmw_crtc_to_du(new_state->crtc);
> -	int connector_mask = 1 << drm_connector_index(&du->connector);
> +	int connector_mask = drm_connector_mask(&du->connector);
>  	bool has_primary = new_state->plane_mask &
> -			   BIT(drm_plane_index(crtc->primary));
> +			   drm_plane_mask(crtc->primary);
>  
>  	/* We always want to have an active plane with an active CRTC */
>  	if (has_primary != new_state->enable)
> -- 
> 2.16.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sinclair Yeh July 2, 2018, 5 p.m. UTC | #2
Reviewed-by: Sinclair Yeh <syeh@vmware.com>

I assume you'll upstream this as part of your series?

On Tue, Jun 26, 2018 at 10:47:16PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Use drm_{plane,connector}_mask() where appropriate.
> 
> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> index ef96ba7432ad..17e01423ead1 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> @@ -535,9 +535,9 @@ int vmw_du_crtc_atomic_check(struct drm_crtc *crtc,
>  			     struct drm_crtc_state *new_state)
>  {
>  	struct vmw_display_unit *du = vmw_crtc_to_du(new_state->crtc);
> -	int connector_mask = 1 << drm_connector_index(&du->connector);
> +	int connector_mask = drm_connector_mask(&du->connector);
>  	bool has_primary = new_state->plane_mask &
> -			   BIT(drm_plane_index(crtc->primary));
> +			   drm_plane_mask(crtc->primary);
>  
>  	/* We always want to have an active plane with an active CRTC */
>  	if (has_primary != new_state->enable)
> -- 
> 2.16.4
>
Ville Syrjälä July 3, 2018, 12:34 p.m. UTC | #3
On Mon, Jul 02, 2018 at 10:00:35AM -0700, Sinclair Yeh wrote:
> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
> 
> I assume you'll upstream this as part of your series?

Already pushed actually. In my haste I failed to realize I was
still missing an ack/rb for vmwgfx. Sorry about that.

> 
> On Tue, Jun 26, 2018 at 10:47:16PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Use drm_{plane,connector}_mask() where appropriate.
> > 
> > Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
> > Cc: Sinclair Yeh <syeh@vmware.com>
> > Cc: Thomas Hellstrom <thellstrom@vmware.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> > index ef96ba7432ad..17e01423ead1 100644
> > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> > @@ -535,9 +535,9 @@ int vmw_du_crtc_atomic_check(struct drm_crtc *crtc,
> >  			     struct drm_crtc_state *new_state)
> >  {
> >  	struct vmw_display_unit *du = vmw_crtc_to_du(new_state->crtc);
> > -	int connector_mask = 1 << drm_connector_index(&du->connector);
> > +	int connector_mask = drm_connector_mask(&du->connector);
> >  	bool has_primary = new_state->plane_mask &
> > -			   BIT(drm_plane_index(crtc->primary));
> > +			   drm_plane_mask(crtc->primary);
> >  
> >  	/* We always want to have an active plane with an active CRTC */
> >  	if (has_primary != new_state->enable)
> > -- 
> > 2.16.4
> >
diff mbox

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index ef96ba7432ad..17e01423ead1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -535,9 +535,9 @@  int vmw_du_crtc_atomic_check(struct drm_crtc *crtc,
 			     struct drm_crtc_state *new_state)
 {
 	struct vmw_display_unit *du = vmw_crtc_to_du(new_state->crtc);
-	int connector_mask = 1 << drm_connector_index(&du->connector);
+	int connector_mask = drm_connector_mask(&du->connector);
 	bool has_primary = new_state->plane_mask &
-			   BIT(drm_plane_index(crtc->primary));
+			   drm_plane_mask(crtc->primary);
 
 	/* We always want to have an active plane with an active CRTC */
 	if (has_primary != new_state->enable)