]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gt: Add remaining conversions to GRAPHICS_VER
authorLucas De Marchi <lucas.demarchi@intel.com>
Sat, 5 Jun 2021 15:53:53 +0000 (08:53 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Sat, 5 Jun 2021 22:09:28 +0000 (15:09 -0700)
For some reason coccinelle misses a few cases in gt with calls to
INTEL_GEN()/IS_GEN(). Do a manual conversion for those.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210605155356.4183026-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
drivers/gpu/drm/i915/gt/intel_engine_types.h
drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c

index 0389bceebd0624fa80fe93acb6c7c3007c48e9a1..4270b5a34a838085ed283320c3ec628049349657 100644 (file)
@@ -230,7 +230,7 @@ static int drpc_show(struct seq_file *m, void *unused)
        with_intel_runtime_pm(gt->uncore->rpm, wakeref) {
                if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915))
                        err = vlv_drpc(m);
-               else if (INTEL_GEN(i915) >= 6)
+               else if (GRAPHICS_VER(i915) >= 6)
                        err = gen6_drpc(m);
                else
                        err = ilk_drpc(m);
index 9ef349cd5cea9dabff1c7a022284feeb2693b977..e113f93b3274531017c54c27939acc2b2727e25d 100644 (file)
@@ -606,10 +606,10 @@ intel_engine_has_relative_mmio(const struct intel_engine_cs * const engine)
 }
 
 #define instdone_has_slice(dev_priv___, sseu___, slice___) \
-       ((IS_GEN(dev_priv___, 7) ? 1 : ((sseu___)->slice_mask)) & BIT(slice___))
+       ((GRAPHICS_VER(dev_priv___) == 7 ? 1 : ((sseu___)->slice_mask)) & BIT(slice___))
 
 #define instdone_has_subslice(dev_priv__, sseu__, slice__, subslice__) \
-       (IS_GEN(dev_priv__, 7) ? (1 & BIT(subslice__)) : \
+       (GRAPHICS_VER(dev_priv__) == 7 ? (1 & BIT(subslice__)) : \
         intel_sseu_has_subslice(sseu__, 0, subslice__))
 
 #define for_each_instdone_slice_subslice(dev_priv_, sseu_, slice_, subslice_) \
index 51780282d87217ed0d67cf7bc44027f06fb0f8aa..714fe849577537cfba9df22cae2302492243f791 100644 (file)
@@ -248,7 +248,7 @@ int intel_sseu_status(struct seq_file *m, struct intel_gt *gt)
        struct sseu_dev_info sseu;
        intel_wakeref_t wakeref;
 
-       if (INTEL_GEN(i915) < 8)
+       if (GRAPHICS_VER(i915) < 8)
                return -ENODEV;
 
        seq_puts(m, "SSEU Device Info\n");
@@ -265,9 +265,9 @@ int intel_sseu_status(struct seq_file *m, struct intel_gt *gt)
                        cherryview_sseu_device_status(gt, &sseu);
                else if (IS_BROADWELL(i915))
                        bdw_sseu_device_status(gt, &sseu);
-               else if (IS_GEN(i915, 9))
+               else if (GRAPHICS_VER(i915) == 9)
                        gen9_sseu_device_status(gt, &sseu);
-               else if (INTEL_GEN(i915) >= 10)
+               else if (GRAPHICS_VER(i915) >= 10)
                        gen10_sseu_device_status(gt, &sseu);
        }