From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/7] drm/i915/pcode: Extend pcode functions for multiple gt's
Date: Thu, 12 May 2022 11:22:54 -0700 [thread overview]
Message-ID: <874k1u7gqp.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <87czgjhwb4.fsf@intel.com>
On Thu, 12 May 2022 03:36:31 -0700, Jani Nikula wrote:
>
Hi Jani,
> On Wed, 11 May 2022, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> > Each gt contains an independent instance of pcode. Extend pcode functions
> > to interface with pcode on different gt's. To avoid creating dependency of
> > display functionality on intel_gt, pcode function interfaces are exposed in
> > terms of uncore rather than intel_gt. Callers have been converted to pass
> > in the appropritate (i915 or intel_gt) uncore to the pcode functions.
> >
> > v2: Expose pcode functions in terms of uncore rather than gt (Jani/Rodrigo)
> > v3: Retain previous function names to eliminate needless #defines (Rodrigo)
> > v4: Move out i915_pcode_init() to a separate patch (Tvrtko)
> > Remove duplicated drm_err/drm_dbg from intel_pcode_init() (Tvrtko)
>
> Couple of nitpicks inline, and not insisting on changing. Basically ack
> on this from me.
Thanks!
> > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> > index 0c6b9eb724ae..90a440865037 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> > @@ -138,7 +138,7 @@ static int gen6_drpc(struct seq_file *m)
> > }
> >
> > if (GRAPHICS_VER(i915) <= 7)
> > - snb_pcode_read(i915, GEN6_PCODE_READ_RC6VIDS, &rc6vids, NULL);
> > + snb_pcode_read(gt->uncore, GEN6_PCODE_READ_RC6VIDS, &rc6vids, NULL);
>
> Pedantically, I'm wondering if this (and similar places) should first be
> i915->uncore, to be replaced with gt->uncore in the next patch.
I did think about this and what you are suggesting is definitely possible
since we have an i915 variable. But on the other hand these structures are
already inside a gt and so 'i915->uncore' is really a 'gt->i915->uncore' so
someone might say why don't you just do a 'gt->uncore' which is the same as
'gt->i915->uncore'. But we could do it over two patches as you suggest.
> > diff --git a/drivers/gpu/drm/i915/intel_pcode.c b/drivers/gpu/drm/i915/intel_pcode.c
> > index ac727546868e..2be700932322 100644
> > --- a/drivers/gpu/drm/i915/intel_pcode.c
> > +++ b/drivers/gpu/drm/i915/intel_pcode.c
> > @@ -52,14 +52,12 @@ static int gen7_check_mailbox_status(u32 mbox)
> > }
> > }
> >
> > -static int __snb_pcode_rw(struct drm_i915_private *i915, u32 mbox,
> > +static int __snb_pcode_rw(struct intel_uncore *uncore, u32 mbox,
> > u32 *val, u32 *val1,
> > int fast_timeout_us, int slow_timeout_ms,
> > bool is_read)
> > {
> > - struct intel_uncore *uncore = &i915->uncore;
>
> Nitpick, personally, I would probably have just replaced the above with
>
> struct drm_i915_private *i915 = uncore->i915;
>
> to minimize the diff. Ditto everywhere. But not a big deal.
Agreed.
Since you seem to be ok I am tending to not spin these patches again. But
if you feel otherwise please let me know and I can do it.
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2022-05-12 18:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 2:32 [Intel-gfx] [PATCH v5 0/7] drm/i915: Media freq factor and per-gt enhancements/fixes Ashutosh Dixit
2022-05-12 2:32 ` [Intel-gfx] [PATCH 1/7] drm/i915: Introduce has_media_ratio_mode Ashutosh Dixit
2022-05-12 2:32 ` [Intel-gfx] [PATCH 2/7] drm/i915/gt: Add media freq factor to per-gt sysfs Ashutosh Dixit
2022-05-12 2:32 ` [Intel-gfx] [PATCH 3/7] drm/i915/pcode: Extend pcode functions for multiple gt's Ashutosh Dixit
2022-05-12 7:56 ` Tvrtko Ursulin
2022-05-12 10:36 ` Jani Nikula
2022-05-12 18:22 ` Dixit, Ashutosh [this message]
2022-05-12 2:32 ` [Intel-gfx] [PATCH 4/7] drm/i915/pcode: Init pcode on different gt's Ashutosh Dixit
2022-05-12 2:32 ` [Intel-gfx] [PATCH 5/7] drm/i915/pcode: Add a couple of pcode helpers Ashutosh Dixit
2022-05-12 2:32 ` [Intel-gfx] [PATCH 6/7] drm/i915/gt: Add media RP0/RPn to per-gt sysfs Ashutosh Dixit
2022-05-12 2:32 ` [Intel-gfx] [PATCH 7/7] drm/i915/gt: Fix memory leaks in " Ashutosh Dixit
2022-05-12 2:48 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Media freq factor and per-gt enhancements/fixes (rev5) Patchwork
2022-05-12 2:48 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-05-12 4:38 ` [Intel-gfx] [PATCH v5 0/7] drm/i915: Media freq factor and per-gt enhancements/fixes Dixit, Ashutosh
2022-05-12 7:59 ` Tvrtko Ursulin
2022-05-12 18:49 ` Dixit, Ashutosh
-- strict thread matches above, loose matches on Subject: below --
2022-05-13 1:36 [Intel-gfx] [PATCH v6 " Ashutosh Dixit
2022-05-13 1:36 ` [Intel-gfx] [PATCH 3/7] drm/i915/pcode: Extend pcode functions for multiple gt's Ashutosh Dixit
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=874k1u7gqp.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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