From: Rodrigo Vivi <rodrigo.vivi@intel.com> To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Intel-gfx@lists.freedesktop.org, Eero T Tamminen <eero.t.tamminen@intel.com>, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] drm/i915/pmu: Check actual RC6 status Date: Thu, 1 Apr 2021 05:19:03 -0400 [thread overview] Message-ID: <YGWQB+8gWgmZ/6Mg@intel.com> (raw) In-Reply-To: <20210331101850.2582027-1-tvrtko.ursulin@linux.intel.com> On Wed, Mar 31, 2021 at 11:18:50AM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > RC6 support cannot be simply established by looking at the static device > HAS_RC6() flag. There are cases which disable RC6 at driver load time so > use the status of those check when deciding whether to enumerate the rc6 > counter. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Reported-by: Eero T Tamminen <eero.t.tamminen@intel.com> > --- > drivers/gpu/drm/i915/i915_pmu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c > index 41651ac255fa..a75cd1db320b 100644 > --- a/drivers/gpu/drm/i915/i915_pmu.c > +++ b/drivers/gpu/drm/i915/i915_pmu.c > @@ -476,6 +476,8 @@ engine_event_status(struct intel_engine_cs *engine, > static int > config_status(struct drm_i915_private *i915, u64 config) > { > + struct intel_gt *gt = &i915->gt; > + > switch (config) { > case I915_PMU_ACTUAL_FREQUENCY: > if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) > @@ -489,7 +491,7 @@ config_status(struct drm_i915_private *i915, u64 config) > case I915_PMU_INTERRUPTS: > break; > case I915_PMU_RC6_RESIDENCY: > - if (!HAS_RC6(i915)) > + if (!gt->rc6.supported) Is this really going to remove any confusion? Right now it is there but with residency 0, but after this change the event is not there anymore so I wonder if we are not just changing to a different kind of confusion on users. > return -ENODEV; would a different return help somehow? > break; > case I915_PMU_SOFTWARE_GT_AWAKE_TIME: > -- > 2.27.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com> To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Intel-gfx@lists.freedesktop.org, Eero T Tamminen <eero.t.tamminen@intel.com>, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] drm/i915/pmu: Check actual RC6 status Date: Thu, 1 Apr 2021 05:19:03 -0400 [thread overview] Message-ID: <YGWQB+8gWgmZ/6Mg@intel.com> (raw) In-Reply-To: <20210331101850.2582027-1-tvrtko.ursulin@linux.intel.com> On Wed, Mar 31, 2021 at 11:18:50AM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > RC6 support cannot be simply established by looking at the static device > HAS_RC6() flag. There are cases which disable RC6 at driver load time so > use the status of those check when deciding whether to enumerate the rc6 > counter. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Reported-by: Eero T Tamminen <eero.t.tamminen@intel.com> > --- > drivers/gpu/drm/i915/i915_pmu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c > index 41651ac255fa..a75cd1db320b 100644 > --- a/drivers/gpu/drm/i915/i915_pmu.c > +++ b/drivers/gpu/drm/i915/i915_pmu.c > @@ -476,6 +476,8 @@ engine_event_status(struct intel_engine_cs *engine, > static int > config_status(struct drm_i915_private *i915, u64 config) > { > + struct intel_gt *gt = &i915->gt; > + > switch (config) { > case I915_PMU_ACTUAL_FREQUENCY: > if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) > @@ -489,7 +491,7 @@ config_status(struct drm_i915_private *i915, u64 config) > case I915_PMU_INTERRUPTS: > break; > case I915_PMU_RC6_RESIDENCY: > - if (!HAS_RC6(i915)) > + if (!gt->rc6.supported) Is this really going to remove any confusion? Right now it is there but with residency 0, but after this change the event is not there anymore so I wonder if we are not just changing to a different kind of confusion on users. > return -ENODEV; would a different return help somehow? > break; > case I915_PMU_SOFTWARE_GT_AWAKE_TIME: > -- > 2.27.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-04-01 9:19 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-31 10:18 [PATCH] drm/i915/pmu: Check actual RC6 status Tvrtko Ursulin 2021-03-31 10:18 ` [Intel-gfx] " Tvrtko Ursulin 2021-03-31 16:16 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork 2021-03-31 16:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2021-03-31 19:35 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 2021-04-01 9:19 ` Rodrigo Vivi [this message] 2021-04-01 9:19 ` [Intel-gfx] [PATCH] " Rodrigo Vivi 2021-04-01 9:38 ` Tvrtko Ursulin 2021-04-01 9:38 ` Tvrtko Ursulin 2021-04-01 9:54 ` Rodrigo Vivi 2021-04-01 9:54 ` Rodrigo Vivi 2021-04-01 10:24 ` Tamminen, Eero T 2021-04-01 10:24 ` Tamminen, Eero T 2021-04-01 11:38 ` Tvrtko Ursulin 2021-04-01 11:38 ` Tvrtko Ursulin
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=YGWQB+8gWgmZ/6Mg@intel.com \ --to=rodrigo.vivi@intel.com \ --cc=Intel-gfx@lists.freedesktop.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=eero.t.tamminen@intel.com \ --cc=tvrtko.ursulin@linux.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.