Re: [Intel-gfx] [PATCH 08/10] drm/sun4i: Use drm_crtc_mask()

2018-06-27 Thread Maxime Ripard
On Tue, Jun 26, 2018 at 10:47:14PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Use drm_crtc_mask() where appropriate.
> 
> Cc: Maxime Ripard 
> Signed-off-by: Ville Syrjälä 

Acked-by: Maxime Ripard 

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 08/10] drm/sun4i: Use drm_crtc_mask()

2018-06-26 Thread Rodrigo Vivi
On Tue, Jun 26, 2018 at 10:47:14PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Use drm_crtc_mask() where appropriate.
> 
> Cc: Maxime Ripard 
> Signed-off-by: Ville Syrjälä 

Reviewed-by: Rodrigo Vivi 

> ---
>  drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +-
>  drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
>  drivers/gpu/drm/sun4i/sun4i_rgb.c  | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c 
> b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> index 2d7c57406715..3eedf335a935 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> @@ -242,7 +242,7 @@ struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
>  
>   /* Set possible_crtcs to this crtc for overlay planes */
>   for (i = 0; planes[i]; i++) {
> - uint32_t possible_crtcs = BIT(drm_crtc_index(&scrtc->crtc));
> + uint32_t possible_crtcs = drm_crtc_mask(&scrtc->crtc);
>   struct drm_plane *plane = planes[i];
>  
>   if (plane->type == DRM_PLANE_TYPE_OVERLAY)
> diff --git a/drivers/gpu/drm/sun4i/sun4i_lvds.c 
> b/drivers/gpu/drm/sun4i/sun4i_lvds.c
> index be3f14d7746d..a69fe2e1f9d1 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_lvds.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_lvds.c
> @@ -136,7 +136,7 @@ int sun4i_lvds_init(struct drm_device *drm, struct 
> sun4i_tcon *tcon)
>   }
>  
>   /* The LVDS encoder can only work with the TCON channel 0 */
> - lvds->encoder.possible_crtcs = BIT(drm_crtc_index(&tcon->crtc->crtc));
> + lvds->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc);
>  
>   if (tcon->panel) {
>   drm_connector_helper_add(&lvds->connector,
> diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c 
> b/drivers/gpu/drm/sun4i/sun4i_rgb.c
> index f2fa1f210509..96d21b07f8fc 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
> @@ -202,7 +202,7 @@ int sun4i_rgb_init(struct drm_device *drm, struct 
> sun4i_tcon *tcon)
>   }
>  
>   /* The RGB encoder can only work with the TCON channel 0 */
> - rgb->encoder.possible_crtcs = BIT(drm_crtc_index(&tcon->crtc->crtc));
> + rgb->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc);
>  
>   if (tcon->panel) {
>   drm_connector_helper_add(&rgb->connector,
> -- 
> 2.16.4
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 08/10] drm/sun4i: Use drm_crtc_mask()

2018-06-26 Thread Ville Syrjala
From: Ville Syrjälä 

Use drm_crtc_mask() where appropriate.

Cc: Maxime Ripard 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +-
 drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
 drivers/gpu/drm/sun4i/sun4i_rgb.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c 
b/drivers/gpu/drm/sun4i/sun4i_crtc.c
index 2d7c57406715..3eedf335a935 100644
--- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
@@ -242,7 +242,7 @@ struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
 
/* Set possible_crtcs to this crtc for overlay planes */
for (i = 0; planes[i]; i++) {
-   uint32_t possible_crtcs = BIT(drm_crtc_index(&scrtc->crtc));
+   uint32_t possible_crtcs = drm_crtc_mask(&scrtc->crtc);
struct drm_plane *plane = planes[i];
 
if (plane->type == DRM_PLANE_TYPE_OVERLAY)
diff --git a/drivers/gpu/drm/sun4i/sun4i_lvds.c 
b/drivers/gpu/drm/sun4i/sun4i_lvds.c
index be3f14d7746d..a69fe2e1f9d1 100644
--- a/drivers/gpu/drm/sun4i/sun4i_lvds.c
+++ b/drivers/gpu/drm/sun4i/sun4i_lvds.c
@@ -136,7 +136,7 @@ int sun4i_lvds_init(struct drm_device *drm, struct 
sun4i_tcon *tcon)
}
 
/* The LVDS encoder can only work with the TCON channel 0 */
-   lvds->encoder.possible_crtcs = BIT(drm_crtc_index(&tcon->crtc->crtc));
+   lvds->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc);
 
if (tcon->panel) {
drm_connector_helper_add(&lvds->connector,
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c 
b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index f2fa1f210509..96d21b07f8fc 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -202,7 +202,7 @@ int sun4i_rgb_init(struct drm_device *drm, struct 
sun4i_tcon *tcon)
}
 
/* The RGB encoder can only work with the TCON channel 0 */
-   rgb->encoder.possible_crtcs = BIT(drm_crtc_index(&tcon->crtc->crtc));
+   rgb->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc);
 
if (tcon->panel) {
drm_connector_helper_add(&rgb->connector,
-- 
2.16.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx