Skip to content

Commit 088a422

Browse files
bnilawarjnikula
authored andcommitted
drm/i915/mtl: Disable MC6 for MTL A step
The Wa_14017073508 require to send Media Busy/Idle mailbox while accessing Media tile. As of now it is getting handled while __gt_unpark, __gt_park. But there are various corner cases where forcewakes are taken without __gt_unpark i.e. without sending Busy Mailbox especially during register reads. Forcewakes are taken without busy mailbox leads to GPU HANG. So bringing mailbox calls under forcewake calls are no feasible option as forcewake calls are atomic and mailbox calls are blocking. The issue already fixed in B step so disabling MC6 on A step and reverting previous commit which handles Wa_14017073508 Fixes: 8f70f1e ("drm/i915/mtl: Add Wa_14017073508 for SAMedia") Cc: Rodrigo Vivi <[email protected]> Signed-off-by: Badal Nilawar <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Anshuman Gupta <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 038a248) Signed-off-by: Jani Nikula <[email protected]>
1 parent 3a84f2c commit 088a422

File tree

4 files changed

+9
-48
lines changed

4 files changed

+9
-48
lines changed

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

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,10 @@
2121
#include "intel_rc6.h"
2222
#include "intel_rps.h"
2323
#include "intel_wakeref.h"
24-
#include "intel_pcode.h"
2524
#include "pxp/intel_pxp_pm.h"
2625

2726
#define I915_GT_SUSPEND_IDLE_TIMEOUT (HZ / 2)
2827

29-
static void mtl_media_busy(struct intel_gt *gt)
30-
{
31-
/* Wa_14017073508: mtl */
32-
if (IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0) &&
33-
gt->type == GT_MEDIA)
34-
snb_pcode_write_p(gt->uncore, PCODE_MBOX_GT_STATE,
35-
PCODE_MBOX_GT_STATE_MEDIA_BUSY,
36-
PCODE_MBOX_GT_STATE_DOMAIN_MEDIA, 0);
37-
}
38-
39-
static void mtl_media_idle(struct intel_gt *gt)
40-
{
41-
/* Wa_14017073508: mtl */
42-
if (IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0) &&
43-
gt->type == GT_MEDIA)
44-
snb_pcode_write_p(gt->uncore, PCODE_MBOX_GT_STATE,
45-
PCODE_MBOX_GT_STATE_MEDIA_NOT_BUSY,
46-
PCODE_MBOX_GT_STATE_DOMAIN_MEDIA, 0);
47-
}
48-
4928
static void user_forcewake(struct intel_gt *gt, bool suspend)
5029
{
5130
int count = atomic_read(&gt->user_wakeref);
@@ -93,9 +72,6 @@ static int __gt_unpark(struct intel_wakeref *wf)
9372

9473
GT_TRACE(gt, "\n");
9574

96-
/* Wa_14017073508: mtl */
97-
mtl_media_busy(gt);
98-
9975
/*
10076
* It seems that the DMC likes to transition between the DC states a lot
10177
* when there are no connected displays (no active power domains) during
@@ -145,9 +121,6 @@ static int __gt_park(struct intel_wakeref *wf)
145121
GEM_BUG_ON(!wakeref);
146122
intel_display_power_put_async(i915, POWER_DOMAIN_GT_IRQ, wakeref);
147123

148-
/* Wa_14017073508: mtl */
149-
mtl_media_idle(gt);
150-
151124
return 0;
152125
}
153126

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ static bool bxt_check_bios_rc6_setup(struct intel_rc6 *rc6)
486486
static bool rc6_supported(struct intel_rc6 *rc6)
487487
{
488488
struct drm_i915_private *i915 = rc6_to_i915(rc6);
489+
struct intel_gt *gt = rc6_to_gt(rc6);
489490

490491
if (!HAS_RC6(i915))
491492
return false;
@@ -502,6 +503,13 @@ static bool rc6_supported(struct intel_rc6 *rc6)
502503
return false;
503504
}
504505

506+
if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0) &&
507+
gt->type == GT_MEDIA) {
508+
drm_notice(&i915->drm,
509+
"Media RC6 disabled on A step\n");
510+
return false;
511+
}
512+
505513
return true;
506514
}
507515

drivers/gpu/drm/i915/gt/uc/intel_guc_rc.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,9 @@
1111

1212
static bool __guc_rc_supported(struct intel_guc *guc)
1313
{
14-
struct intel_gt *gt = guc_to_gt(guc);
15-
16-
/*
17-
* Wa_14017073508: mtl
18-
* Do not enable gucrc to avoid additional interrupts which
19-
* may disrupt pcode wa.
20-
*/
21-
if (IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0) &&
22-
gt->type == GT_MEDIA)
23-
return false;
24-
2514
/* GuC RC is unavailable for pre-Gen12 */
2615
return guc->submission_supported &&
27-
GRAPHICS_VER(gt->i915) >= 12;
16+
GRAPHICS_VER(guc_to_gt(guc)->i915) >= 12;
2817
}
2918

3019
static bool __guc_rc_selected(struct intel_guc *guc)

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6598,15 +6598,6 @@
65986598
/* XEHP_PCODE_FREQUENCY_CONFIG param2 */
65996599
#define PCODE_MBOX_DOMAIN_NONE 0x0
66006600
#define PCODE_MBOX_DOMAIN_MEDIAFF 0x3
6601-
6602-
/* Wa_14017210380: mtl */
6603-
#define PCODE_MBOX_GT_STATE 0x50
6604-
/* sub-commands (param1) */
6605-
#define PCODE_MBOX_GT_STATE_MEDIA_BUSY 0x1
6606-
#define PCODE_MBOX_GT_STATE_MEDIA_NOT_BUSY 0x2
6607-
/* param2 */
6608-
#define PCODE_MBOX_GT_STATE_DOMAIN_MEDIA 0x1
6609-
66106601
#define GEN6_PCODE_DATA _MMIO(0x138128)
66116602
#define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8
66126603
#define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16

0 commit comments

Comments
 (0)