]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/dsi/xelpd: Fix the bit mask for wakeup GB
authorVandita Kulkarni <vandita.kulkarni@intel.com>
Tue, 19 Oct 2021 15:14:32 +0000 (20:44 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 17 Nov 2021 13:46:47 +0000 (08:46 -0500)
v2: Fix the typo, move out the hardcoding from
    macro(Jani, Ville)

Fixes: 5ea3dca4f7af ("drm/i915/dsi/xelpd: Add WA to program LP to HS wakeup guardband")
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211019151435.20477-2-vandita.kulkarni@intel.com
(cherry picked from commit 6f07707fa09e1dc58c431d57c25ef2e68b9bec47)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/i915_reg.h

index 00f270c41894d558269573e7fd47af987c7d58f2..71fbdcddd31f6ba2d7fe702454a3a27270891b5d 100644 (file)
@@ -1265,7 +1265,8 @@ static void adlp_set_lp_hs_wakeup_gb(struct intel_encoder *encoder)
        if (DISPLAY_VER(i915) == 13) {
                for_each_dsi_port(port, intel_dsi->ports)
                        intel_de_rmw(i915, TGL_DSI_CHKN_REG(port),
-                                    TGL_DSI_CHKN_LSHS_GB, 0x4);
+                                    TGL_DSI_CHKN_LSHS_GB_MASK,
+                                    TGL_DSI_CHKN_LSHS_GB(4));
        }
 }
 
index da9055c3ebf0f90cfeaea3d5edfbac059a1532f1..bcee121bec5adfece6a07b6f99a0a12394fab0ef 100644 (file)
@@ -11717,7 +11717,9 @@ enum skl_power_gate {
 #define TGL_DSI_CHKN_REG(port)         _MMIO_PORT(port,        \
                                                    _TGL_DSI_CHKN_REG_0, \
                                                    _TGL_DSI_CHKN_REG_1)
-#define TGL_DSI_CHKN_LSHS_GB                   REG_GENMASK(15, 12)
+#define TGL_DSI_CHKN_LSHS_GB_MASK              REG_GENMASK(15, 12)
+#define TGL_DSI_CHKN_LSHS_GB(byte_clocks)      REG_FIELD_PREP(TGL_DSI_CHKN_LSHS_GB_MASK, \
+                                                              (byte_clocks))
 
 /* Display Stream Splitter Control */
 #define DSS_CTL1                               _MMIO(0x67400)