drm/i915/gt: remove a static inline that requires including i915_drv.h
authorJani Nikula <jani.nikula@intel.com>
Thu, 21 Sep 2023 16:24:56 +0000 (19:24 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 25 Sep 2023 10:41:09 +0000 (13:41 +0300)
It's actively harmful to add static inlines in headers that require you
to pull in more headers. Remove the include added in commit f1530f912ed8
("drm/i915/gt: Apply workaround 22016122933 correctly"). We see that
there's already an implicit dependency on the i915_drv.h that we need to
address too.

Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Fei Yang <fei.yang@intel.com>
Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230921162456.3889375-1-jani.nikula@intel.com
drivers/gpu/drm/i915/gt/intel_gt.c
drivers/gpu/drm/i915/gt/intel_gt.h
drivers/gpu/drm/i915/gt/intel_gt_mcr.c

index d234122f80242d83628fe6304d035f11f678ca38..bc0ead0b7a0a33e3dce2474d10976e1e05e24f11 100644 (file)
@@ -1019,3 +1019,8 @@ enum i915_map_type intel_gt_coherent_map_type(struct intel_gt *gt,
        else
                return I915_MAP_WC;
 }
+
+bool intel_gt_needs_wa_22016122933(struct intel_gt *gt)
+{
+       return MEDIA_VER_FULL(gt->i915) == IP_VER(13, 0) && gt->type == GT_MEDIA;
+}
index 239848bcb2a42e3f2444c687239812e9a49da0ca..2cac499d5aa3e57e15ffe7d90727e8a31253916e 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __INTEL_GT__
 #define __INTEL_GT__
 
-#include "i915_drv.h"
 #include "intel_engine_types.h"
 #include "intel_gt_types.h"
 #include "intel_reset.h"
@@ -88,10 +87,7 @@ static inline bool gt_is_root(struct intel_gt *gt)
        return !gt->info.id;
 }
 
-static inline bool intel_gt_needs_wa_22016122933(struct intel_gt *gt)
-{
-       return MEDIA_VER_FULL(gt->i915) == IP_VER(13, 0) && gt->type == GT_MEDIA;
-}
+bool intel_gt_needs_wa_22016122933(struct intel_gt *gt);
 
 static inline struct intel_gt *uc_to_gt(struct intel_uc *uc)
 {
index 11d181b1cc7a751761442351304030a489eff115..bf4a933de03a50ce7ab877d462ebbaecc34b1473 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright © 2022 Intel Corporation
  */
 
+#include "i915_drv.h"
 #include "intel_gt.h"
 #include "intel_gt_mcr.h"
 #include "intel_gt_print.h"