public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: get runtime PM reference around GEM set_tiling IOCTL
@ 2015-11-09 18:16 Imre Deak
  2015-11-09 20:56 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Imre Deak @ 2015-11-09 18:16 UTC (permalink / raw)
  To: intel-gfx

After fixing the same issue in the set_caching IOCTL and Chris' request
to check out the possibilities for an improved RPM ref handling I
noticed that we have the same issue in the set_tiling IOCTL. Fix this
up.I didn't see any bug reports about this one, but the GTT unbind
operation on this path accesses the HW, which needs the ref.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_tiling.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
index 8a6717c..7410f6c 100644
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -176,6 +176,8 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
 		return -EINVAL;
 	}
 
+	intel_runtime_pm_get(dev_priv);
+
 	mutex_lock(&dev->struct_mutex);
 	if (obj->pin_display || obj->framebuffer_references) {
 		ret = -EBUSY;
@@ -269,6 +271,8 @@ err:
 	drm_gem_object_unreference(&obj->base);
 	mutex_unlock(&dev->struct_mutex);
 
+	intel_runtime_pm_put(dev_priv);
+
 	return ret;
 }
 
-- 
2.5.0

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

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

* Re: [PATCH] drm/i915: get runtime PM reference around GEM set_tiling IOCTL
  2015-11-09 18:16 [PATCH] drm/i915: get runtime PM reference around GEM set_tiling IOCTL Imre Deak
@ 2015-11-09 20:56 ` Chris Wilson
  2015-11-17 16:51   ` Imre Deak
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2015-11-09 20:56 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

On Mon, Nov 09, 2015 at 08:16:26PM +0200, Imre Deak wrote:
> After fixing the same issue in the set_caching IOCTL and Chris' request
> to check out the possibilities for an improved RPM ref handling I
> noticed that we have the same issue in the set_tiling IOCTL. Fix this
> up.I didn't see any bug reports about this one, but the GTT unbind
> operation on this path accesses the HW, which needs the ref.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

The reason why we haven't seen a bug report is that we don't get the GTT
mismatch on gen4+ devices (i.e. those with runtime pm). However, for the
sake of completeness, it is better to wrap all the GGTT unbind access in
the rpm reference (and future patches to reduce the wakelock will be
more consistent).

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

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

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

* Re: [PATCH] drm/i915: get runtime PM reference around GEM set_tiling IOCTL
  2015-11-09 20:56 ` Chris Wilson
@ 2015-11-17 16:51   ` Imre Deak
  0 siblings, 0 replies; 3+ messages in thread
From: Imre Deak @ 2015-11-17 16:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On ma, 2015-11-09 at 20:56 +0000, Chris Wilson wrote:
> On Mon, Nov 09, 2015 at 08:16:26PM +0200, Imre Deak wrote:
> > After fixing the same issue in the set_caching IOCTL and Chris'
> > request
> > to check out the possibilities for an improved RPM ref handling I
> > noticed that we have the same issue in the set_tiling IOCTL. Fix
> > this
> > up.I didn't see any bug reports about this one, but the GTT unbind
> > operation on this path accesses the HW, which needs the ref.
> > 
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> 
> The reason why we haven't seen a bug report is that we don't get the
> GTT
> mismatch on gen4+ devices (i.e. those with runtime pm). However, for
> the
> sake of completeness, it is better to wrap all the GGTT unbind access
> in
> the rpm reference (and future patches to reduce the wakelock will be
> more consistent).
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Pushed to dinq. Thanks for the review.


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

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

end of thread, other threads:[~2015-11-17 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 18:16 [PATCH] drm/i915: get runtime PM reference around GEM set_tiling IOCTL Imre Deak
2015-11-09 20:56 ` Chris Wilson
2015-11-17 16:51   ` Imre Deak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox