From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v5 12/12] drm/i915/perf: Wa_14017512683: Disable OAM if media C6 is enabled in BIOS
Date: Wed, 15 Mar 2023 17:09:32 -0700 [thread overview]
Message-ID: <20230316000932.2525744-13-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20230316000932.2525744-1-umesh.nerlige.ramappa@intel.com>
OAM does not work with media C6 enabled on some steppings of MTL.
Disable OAM if we detect that media C6 was enabled in bios.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
drivers/gpu/drm/i915/i915_perf.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 77fae3d80128..4ac6535a0356 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -209,6 +209,7 @@
#include "gt/intel_gt_regs.h"
#include "gt/intel_lrc.h"
#include "gt/intel_lrc_reg.h"
+#include "gt/intel_rc6.h"
#include "gt/intel_ring.h"
#include "gt/uc/intel_guc_slpc.h"
@@ -4898,6 +4899,18 @@ static u32 num_perf_groups_per_gt(struct intel_gt *gt)
static u32 __oam_engine_group(struct intel_engine_cs *engine)
{
+ /*
+ * Wa_14017512683: mtl[a0..c0): Use of OAM must be preceded with Media
+ * C6 disable in BIOS. Do not enable OA for media classes if MC6 is
+ * enabled in BIOS.
+ */
+ if (IS_MTL_MEDIA_STEP(engine->i915, STEP_A0, STEP_C0) &&
+ intel_check_bios_c6_setup(&engine->gt->rc6)) {
+ drm_notice_once(&engine->i915->drm,
+ "OAM requires media C6 to be disabled in BIOS\n");
+ return PERF_GROUP_INVALID;
+ }
+
if (GRAPHICS_VER_FULL(engine->i915) >= IP_VER(12, 70)) {
/*
* There's 1 SAMEDIA gt and 1 OAM per SAMEDIA gt. All media slices
@@ -5317,6 +5330,23 @@ int i915_perf_ioctl_version(struct drm_i915_private *i915)
*
* 7: Add support for video decode and enhancement classes.
*/
+
+ /*
+ * Wa_14017512683: mtl[a0..c0): Use of OAM must be preceded with Media
+ * C6 disable in BIOS. Do not enable OA for media classes if MC6 is
+ * enabled in BIOS.
+ */
+ if (IS_MTL_MEDIA_STEP(i915, STEP_A0, STEP_C0)) {
+ struct intel_gt *gt;
+ int i;
+
+ for_each_gt(gt, i915, i) {
+ if (gt->type == GT_MEDIA &&
+ intel_check_bios_c6_setup(>->rc6))
+ return 6;
+ }
+ }
+
return 7;
}
--
2.36.1
next prev parent reply other threads:[~2023-03-16 0:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 0:09 [Intel-gfx] [PATCH v5 00/12] Add OAM support for MTL Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 01/12] drm/i915/perf: Drop wakeref on GuC RC error Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 02/12] drm/i915/mtl: Synchronize i915/BIOS on C6 enabling Umesh Nerlige Ramappa
2023-03-16 16:06 ` Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 03/12] drm/i915/perf: Add helper to check supported OA engines Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 04/12] drm/i915/perf: Validate OA sseu config outside switch Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 05/12] drm/i915/perf: Group engines into respective OA groups Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 06/12] drm/i915/perf: Fail modprobe if i915_perf_init fails on OOM Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 07/12] drm/i915/perf: Parse 64bit report header formats correctly Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 08/12] drm/i915/perf: Handle non-power-of-2 reports Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 09/12] drm/i915/perf: Add engine class instance parameters to perf Umesh Nerlige Ramappa
2023-03-16 5:31 ` Dixit, Ashutosh
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 10/12] drm/i915/perf: Add support for OA media units Umesh Nerlige Ramappa
2023-03-16 0:09 ` [Intel-gfx] [PATCH v5 11/12] drm/i915/perf: Pass i915 object to perf revision helper Umesh Nerlige Ramappa
2023-03-16 0:09 ` Umesh Nerlige Ramappa [this message]
2023-03-16 0:13 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Add OAM support for MTL Patchwork
2023-03-16 0:14 ` [Intel-gfx] [PATCH v5 00/12] " Umesh Nerlige Ramappa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230316000932.2525744-13-umesh.nerlige.ramappa@intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox