* [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling
@ 2015-04-15 15:39 Chris Wilson
2015-04-16 4:55 ` shuang.he
2015-04-16 9:03 ` Daniel Vetter
0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2015-04-15 15:39 UTC (permalink / raw)
To: intel-gfx
Since the removal of the user pin_ioctl, the only means for pinning an
object is either through binding to the scanout or during execbuf
reservation. As the later prevents a call to set-tiling, we need only
check if the obj is pinned into the display plane to see if we need
reject the set-tiling ioctl.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
index e1fa1d9aec6c..fd1b89a4d02d 100644
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -338,7 +338,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
}
mutex_lock(&dev->struct_mutex);
- if (i915_gem_obj_is_pinned(obj) || obj->framebuffer_references) {
+ if (obj->pin_display || obj->framebuffer_references) {
ret = -EBUSY;
goto err;
}
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling
2015-04-15 15:39 [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling Chris Wilson
@ 2015-04-16 4:55 ` shuang.he
2015-04-16 9:03 ` Daniel Vetter
1 sibling, 0 replies; 5+ messages in thread
From: shuang.he @ 2015-04-16 4:55 UTC (permalink / raw)
To: shuang.he, ethan.gao, intel-gfx, chris
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6203
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276
ILK 302/302 302/302
SNB 318/318 318/318
IVB 341/341 341/341
BYT 287/287 287/287
HSW -2 395/395 393/395
BDW 318/318 318/318
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*HSW igt@gem_pwrite_pread@snooped-pwrite-blt-cpu_mmap-performance PASS(6) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:i915_hangcheck_elapsed[i915]]*ERROR*Hangcheck_timer_elapsed...blitter_ring_idle@Hangcheck timer elapsed... blitter ring idle
*HSW igt@gem_pwrite_pread@uncached-copy-performance PASS(2) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:i915_hangcheck_elapsed[i915]]*ERROR*Hangcheck_timer_elapsed...blitter_ring_idle@Hangcheck timer elapsed... blitter ring idle
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling
2015-04-15 15:39 [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling Chris Wilson
2015-04-16 4:55 ` shuang.he
@ 2015-04-16 9:03 ` Daniel Vetter
2015-04-16 10:50 ` Chris Wilson
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2015-04-16 9:03 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Wed, Apr 15, 2015 at 04:39:59PM +0100, Chris Wilson wrote:
> Since the removal of the user pin_ioctl, the only means for pinning an
> object is either through binding to the scanout or during execbuf
> reservation. As the later prevents a call to set-tiling, we need only
> check if the obj is pinned into the display plane to see if we need
> reject the set-tiling ioctl.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index e1fa1d9aec6c..fd1b89a4d02d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -338,7 +338,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
> }
>
> mutex_lock(&dev->struct_mutex);
> - if (i915_gem_obj_is_pinned(obj) || obj->framebuffer_references) {
> + if (obj->pin_display || obj->framebuffer_references) {
> ret = -EBUSY;
> goto err;
> }
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling
2015-04-16 9:03 ` Daniel Vetter
@ 2015-04-16 10:50 ` Chris Wilson
2015-04-16 14:08 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2015-04-16 10:50 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
On Thu, Apr 16, 2015 at 11:03:20AM +0200, Daniel Vetter wrote:
> On Wed, Apr 15, 2015 at 04:39:59PM +0100, Chris Wilson wrote:
> > Since the removal of the user pin_ioctl, the only means for pinning an
> > object is either through binding to the scanout or during execbuf
> > reservation. As the later prevents a call to set-tiling, we need only
> > check if the obj is pinned into the display plane to see if we need
> > reject the set-tiling ioctl.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Queued for -next, thanks for the patch.
I was wondering if I could get away with framebuffer_references now that
we do allocate fb for everything, but was too lazy to actually check.
Gut feeling?
-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] 5+ messages in thread
* Re: [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling
2015-04-16 10:50 ` Chris Wilson
@ 2015-04-16 14:08 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2015-04-16 14:08 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, intel-gfx
On Thu, Apr 16, 2015 at 11:50:04AM +0100, Chris Wilson wrote:
> On Thu, Apr 16, 2015 at 11:03:20AM +0200, Daniel Vetter wrote:
> > On Wed, Apr 15, 2015 at 04:39:59PM +0100, Chris Wilson wrote:
> > > Since the removal of the user pin_ioctl, the only means for pinning an
> > > object is either through binding to the scanout or during execbuf
> > > reservation. As the later prevents a call to set-tiling, we need only
> > > check if the obj is pinned into the display plane to see if we need
> > > reject the set-tiling ioctl.
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >
> > Queued for -next, thanks for the patch.
>
> I was wondering if I could get away with framebuffer_references now that
> we do allocate fb for everything, but was too lazy to actually check.
>
> Gut feeling?
legacy overlay is still using plain buffers unfortunately :(
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-16 14:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15 15:39 [PATCH] drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling Chris Wilson
2015-04-16 4:55 ` shuang.he
2015-04-16 9:03 ` Daniel Vetter
2015-04-16 10:50 ` Chris Wilson
2015-04-16 14:08 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox