drm/vc4: kms: Rename NUM_CHANNELS 03/246703/1
authorMaxime Ripard <maxime@cerno.tech>
Tue, 3 Nov 2020 08:09:01 +0000 (17:09 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 3 Nov 2020 08:09:01 +0000 (17:09 +0900)
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.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
[hoegeun.kwon: Needed to fix page flip issue of dual hdmi and for enable
force hotplug configure.]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Ib94c2b3ffbc7e5c95f2c3a965919e523c68f8a12

drivers/gpu/drm/vc4/vc4_kms.c

index 261ac79..c87590d 100644 (file)
@@ -27,6 +27,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;
@@ -615,8 +617,6 @@ static const struct drm_private_state_funcs vc4_load_tracker_state_funcs = {
        .atomic_destroy_state = vc4_load_tracker_destroy_state,
 };
 
-#define NUM_CHANNELS 3
-
 /*
  * The BCM2711 HVS has up to 7 output connected to the pixelvalves and
  * the TXP (and therefore all the CRTCs found on that platform).
@@ -642,7 +642,7 @@ static const struct drm_private_state_funcs vc4_load_tracker_state_funcs = {
 static int vc4_pv_muxing_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 vc4_dev *vc4 = to_vc4_dev(state->dev);
        struct drm_crtc_state *old_crtc_state, *new_crtc_state;
        struct drm_crtc *crtc;