From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v7 11/11] drm/i915/perf: Wa_14017512683: Disable OAM if media C6 is enabled in BIOS
Date: Mon, 20 Mar 2023 17:30:24 -0700 [thread overview]
Message-ID: <87mt47t07z.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <ZBj5601q/xlo1DAG@orsosgc001.jf.intel.com>
On Mon, 20 Mar 2023 17:27:23 -0700, Umesh Nerlige Ramappa wrote:
>
> On Sun, Mar 19, 2023 at 08:56:00PM -0700, Dixit, Ashutosh wrote:
> > On Fri, 17 Mar 2023 16:16:41 -0700, Umesh Nerlige Ramappa wrote:
> >>
> >
> > Hi Umesh,
> >
> > Please read from bottom to top. Mostly nits but let's see what you think.
> >
> >> 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.
> >>
> >> v2: (Ashutosh)
> >> - Remove drm_notice from the driver load path
> >> - Log a drm_err when opening an OAM stream on affected steppings
> >>
> >> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> >> ---
> >> drivers/gpu/drm/i915/i915_perf.c | 41 ++++++++++++++++++++++++++++++++
> >> 1 file changed, 41 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> >> index 18afa76653b7..823379d63caf 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"
> >>
> >> @@ -4216,6 +4217,20 @@ static int read_properties_unlocked(struct i915_perf *perf,
> >> return -EINVAL;
> >> }
> >>
> >> + /*
> >> + * Wa_14017512683: mtl[a0..c0): Use of OAM must be preceded with Media
> >> + * C6 disable in BIOS. Fail if Media C6 is enabled on steppings where OAM
> >> + * does not work as expected.
> >> + */
> >> + if (IS_MTL_MEDIA_STEP(props->engine->i915, STEP_A0, STEP_C0) &&
> >> + props->engine->gt->type == GT_MEDIA &&
> >
> > Instead of gt type I think it's better to check perf_group->type. That is
> > why as I said below maybe better to have a valid perf_group even in this
> > case.
> >
> >> + intel_check_bios_c6_setup(&props->engine->gt->rc6)) {
> >> + drm_dbg(&perf->i915->drm,
> >> + "OAM requires media C6 to be disabled in BIOS\n");
> >> + return -EINVAL;
> >> + }
> >
> > So now we can change this check to something like:
> >
> > if (engine->perf_group->type == OAM && i915_perf->mtl_bios_mc6_enabled)
>
> sure, that will work too.
This will probably also need to be moved after the engine_supports_oa check
below.
>
> >
> >> +
> >> +
> >> if (!engine_supports_oa(props->engine)) {
> >> drm_dbg(&perf->i915->drm,
> >> "Engine not supported by OA %d:%d\n",
> >> @@ -4897,6 +4912,15 @@ 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. To disable use of OAM with media engines, set the
> >> + * oa_group to PERF_GROUP_INVALID.
> >> + */
> >> + if (IS_MTL_MEDIA_STEP(engine->i915, STEP_A0, STEP_C0) &&
> >> + intel_check_bios_c6_setup(&engine->gt->rc6))
> >> + return PERF_GROUP_INVALID;
> >
> > I think we should just remove this. Let the perf group be valid in this
> > case too since we cannot support OA for a different reason. Then we can use
> > the OAM perf group above.
>
> Sure, I will drop this
> >
> > Though if we drop this we have only 2 instances of the checks instead of 3
> > so maybe ok to not have i915_perf->mtl_bios_mc6_enabled?
>
> yes, since it's only 2 places, I would prefer to leave it as is.
>
> Thanks,
> Umesh
next prev parent reply other threads:[~2023-03-21 0:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 23:16 [Intel-gfx] [PATCH v7 00/11] Add OAM support for MTL Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 01/11] drm/i915/perf: Drop wakeref on GuC RC error Umesh Nerlige Ramappa
2023-03-20 10:16 ` Jani Nikula
2023-03-20 19:24 ` Umesh Nerlige Ramappa
2023-03-21 9:59 ` Jani Nikula
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 02/11] drm/i915/mtl: Synchronize i915/BIOS on C6 enabling Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 03/11] drm/i915/perf: Validate OA sseu config outside switch Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 04/11] drm/i915/perf: Group engines into respective OA groups Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 05/11] drm/i915/perf: Fail modprobe if i915_perf_init fails on OOM Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 06/11] drm/i915/perf: Parse 64bit report header formats correctly Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 07/11] drm/i915/perf: Handle non-power-of-2 reports Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 08/11] drm/i915/perf: Add engine class instance parameters to perf Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 09/11] drm/i915/perf: Add support for OA media units Umesh Nerlige Ramappa
2023-03-20 2:06 ` Dixit, Ashutosh
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 10/11] drm/i915/perf: Pass i915 object to perf revision helper Umesh Nerlige Ramappa
2023-03-17 23:16 ` [Intel-gfx] [PATCH v7 11/11] drm/i915/perf: Wa_14017512683: Disable OAM if media C6 is enabled in BIOS Umesh Nerlige Ramappa
2023-03-20 3:56 ` Dixit, Ashutosh
2023-03-21 0:27 ` Umesh Nerlige Ramappa
2023-03-21 0:30 ` Dixit, Ashutosh [this message]
2023-03-18 0:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add OAM support for MTL Patchwork
2023-03-18 0:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-18 0:10 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2023-03-18 0:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-18 1:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=87mt47t07z.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=umesh.nerlige.ramappa@intel.com \
/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