]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display: rename CNL references in skl_scaler.c
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 28 Jul 2021 21:59:36 +0000 (14:59 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 30 Jul 2021 17:19:17 +0000 (10:19 -0700)
With the removal of CNL, let's consider GLK as the first platform using
those constants since GLK has DISPLAY_VER == 10.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210728215946.1573015-16-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/skl_scaler.c
drivers/gpu/drm/i915/i915_reg.h

index 911a113ee006979c63881c7632209f930afbe187..37eabeff8197f1cf10b62f94b6d45225f62dbccd 100644 (file)
@@ -294,12 +294,12 @@ int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,
        return 0;
 }
 
-static int cnl_coef_tap(int i)
+static int glk_coef_tap(int i)
 {
        return i % 7;
 }
 
-static u16 cnl_nearest_filter_coef(int t)
+static u16 glk_nearest_filter_coef(int t)
 {
        return t == 3 ? 0x0800 : 0x3000;
 }
@@ -341,29 +341,29 @@ static u16 cnl_nearest_filter_coef(int t)
  *
  */
 
-static void cnl_program_nearest_filter_coefs(struct drm_i915_private *dev_priv,
+static void glk_program_nearest_filter_coefs(struct drm_i915_private *dev_priv,
                                             enum pipe pipe, int id, int set)
 {
        int i;
 
-       intel_de_write_fw(dev_priv, CNL_PS_COEF_INDEX_SET(pipe, id, set),
+       intel_de_write_fw(dev_priv, GLK_PS_COEF_INDEX_SET(pipe, id, set),
                          PS_COEE_INDEX_AUTO_INC);
 
        for (i = 0; i < 17 * 7; i += 2) {
                u32 tmp;
                int t;
 
-               t = cnl_coef_tap(i);
-               tmp = cnl_nearest_filter_coef(t);
+               t = glk_coef_tap(i);
+               tmp = glk_nearest_filter_coef(t);
 
-               t = cnl_coef_tap(i + 1);
-               tmp |= cnl_nearest_filter_coef(t) << 16;
+               t = glk_coef_tap(i + 1);
+               tmp |= glk_nearest_filter_coef(t) << 16;
 
-               intel_de_write_fw(dev_priv, CNL_PS_COEF_DATA_SET(pipe, id, set),
+               intel_de_write_fw(dev_priv, GLK_PS_COEF_DATA_SET(pipe, id, set),
                                  tmp);
        }
 
-       intel_de_write_fw(dev_priv, CNL_PS_COEF_INDEX_SET(pipe, id, set), 0);
+       intel_de_write_fw(dev_priv, GLK_PS_COEF_INDEX_SET(pipe, id, set), 0);
 }
 
 static u32 skl_scaler_get_filter_select(enum drm_scaling_filter filter, int set)
@@ -386,7 +386,7 @@ static void skl_scaler_setup_filter(struct drm_i915_private *dev_priv, enum pipe
        case DRM_SCALING_FILTER_DEFAULT:
                break;
        case DRM_SCALING_FILTER_NEAREST_NEIGHBOR:
-               cnl_program_nearest_filter_coefs(dev_priv, pipe, id, set);
+               glk_program_nearest_filter_coefs(dev_priv, pipe, id, set);
                break;
        default:
                MISSING_CASE(filter);
index 987b5aeb56b3d0f73ad33fe4ad6ca4577b12a388..010966cc008e0063a2652b2fd3d748ec80bd98d4 100644 (file)
@@ -7782,11 +7782,11 @@ enum {
 #define SKL_PS_ECC_STAT(pipe, id)  _MMIO_PIPE(pipe,     \
                        _ID(id, _PS_ECC_STAT_1A, _PS_ECC_STAT_2A),   \
                        _ID(id, _PS_ECC_STAT_1B, _PS_ECC_STAT_2B))
-#define CNL_PS_COEF_INDEX_SET(pipe, id, set)  _MMIO_PIPE(pipe,    \
+#define GLK_PS_COEF_INDEX_SET(pipe, id, set)  _MMIO_PIPE(pipe,    \
                        _ID(id, _PS_COEF_SET0_INDEX_1A, _PS_COEF_SET0_INDEX_2A) + (set) * 8, \
                        _ID(id, _PS_COEF_SET0_INDEX_1B, _PS_COEF_SET0_INDEX_2B) + (set) * 8)
 
-#define CNL_PS_COEF_DATA_SET(pipe, id, set)  _MMIO_PIPE(pipe,     \
+#define GLK_PS_COEF_DATA_SET(pipe, id, set)  _MMIO_PIPE(pipe,     \
                        _ID(id, _PS_COEF_SET0_DATA_1A, _PS_COEF_SET0_DATA_2A) + (set) * 8, \
                        _ID(id, _PS_COEF_SET0_DATA_1B, _PS_COEF_SET0_DATA_2B) + (set) * 8)
 /* legacy palette */