[PATCH v2 3/6] drm/exynos: Use drm_encoder_mask()
Thomas Zimmermann
tzimmermann at suse.de
Fri Feb 7 14:19:57 UTC 2020
Am 07.02.20 um 14:59 schrieb Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Replace the hand rolled encoder bitmask thing with drm_encoder_mask()
>
> Cc: Inki Dae <inki.dae at samsung.com>
> Cc: Joonyoung Shim <jy0922.shim at samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim at samsung.com>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Acked-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
> 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;
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200207/a329b792/attachment-0001.sig>
More information about the dri-devel
mailing list