]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/exynos: Use drm_encoder_mask()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 11 Feb 2020 16:22:04 +0000 (18:22 +0200)
committerInki Dae <inki.dae@samsung.com>
Wed, 18 Mar 2020 03:11:41 +0000 (12:11 +0900)
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>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.c

index ba0f868b2477f667168bc5ff0406d8f84ca64a44..57defeb445223b533df7e38b144182b733a78c11 100644 (file)
@@ -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;