diff mbox series

[v3,3/7] drm/exynos: Use drm_encoder_mask()

Message ID 20200211162208.16224-4-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm: Try to fix encoder possible_clones/crtc | expand

Commit Message

Ville Syrjälä Feb. 11, 2020, 4:22 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Replace the hand rolled encoder bitmask thing with drm_encoder_mask()

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Inki Dae Feb. 17, 2020, 2:27 a.m. UTC | #1
20. 2. 12. 오전 1:22에 Ville Syrjala 이(가) 쓴 글:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Replace the hand rolled encoder bitmask thing with drm_encoder_mask()
> 
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Acked-by: Inki Dae <inki.dae@samsung.com>

THanks,
Inki Dae

> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index ba0f868b2477..57defeb44522 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -270,7 +270,7 @@ static int exynos_drm_bind(struct device *dev)
>  	struct drm_encoder *encoder;
>  	struct drm_device *drm;
>  	unsigned int clone_mask;
> -	int cnt, ret;
> +	int ret;
>  
>  	drm = drm_dev_alloc(&exynos_drm_driver, dev);
>  	if (IS_ERR(drm))
> @@ -293,10 +293,9 @@ static int exynos_drm_bind(struct device *dev)
>  	exynos_drm_mode_config_init(drm);
>  
>  	/* setup possible_clones. */
> -	cnt = 0;
>  	clone_mask = 0;
>  	list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
> -		clone_mask |= (1 << (cnt++));
> +		clone_mask |= drm_encoder_mask(encoder);
>  
>  	list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
>  		encoder->possible_clones = clone_mask;
>
Inki Dae Feb. 25, 2020, 12:32 a.m. UTC | #2
20. 2. 17. 오전 11:27에 Inki Dae 이(가) 쓴 글:
> 
> 
> 20. 2. 12. 오전 1:22에 Ville Syrjala 이(가) 쓴 글:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> Replace the hand rolled encoder bitmask thing with drm_encoder_mask()
>>
>> Cc: Inki Dae <inki.dae@samsung.com>
>> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
>> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
>> Cc: Kyungmin Park <kyungmin.park@samsung.com>
>> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Acked-by: Inki Dae <inki.dae@samsung.com>

Seems no any dependency of other patch so I will pick it up.

Thanks,
Inki Dae

> 
> THanks,
> Inki Dae
> 
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> index ba0f868b2477..57defeb44522 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> @@ -270,7 +270,7 @@ static int exynos_drm_bind(struct device *dev)
>>  	struct drm_encoder *encoder;
>>  	struct drm_device *drm;
>>  	unsigned int clone_mask;
>> -	int cnt, ret;
>> +	int ret;
>>  
>>  	drm = drm_dev_alloc(&exynos_drm_driver, dev);
>>  	if (IS_ERR(drm))
>> @@ -293,10 +293,9 @@ static int exynos_drm_bind(struct device *dev)
>>  	exynos_drm_mode_config_init(drm);
>>  
>>  	/* setup possible_clones. */
>> -	cnt = 0;
>>  	clone_mask = 0;
>>  	list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
>> -		clone_mask |= (1 << (cnt++));
>> +		clone_mask |= drm_encoder_mask(encoder);
>>  
>>  	list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
>>  		encoder->possible_clones = clone_mask;
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://protect2.fireeye.com/url?k=1d1d091a-40c9b572-1d1c8255-0cc47a3356b2-9a4d0e5ded7f6cb8&u=https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index ba0f868b2477..57defeb44522 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -270,7 +270,7 @@  static int exynos_drm_bind(struct device *dev)
 	struct drm_encoder *encoder;
 	struct drm_device *drm;
 	unsigned int clone_mask;
-	int cnt, ret;
+	int ret;
 
 	drm = drm_dev_alloc(&exynos_drm_driver, dev);
 	if (IS_ERR(drm))
@@ -293,10 +293,9 @@  static int exynos_drm_bind(struct device *dev)
 	exynos_drm_mode_config_init(drm);
 
 	/* setup possible_clones. */
-	cnt = 0;
 	clone_mask = 0;
 	list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
-		clone_mask |= (1 << (cnt++));
+		clone_mask |= drm_encoder_mask(encoder);
 
 	list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
 		encoder->possible_clones = clone_mask;