drm/i915/mtl: Check full IP version when applying hw steering semaphore
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 2 Dec 2022 22:35:28 +0000 (14:35 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 5 Dec 2022 17:06:50 +0000 (09:06 -0800)
When determining whether the platform has a hardware-level steering
semaphore (i.e., MTL and beyond), we need to use GRAPHICS_VER_FULL() to
compare the full version rather than just the major version number
returned by GRAPHICS_VER().

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 3100240bf846 ("drm/i915/mtl: Add hardware-level lock for steering")
Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221202223528.714491-1-matthew.d.roper@intel.com
drivers/gpu/drm/i915/gt/intel_gt_mcr.c

index 087e4ac5b68d79ed3c2accb489b1c7a9d363783b..41a237509dcfdab48a370e7d8e7c15a9dfaac9c3 100644 (file)
@@ -367,7 +367,7 @@ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags)
         * driver threads, but also with hardware/firmware agents.  A dedicated
         * locking register is used.
         */
-       if (GRAPHICS_VER(gt->i915) >= IP_VER(12, 70))
+       if (GRAPHICS_VER_FULL(gt->i915) >= IP_VER(12, 70))
                err = wait_for(intel_uncore_read_fw(gt->uncore,
                                                    MTL_STEER_SEMAPHORE) == 0x1, 100);
 
@@ -407,7 +407,7 @@ void intel_gt_mcr_unlock(struct intel_gt *gt, unsigned long flags)
 {
        spin_unlock_irqrestore(&gt->mcr_lock, flags);
 
-       if (GRAPHICS_VER(gt->i915) >= IP_VER(12, 70))
+       if (GRAPHICS_VER_FULL(gt->i915) >= IP_VER(12, 70))
                intel_uncore_write_fw(gt->uncore, MTL_STEER_SEMAPHORE, 0x1);
 }