Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Yan Zhao <yan.y.zhao@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Drop runtime-pm assert from vgpu io accessors
Date: Mon, 19 Oct 2020 17:37:38 +0800	[thread overview]
Message-ID: <20201019093738.GS27141@zhen-hp.sh.intel.com> (raw)
In-Reply-To: <20200819083259.GD32450@zhen-hp.sh.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 3851 bytes --]


Hi, Chris

Looks this one is still missed to push? Could you help?

Thanks

On 2020.08.19 16:32:59 +0800, Zhenyu Wang wrote:
> 
> ping for committing?
> 
> On 2020.08.12 10:06:31 +0800, Zhenyu Wang wrote:
> > On 2020.08.11 10:25:32 +0100, Chris Wilson wrote:
> > > The "mmio" writes into vgpu registers are simple memory traps from the
> > > guest into the host. We do not need to assert in the guest that the
> > > device is awake for the io as we do not write to the device itself.
> > > 
> > > However, over time we have refactored all the mmio accessors with the
> > > result that the vgpu reuses the gen2 accessors and so inherits the
> > > assert for runtime-pm of the native device. The assert though has
> > > actually been there since commit 3be0bf5acca6 ("drm/i915: Create vGPU
> > > specific MMIO operations to reduce traps").
> > > 
> > > References: 3be0bf5acca6 ("drm/i915: Create vGPU specific MMIO operations to reduce traps")
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Yan Zhao <yan.y.zhao@intel.com>
> > > Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> > > ---
> > 
> > Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> > 
> > Thanks!
> > 
> > >  drivers/gpu/drm/i915/intel_uncore.c | 27 ++++++++++++++++++++++++++-
> > >  1 file changed, 26 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> > > index f5edee17902a..6d3310794d0f 100644
> > > --- a/drivers/gpu/drm/i915/intel_uncore.c
> > > +++ b/drivers/gpu/drm/i915/intel_uncore.c
> > > @@ -1209,6 +1209,18 @@ unclaimed_reg_debug(struct intel_uncore *uncore,
> > >  		spin_unlock(&uncore->debug->lock);
> > >  }
> > >  
> > > +#define __vgpu_read(x) \
> > > +static u##x \
> > > +vgpu_read##x(struct intel_uncore *uncore, i915_reg_t reg, bool trace) { \
> > > +	u##x val = __raw_uncore_read##x(uncore, reg); \
> > > +	trace_i915_reg_rw(false, reg, val, sizeof(val), trace); \
> > > +	return val; \
> > > +}
> > > +__vgpu_read(8)
> > > +__vgpu_read(16)
> > > +__vgpu_read(32)
> > > +__vgpu_read(64)
> > > +
> > >  #define GEN2_READ_HEADER(x) \
> > >  	u##x val = 0; \
> > >  	assert_rpm_wakelock_held(uncore->rpm);
> > > @@ -1414,6 +1426,16 @@ __gen_reg_write_funcs(gen8);
> > >  #undef GEN6_WRITE_FOOTER
> > >  #undef GEN6_WRITE_HEADER
> > >  
> > > +#define __vgpu_write(x) \
> > > +static void \
> > > +vgpu_write##x(struct intel_uncore *uncore, i915_reg_t reg, u##x val, bool trace) { \
> > > +	trace_i915_reg_rw(true, reg, val, sizeof(val), trace); \
> > > +	__raw_uncore_write##x(uncore, reg, val); \
> > > +}
> > > +__vgpu_write(8)
> > > +__vgpu_write(16)
> > > +__vgpu_write(32)
> > > +
> > >  #define ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, x) \
> > >  do { \
> > >  	(uncore)->funcs.mmio_writeb = x##_write8; \
> > > @@ -1735,7 +1757,10 @@ static void uncore_raw_init(struct intel_uncore *uncore)
> > >  {
> > >  	GEM_BUG_ON(intel_uncore_has_forcewake(uncore));
> > >  
> > > -	if (IS_GEN(uncore->i915, 5)) {
> > > +	if (intel_vgpu_active(uncore->i915)) {
> > > +		ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, vgpu);
> > > +		ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, vgpu);
> > > +	} else if (IS_GEN(uncore->i915, 5)) {
> > >  		ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, gen5);
> > >  		ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, gen5);
> > >  	} else {
> > > -- 
> > > 2.20.1
> > > 
> > 
> > -- 
> > 
> > $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
> 
> 
> 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> -- 
> 
> $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827



-- 

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-10-19  9:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  3:02 [Intel-gfx] [PATCH] drm/i915/gt:fix raw-wakeref not held calltrace in vGPU Yan Zhao
2020-08-11  3:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2020-08-11  4:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-11  5:38 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-08-11  8:26 ` [Intel-gfx] [PATCH] " Chris Wilson
2020-08-11  8:18   ` Yan Zhao
2020-08-11  8:39   ` Zhenyu Wang
2020-08-11  9:25 ` [Intel-gfx] [PATCH] drm/i915: Drop runtime-pm assert from vgpu io accessors Chris Wilson
2020-08-12  2:06   ` Zhenyu Wang
2020-08-19  8:32     ` Zhenyu Wang
2020-10-19  9:37       ` Zhenyu Wang [this message]
2020-10-20  9:41         ` Chris Wilson
2020-08-11 10:29 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gt:fix raw-wakeref not held calltrace in vGPU (rev2) Patchwork
2020-08-11 10:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-11 13:25 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20201019093738.GS27141@zhen-hp.sh.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yan.y.zhao@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