Skip to content

Commit 82b1e8f

Browse files
committed
drm/i915/gt: remove a static inline that requires including i915_drv.h
It's actively harmful to add static inlines in headers that require you to pull in more headers. Remove the include added in commit f1530f9 ("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 <[email protected]> Cc: Fei Yang <[email protected]> Cc: Jonathan Cavitt <[email protected]> Cc: Matt Roper <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0f3fa94 commit 82b1e8f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

drivers/gpu/drm/i915/gt/intel_gt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,3 +1019,8 @@ enum i915_map_type intel_gt_coherent_map_type(struct intel_gt *gt,
10191019
else
10201020
return I915_MAP_WC;
10211021
}
1022+
1023+
bool intel_gt_needs_wa_22016122933(struct intel_gt *gt)
1024+
{
1025+
return MEDIA_VER_FULL(gt->i915) == IP_VER(13, 0) && gt->type == GT_MEDIA;
1026+
}

drivers/gpu/drm/i915/gt/intel_gt.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#ifndef __INTEL_GT__
77
#define __INTEL_GT__
88

9-
#include "i915_drv.h"
109
#include "intel_engine_types.h"
1110
#include "intel_gt_types.h"
1211
#include "intel_reset.h"
@@ -88,10 +87,7 @@ static inline bool gt_is_root(struct intel_gt *gt)
8887
return !gt->info.id;
8988
}
9089

91-
static inline bool intel_gt_needs_wa_22016122933(struct intel_gt *gt)
92-
{
93-
return MEDIA_VER_FULL(gt->i915) == IP_VER(13, 0) && gt->type == GT_MEDIA;
94-
}
90+
bool intel_gt_needs_wa_22016122933(struct intel_gt *gt);
9591

9692
static inline struct intel_gt *uc_to_gt(struct intel_uc *uc)
9793
{

drivers/gpu/drm/i915/gt/intel_gt_mcr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © 2022 Intel Corporation
44
*/
55

6+
#include "i915_drv.h"
67
#include "intel_gt.h"
78
#include "intel_gt_mcr.h"
89
#include "intel_gt_print.h"

0 commit comments

Comments
 (0)