diff mbox series

[v3,3/7] drm/vc4: kms: Rename NUM_CHANNELS

Message ID 20201105135656.383350-4-maxime@cerno.tech
State Accepted
Commit a9661f27dc6bfbb6869b07cf68f9c2fd05167746
Headers show
Series drm/vc4: Rework the HVS muxing code | expand

Commit Message

Maxime Ripard Nov. 5, 2020, 1:56 p.m. UTC
The NUM_CHANNELS define has a pretty generic name and was right before the
function using it. Let's move to something that makes the hardware-specific
nature more obvious, and to a more appropriate place.

Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_kms.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Zimmermann Nov. 19, 2020, 7:56 a.m. UTC | #1
Am 05.11.20 um 14:56 schrieb Maxime Ripard:
> The NUM_CHANNELS define has a pretty generic name and was right before the

> function using it. Let's move to something that makes the hardware-specific

> nature more obvious, and to a more appropriate place.

> 

> Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>

> Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>

> Signed-off-by: Maxime Ripard <maxime@cerno.tech>


Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>


> ---

>   drivers/gpu/drm/vc4/vc4_kms.c | 6 +++---

>   1 file changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c

> index 4b558ccb18fe..ad69c70f66a2 100644

> --- a/drivers/gpu/drm/vc4/vc4_kms.c

> +++ b/drivers/gpu/drm/vc4/vc4_kms.c

> @@ -24,6 +24,8 @@

>   #include "vc4_drv.h"

>   #include "vc4_regs.h"

>   

> +#define HVS_NUM_CHANNELS 3

> +

>   struct vc4_ctm_state {

>   	struct drm_private_state base;

>   	struct drm_color_ctm *ctm;

> @@ -660,12 +662,10 @@ static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)

>   	return drmm_add_action_or_reset(&vc4->base, vc4_load_tracker_obj_fini, NULL);

>   }

>   

> -#define NUM_CHANNELS 3

> -

>   static int

>   vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)

>   {

> -	unsigned long unassigned_channels = GENMASK(NUM_CHANNELS - 1, 0);

> +	unsigned long unassigned_channels = GENMASK(HVS_NUM_CHANNELS - 1, 0);

>   	struct drm_crtc_state *old_crtc_state, *new_crtc_state;

>   	struct drm_crtc *crtc;

>   	int i, ret;

> 


-- 
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
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index 4b558ccb18fe..ad69c70f66a2 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -24,6 +24,8 @@ 
 #include "vc4_drv.h"
 #include "vc4_regs.h"
 
+#define HVS_NUM_CHANNELS 3
+
 struct vc4_ctm_state {
 	struct drm_private_state base;
 	struct drm_color_ctm *ctm;
@@ -660,12 +662,10 @@  static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)
 	return drmm_add_action_or_reset(&vc4->base, vc4_load_tracker_obj_fini, NULL);
 }
 
-#define NUM_CHANNELS 3
-
 static int
 vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
 {
-	unsigned long unassigned_channels = GENMASK(NUM_CHANNELS - 1, 0);
+	unsigned long unassigned_channels = GENMASK(HVS_NUM_CHANNELS - 1, 0);
 	struct drm_crtc_state *old_crtc_state, *new_crtc_state;
 	struct drm_crtc *crtc;
 	int i, ret;