All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Take rpm wakelock around debugfs/i915_gpu_info
@ 2017-03-28 13:14 Chris Wilson
  2017-03-28 13:22 ` Mika Kuoppala
  2017-03-28 14:09 ` ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-03-28 13:14 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

Capturing GPU state requires the device to be awake in order to read
registers. Normally, this is taken along the error handler, but for the
direct debugfs access, we cannot make assumptions about the current
device state and so either need to wake it up, or abort.

Fixes: 5a4c6f1b1b2d ("drm/i915: The return of i915_gpu_info to debugfs")
Testcase: igt/pm_rpm/debugfs-read
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index db5d8efd07d1..de8ad2efa3f8 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1012,9 +1012,12 @@ static int gpu_state_release(struct inode *inode, struct file *file)
 
 static int i915_gpu_info_open(struct inode *inode, struct file *file)
 {
+	struct drm_i915_private *i915 = inode->i_private;
 	struct i915_gpu_state *gpu;
 
-	gpu = i915_capture_gpu_state(inode->i_private);
+	intel_runtime_pm_get(i915);
+	gpu = i915_capture_gpu_state(i915);
+	intel_runtime_pm_put(i915);
 	if (!gpu)
 		return -ENOMEM;
 
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Take rpm wakelock around debugfs/i915_gpu_info
  2017-03-28 13:14 [PATCH] drm/i915: Take rpm wakelock around debugfs/i915_gpu_info Chris Wilson
@ 2017-03-28 13:22 ` Mika Kuoppala
  2017-03-28 15:01   ` Chris Wilson
  2017-03-28 14:09 ` ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2017-03-28 13:22 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Capturing GPU state requires the device to be awake in order to read
> registers. Normally, this is taken along the error handler, but for the
> direct debugfs access, we cannot make assumptions about the current
> device state and so either need to wake it up, or abort.
>
> Fixes: 5a4c6f1b1b2d ("drm/i915: The return of i915_gpu_info to debugfs")
> Testcase: igt/pm_rpm/debugfs-read
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

doh

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index db5d8efd07d1..de8ad2efa3f8 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1012,9 +1012,12 @@ static int gpu_state_release(struct inode *inode, struct file *file)
>  
>  static int i915_gpu_info_open(struct inode *inode, struct file *file)
>  {
> +	struct drm_i915_private *i915 = inode->i_private;
>  	struct i915_gpu_state *gpu;
>  
> -	gpu = i915_capture_gpu_state(inode->i_private);
> +	intel_runtime_pm_get(i915);
> +	gpu = i915_capture_gpu_state(i915);
> +	intel_runtime_pm_put(i915);
>  	if (!gpu)
>  		return -ENOMEM;
>  
> -- 
> 2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Take rpm wakelock around debugfs/i915_gpu_info
  2017-03-28 13:14 [PATCH] drm/i915: Take rpm wakelock around debugfs/i915_gpu_info Chris Wilson
  2017-03-28 13:22 ` Mika Kuoppala
@ 2017-03-28 14:09 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-03-28 14:09 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Take rpm wakelock around debugfs/i915_gpu_info
URL   : https://patchwork.freedesktop.org/series/22012/
State : success

== Summary ==

Series 22012v1 drm/i915: Take rpm wakelock around debugfs/i915_gpu_info
https://patchwork.freedesktop.org/api/1.0/series/22012/revisions/1/mbox/

Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                pass       -> FAIL       (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                dmesg-warn -> PASS       (fi-kbl-7560u) fdo#100428

fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#100428 https://bugs.freedesktop.org/show_bug.cgi?id=100428

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 455s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time: 464s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 591s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 544s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 581s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 506s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 506s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 434s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 436s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 439s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 521s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 521s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 486s
fi-kbl-7560u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 596s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 478s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time: 603s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 498s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 524s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time: 460s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 548s
fi-snb-2600      total:278  pass:248  dwarn:0   dfail:0   fail:1   skip:29  time: 422s

c7e901017cf0ba2aa648a6721102380622bae524 drm-tip: 2017y-03m-28d-13h-07m-35s UTC integration manifest
f78db2a drm/i915: Take rpm wakelock around debugfs/i915_gpu_info

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4325/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Take rpm wakelock around debugfs/i915_gpu_info
  2017-03-28 13:22 ` Mika Kuoppala
@ 2017-03-28 15:01   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-03-28 15:01 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Tue, Mar 28, 2017 at 04:22:40PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Capturing GPU state requires the device to be awake in order to read
> > registers. Normally, this is taken along the error handler, but for the
> > direct debugfs access, we cannot make assumptions about the current
> > device state and so either need to wake it up, or abort.
> >
> > Fixes: 5a4c6f1b1b2d ("drm/i915: The return of i915_gpu_info to debugfs")
> > Testcase: igt/pm_rpm/debugfs-read
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> 
> doh

More yawn than doh. Who would want to look at the gpu state when it's
not doing anything and then complain it was asleep? :)

Pushed,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-28 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 13:14 [PATCH] drm/i915: Take rpm wakelock around debugfs/i915_gpu_info Chris Wilson
2017-03-28 13:22 ` Mika Kuoppala
2017-03-28 15:01   ` Chris Wilson
2017-03-28 14:09 ` ✓ Fi.CI.BAT: success for " Patchwork

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.