All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Rotated view does not need a fence
@ 2016-10-25 14:00 Tvrtko Ursulin
  2016-10-25 14:00 ` [PATCH 2/2] drm/i915: Remove two invalid warns Tvrtko Ursulin
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 14:00 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

We do not need to set up a fence for the rotated view.

Display does not need it and no one can access it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index c241d8143255..c79d7ab75003 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -251,7 +251,8 @@ static inline bool i915_vma_is_ggtt(const struct i915_vma *vma)
 
 static inline bool i915_vma_is_map_and_fenceable(const struct i915_vma *vma)
 {
-	return vma->flags & I915_VMA_CAN_FENCE;
+	return vma->flags & I915_VMA_CAN_FENCE &&
+	       vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED;
 }
 
 static inline bool i915_vma_is_closed(const struct i915_vma *vma)
-- 
2.7.4

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

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

* [PATCH 2/2] drm/i915: Remove two invalid warns
  2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
@ 2016-10-25 14:00 ` Tvrtko Ursulin
  2016-10-25 14:09   ` Chris Wilson
  2016-10-25 14:07 ` [PATCH 1/2] drm/i915: Rotated view does not need a fence Chris Wilson
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 14:00 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Objects can have multiple VMAs used for display in which
case assertion that objects must not be pinned for display
more times than their single display related VMA is incorrect.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0e26ee96856e..96f48d2c971c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3595,8 +3595,6 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
 
 	vma->display_alignment = max_t(u64, vma->display_alignment, alignment);
 
-	WARN_ON(obj->pin_display > i915_vma_pin_count(vma));
-
 	i915_gem_object_flush_cpu_write_domain(obj);
 
 	old_write_domain = obj->base.write_domain;
@@ -3633,7 +3631,6 @@ i915_gem_object_unpin_from_display_plane(struct i915_vma *vma)
 		list_move_tail(&vma->vm_link, &vma->vm->inactive_list);
 
 	i915_vma_unpin(vma);
-	WARN_ON(vma->obj->pin_display > i915_vma_pin_count(vma));
 }
 
 /**
-- 
2.7.4

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

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

* Re: [PATCH 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
  2016-10-25 14:00 ` [PATCH 2/2] drm/i915: Remove two invalid warns Tvrtko Ursulin
@ 2016-10-25 14:07 ` Chris Wilson
  2016-10-25 16:40   ` [PATCH v2 " Tvrtko Ursulin
  2016-10-25 14:12 ` [PATCH " Ville Syrjälä
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2016-10-25 14:07 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

On Tue, Oct 25, 2016 at 03:00:23PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> We do not need to set up a fence for the rotated view.
> 
> Display does not need it and no one can access it.

See __i915_vma_set_map_and_fenceable. Stop the bit at source. And
include the above line as a comment.
-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] 18+ messages in thread

* Re: [PATCH 2/2] drm/i915: Remove two invalid warns
  2016-10-25 14:00 ` [PATCH 2/2] drm/i915: Remove two invalid warns Tvrtko Ursulin
@ 2016-10-25 14:09   ` Chris Wilson
  2016-10-25 14:12     ` Tvrtko Ursulin
  0 siblings, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2016-10-25 14:09 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

On Tue, Oct 25, 2016 at 03:00:24PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Objects can have multiple VMAs used for display in which
> case assertion that objects must not be pinned for display
> more times than their single display related VMA is incorrect.

But each of those vma are pinned, as many times as they are used by
display. This explanation doesn't hold.
-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] 18+ messages in thread

* Re: [PATCH 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
  2016-10-25 14:00 ` [PATCH 2/2] drm/i915: Remove two invalid warns Tvrtko Ursulin
  2016-10-25 14:07 ` [PATCH 1/2] drm/i915: Rotated view does not need a fence Chris Wilson
@ 2016-10-25 14:12 ` Ville Syrjälä
  2016-10-25 14:17   ` Chris Wilson
  2016-10-25 14:17   ` Tvrtko Ursulin
  2016-10-25 15:16 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Ville Syrjälä @ 2016-10-25 14:12 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

On Tue, Oct 25, 2016 at 03:00:23PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> We do not need to set up a fence for the rotated view.
> 
> Display does not need it and no one can access it.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Broken by 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to
the VMA") ?

> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> index c241d8143255..c79d7ab75003 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> @@ -251,7 +251,8 @@ static inline bool i915_vma_is_ggtt(const struct i915_vma *vma)
>  
>  static inline bool i915_vma_is_map_and_fenceable(const struct i915_vma *vma)
>  {
> -	return vma->flags & I915_VMA_CAN_FENCE;
> +	return vma->flags & I915_VMA_CAN_FENCE &&
> +	       vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED;
>  }
>  
>  static inline bool i915_vma_is_closed(const struct i915_vma *vma)
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 2/2] drm/i915: Remove two invalid warns
  2016-10-25 14:09   ` Chris Wilson
@ 2016-10-25 14:12     ` Tvrtko Ursulin
  2016-10-25 14:16       ` Tvrtko Ursulin
  2016-10-25 14:26       ` Chris Wilson
  0 siblings, 2 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 14:12 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx, Tvrtko Ursulin,
	Joonas Lahtinen, Ville Syrjälä


On 25/10/2016 15:09, Chris Wilson wrote:
> On Tue, Oct 25, 2016 at 03:00:24PM +0100, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Objects can have multiple VMAs used for display in which
>> case assertion that objects must not be pinned for display
>> more times than their single display related VMA is incorrect.
>
> But each of those vma are pinned, as many times as they are used by
> display. This explanation doesn't hold.

We can have a normal and a rotated vma, each pinned once, object pinned 
therefore pinned to display twice.

Regards,

Tvrtko

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

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

* Re: [PATCH 2/2] drm/i915: Remove two invalid warns
  2016-10-25 14:12     ` Tvrtko Ursulin
@ 2016-10-25 14:16       ` Tvrtko Ursulin
  2016-10-25 14:26       ` Chris Wilson
  1 sibling, 0 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 14:16 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx, Tvrtko Ursulin,
	Joonas Lahtinen, Ville Syrjälä


On 25/10/2016 15:12, Tvrtko Ursulin wrote:
>
> On 25/10/2016 15:09, Chris Wilson wrote:
>> On Tue, Oct 25, 2016 at 03:00:24PM +0100, Tvrtko Ursulin wrote:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> Objects can have multiple VMAs used for display in which
>>> case assertion that objects must not be pinned for display
>>> more times than their single display related VMA is incorrect.
>>
>> But each of those vma are pinned, as many times as they are used by
>> display. This explanation doesn't hold.
>
> We can have a normal and a rotated vma, each pinned once, object pinned
> therefore pinned to display twice.

P.S. I need a fixes tag for this as well. Looking for a suitable 
candidate in the VMA rewrite series.. suggestions welcome. :)

Regards,

Tvrtko

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

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

* Re: [PATCH 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:12 ` [PATCH " Ville Syrjälä
@ 2016-10-25 14:17   ` Chris Wilson
  2016-10-25 14:23     ` Ville Syrjälä
  2016-10-25 14:17   ` Tvrtko Ursulin
  1 sibling, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2016-10-25 14:17 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Intel-gfx

On Tue, Oct 25, 2016 at 05:12:22PM +0300, Ville Syrjälä wrote:
> On Tue, Oct 25, 2016 at 03:00:23PM +0100, Tvrtko Ursulin wrote:
> > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > 
> > We do not need to set up a fence for the rotated view.
> > 
> > Display does not need it and no one can access it.
> > 
> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 
> Broken by 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to
> the VMA") ?

Have a bug link? :)

There shouldn't be any fail other than reserving a fence, right?
-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] 18+ messages in thread

* Re: [PATCH 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:12 ` [PATCH " Ville Syrjälä
  2016-10-25 14:17   ` Chris Wilson
@ 2016-10-25 14:17   ` Tvrtko Ursulin
  1 sibling, 0 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 14:17 UTC (permalink / raw)
  To: Ville Syrjälä, Tvrtko Ursulin; +Cc: Intel-gfx


On 25/10/2016 15:12, Ville Syrjälä wrote:
> On Tue, Oct 25, 2016 at 03:00:23PM +0100, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> We do not need to set up a fence for the rotated view.
>>
>> Display does not need it and no one can access it.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>
> Broken by 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to
> the VMA") ?

Wasn't sure if this is considered a breakage. Will add when you made the 
effort to dig out the commit, thanks!

Regards,

Tvrtko

>
>> ---
>>  drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
>> index c241d8143255..c79d7ab75003 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
>> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
>> @@ -251,7 +251,8 @@ static inline bool i915_vma_is_ggtt(const struct i915_vma *vma)
>>
>>  static inline bool i915_vma_is_map_and_fenceable(const struct i915_vma *vma)
>>  {
>> -	return vma->flags & I915_VMA_CAN_FENCE;
>> +	return vma->flags & I915_VMA_CAN_FENCE &&
>> +	       vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED;
>>  }
>>
>>  static inline bool i915_vma_is_closed(const struct i915_vma *vma)
>> --
>> 2.7.4
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:17   ` Chris Wilson
@ 2016-10-25 14:23     ` Ville Syrjälä
  0 siblings, 0 replies; 18+ messages in thread
From: Ville Syrjälä @ 2016-10-25 14:23 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, Intel-gfx

On Tue, Oct 25, 2016 at 03:17:09PM +0100, Chris Wilson wrote:
> On Tue, Oct 25, 2016 at 05:12:22PM +0300, Ville Syrjälä wrote:
> > On Tue, Oct 25, 2016 at 03:00:23PM +0100, Tvrtko Ursulin wrote:
> > > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > > 
> > > We do not need to set up a fence for the rotated view.
> > > 
> > > Display does not need it and no one can access it.
> > > 
> > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > 
> > Broken by 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to
> > the VMA") ?
> 
> Have a bug link? :)
> 
> There shouldn't be any fail other than reserving a fence, right?

I suppose not. But doesn't hurt to toss in a Fixes tag anyway.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 2/2] drm/i915: Remove two invalid warns
  2016-10-25 14:12     ` Tvrtko Ursulin
  2016-10-25 14:16       ` Tvrtko Ursulin
@ 2016-10-25 14:26       ` Chris Wilson
  2016-10-25 16:41         ` [PATCH v2 " Tvrtko Ursulin
  1 sibling, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2016-10-25 14:26 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

On Tue, Oct 25, 2016 at 03:12:51PM +0100, Tvrtko Ursulin wrote:
> 
> On 25/10/2016 15:09, Chris Wilson wrote:
> >On Tue, Oct 25, 2016 at 03:00:24PM +0100, Tvrtko Ursulin wrote:
> >>From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>
> >>Objects can have multiple VMAs used for display in which
> >>case assertion that objects must not be pinned for display
> >>more times than their single display related VMA is incorrect.
> >
> >But each of those vma are pinned, as many times as they are used by
> >display. This explanation doesn't hold.
> 
> We can have a normal and a rotated vma, each pinned once, object
> pinned therefore pinned to display twice.

Oh, vma_pin_count not obj_pin_count. Bleh. Is the warn useful to keep,
and so we need to iterate over all vma? Probably not. Especially as we
then start asking questions like, should we track pin_display on the vma
as well for better accuracy in their assertion

s/their single dislay related/the current/

Ok, I don't have a great idea for replacing it with some other early
warning signal. With the slight tweak to the changelog,

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
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
                   ` (2 preceding siblings ...)
  2016-10-25 14:12 ` [PATCH " Ville Syrjälä
@ 2016-10-25 15:16 ` Patchwork
  2016-10-25 17:54 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3) Patchwork
  2016-10-26  7:46 ` ✓ Fi.CI.BAT: success " Patchwork
  5 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2016-10-25 15:16 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Rotated view does not need a fence
URL   : https://patchwork.freedesktop.org/series/14340/
State : warning

== Summary ==

Series 14340v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/14340/revisions/1/mbox/

Test drv_module_reload_basic:
                dmesg-warn -> PASS       (fi-skl-6770hq)
Test gem_exec_suspend:
        Subgroup basic-s3:
                dmesg-warn -> PASS       (fi-skl-6770hq)
Test kms_frontbuffer_tracking:
        Subgroup basic:
                fail       -> PASS       (fi-skl-6770hq)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-ilk-650)

fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:246  pass:204  dwarn:0   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-byt-n2820     total:246  pass:211  dwarn:0   dfail:0   fail:0   skip:35 
fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-hsw-4770r     total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23 
fi-ilk-650       total:246  pass:184  dwarn:1   dfail:0   fail:0   skip:61 
fi-ivb-3520m     total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26 
fi-ivb-3770      total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26 
fi-kbl-7200u     total:246  pass:222  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6260u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:246  pass:219  dwarn:4   dfail:0   fail:0   skip:23 
fi-skl-6700k     total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-6770hq    total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37 
fi-snb-2600      total:246  pass:208  dwarn:0   dfail:0   fail:0   skip:38 

3ce99d02d8f2b7d1414d20d5972f8e277b33693e drm-intel-nightly: 2016y-10m-25d-13h-55m-46s UTC integration manifest
36e261e drm/i915: Remove two invalid warns
ddb7358 drm/i915: Rotated view does not need a fence

Full results at https://intel-gfx-ci.01.org/CI/Patchwork_2811/

== Logs ==

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

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

* [PATCH v2 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 14:07 ` [PATCH 1/2] drm/i915: Rotated view does not need a fence Chris Wilson
@ 2016-10-25 16:40   ` Tvrtko Ursulin
  2016-10-25 19:55     ` Chris Wilson
  0 siblings, 1 reply; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 16:40 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

We do not need to set up a fence for the rotated view.

Display does not need it and no one can access it.

v2: Move code to __i915_vma_set_map_and_fenceable. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to the VMA")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9361c7b54a7f..eb524bdf0c35 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3790,7 +3790,12 @@ void __i915_vma_set_map_and_fenceable(struct i915_vma *vma)
 	mappable = (vma->node.start + fence_size <=
 		    dev_priv->ggtt.mappable_end);
 
-	if (mappable && fenceable)
+	/*
+	 * Explicitly disable for rotated VMA since the display does not
+	 * need the fence and the VMA is not accessible to other users.
+	 */
+	if (mappable && fenceable &&
+	    vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED)
 		vma->flags |= I915_VMA_CAN_FENCE;
 	else
 		vma->flags &= ~I915_VMA_CAN_FENCE;
-- 
2.7.4

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

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

* [PATCH v2 2/2] drm/i915: Remove two invalid warns
  2016-10-25 14:26       ` Chris Wilson
@ 2016-10-25 16:41         ` Tvrtko Ursulin
  0 siblings, 0 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-25 16:41 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Objects can have multiple VMAs used for display in which
case assertion that objects must not be pinned for display
more times than the current VMA is incorrect.

v2: Commit message update. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 058d88c4330f ("drm/i915: Track pinned VMA")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index eb524bdf0c35..87018df94d68 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3595,8 +3595,6 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
 
 	vma->display_alignment = max_t(u64, vma->display_alignment, alignment);
 
-	WARN_ON(obj->pin_display > i915_vma_pin_count(vma));
-
 	i915_gem_object_flush_cpu_write_domain(obj);
 
 	old_write_domain = obj->base.write_domain;
@@ -3633,7 +3631,6 @@ i915_gem_object_unpin_from_display_plane(struct i915_vma *vma)
 		list_move_tail(&vma->vm_link, &vma->vm->inactive_list);
 
 	i915_vma_unpin(vma);
-	WARN_ON(vma->obj->pin_display > i915_vma_pin_count(vma));
 }
 
 /**
-- 
2.7.4

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

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

* ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3)
  2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
                   ` (3 preceding siblings ...)
  2016-10-25 15:16 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
@ 2016-10-25 17:54 ` Patchwork
  2016-10-26  7:46 ` ✓ Fi.CI.BAT: success " Patchwork
  5 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2016-10-25 17:54 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3)
URL   : https://patchwork.freedesktop.org/series/14340/
State : failure

== Summary ==

Series 14340v3 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/14340/revisions/3/mbox/

Test drv_module_reload_basic:
                pass       -> SKIP       (fi-skl-6700hq)
Test gem_exec_suspend:
        Subgroup basic-s3:
                dmesg-warn -> PASS       (fi-skl-6700hq)
Test gem_ringfill:
        Subgroup basic-default-hang:
                pass       -> TIMEOUT    (fi-ivb-3520m)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (fi-skl-6700hq)
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (fi-skl-6700hq)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (fi-skl-6700hq)
Test prime_self_import:
        Subgroup basic-with_one_bo:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-with_one_bo_two_files:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-with_two_bos:
                pass       -> INCOMPLETE (fi-ivb-3520m)
Test prime_vgem:
        Subgroup basic-busy-default:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-fence-flip:
                skip       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-fence-mmap:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-fence-read:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-fence-wait-default:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-gtt:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-read:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-sync-default:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-wait-default:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup basic-write:
                pass       -> INCOMPLETE (fi-ivb-3520m)
Test vgem_basic:
        Subgroup create:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup debugfs:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup dmabuf-export:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup dmabuf-fence:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup dmabuf-fence-before:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup dmabuf-mmap:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup mmap:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup second-client:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup sysfs:
                pass       -> INCOMPLETE (fi-ivb-3520m)
        Subgroup unload:
                pass       -> INCOMPLETE (fi-ivb-3520m)

fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:246  pass:204  dwarn:0   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-byt-n2820     total:246  pass:211  dwarn:0   dfail:0   fail:0   skip:35 
fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-hsw-4770r     total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23 
fi-ilk-650       total:246  pass:185  dwarn:0   dfail:0   fail:0   skip:61 
fi-ivb-3520m     total:246  pass:197  dwarn:0   dfail:0   fail:0   skip:25 
fi-ivb-3770      total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26 
fi-kbl-7200u     total:246  pass:222  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6260u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:246  pass:222  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6700k     total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-6770hq    total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37 
fi-snb-2600      total:246  pass:208  dwarn:0   dfail:0   fail:0   skip:38 

9e8e859eec7e29c4ef33413560819617a7f9f6bf drm-intel-nightly: 2016y-10m-25d-16h-30m-11s UTC integration manifest
b116793 drm/i915: Remove two invalid warns
acd3753 drm/i915: Rotated view does not need a fence

Full results at https://intel-gfx-ci.01.org/CI/Patchwork_2815/

== Logs ==

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

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

* Re: [PATCH v2 1/2] drm/i915: Rotated view does not need a fence
  2016-10-25 16:40   ` [PATCH v2 " Tvrtko Ursulin
@ 2016-10-25 19:55     ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2016-10-25 19:55 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

On Tue, Oct 25, 2016 at 05:40:35PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> We do not need to set up a fence for the rotated view.
> 
> Display does not need it and no one can access it.
> 
> v2: Move code to __i915_vma_set_map_and_fenceable. (Chris Wilson)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to the VMA")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9361c7b54a7f..eb524bdf0c35 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3790,7 +3790,12 @@ void __i915_vma_set_map_and_fenceable(struct i915_vma *vma)
>  	mappable = (vma->node.start + fence_size <=
>  		    dev_priv->ggtt.mappable_end);
>  
> -	if (mappable && fenceable)
> +	/*
> +	 * Explicitly disable for rotated VMA since the display does not
> +	 * need the fence and the VMA is not accessible to other users.
> +	 */
> +	if (mappable && fenceable &&
> +	    vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED)
>  		vma->flags |= I915_VMA_CAN_FENCE;
>  	else
>  		vma->flags &= ~I915_VMA_CAN_FENCE;

Penciled i915_vma_is_rotated() onto the todo list.

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
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3)
  2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
                   ` (4 preceding siblings ...)
  2016-10-25 17:54 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3) Patchwork
@ 2016-10-26  7:46 ` Patchwork
  2016-10-26  8:10   ` Tvrtko Ursulin
  5 siblings, 1 reply; 18+ messages in thread
From: Patchwork @ 2016-10-26  7:46 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3)
URL   : https://patchwork.freedesktop.org/series/14340/
State : success

== Summary ==

Series 14340v3 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/14340/revisions/3/mbox/


fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:246  pass:204  dwarn:0   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-byt-n2820     total:246  pass:211  dwarn:0   dfail:0   fail:0   skip:35 
fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-hsw-4770r     total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23 
fi-ilk-650       total:246  pass:185  dwarn:0   dfail:0   fail:0   skip:61 
fi-ivb-3520m     total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26 
fi-ivb-3770      total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26 
fi-skl-6260u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-6700k     total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-6770hq    total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37 
fi-snb-2600      total:246  pass:208  dwarn:0   dfail:0   fail:0   skip:38 

f746a2112fbb563743acc132304075706551d123 drm-intel-nightly: 2016y-10m-25d-20h-02m-34s UTC integration manifest
8bf8257 drm/i915: Remove two invalid warns
c81be94 drm/i915: Rotated view does not need a fence

Full results at https://intel-gfx-ci.01.org/CI/Patchwork_2821/

== Logs ==

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

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

* Re: ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3)
  2016-10-26  7:46 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2016-10-26  8:10   ` Tvrtko Ursulin
  0 siblings, 0 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2016-10-26  8:10 UTC (permalink / raw)
  To: intel-gfx, Tvrtko Ursulin


On 26/10/2016 08:46, Patchwork wrote:
> == Series Details ==
>
> Series: series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3)
> URL   : https://patchwork.freedesktop.org/series/14340/
> State : success
>
> == Summary ==
>
> Series 14340v3 Series without cover letter
> https://patchwork.freedesktop.org/api/1.0/series/14340/revisions/3/mbox/
>
>
> fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15
> fi-bsw-n3050     total:246  pass:204  dwarn:0   dfail:0   fail:0   skip:42
> fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30
> fi-byt-j1900     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31
> fi-byt-n2820     total:246  pass:211  dwarn:0   dfail:0   fail:0   skip:35
> fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22
> fi-hsw-4770r     total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23
> fi-ilk-650       total:246  pass:185  dwarn:0   dfail:0   fail:0   skip:61
> fi-ivb-3520m     total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26
> fi-ivb-3770      total:246  pass:220  dwarn:0   dfail:0   fail:0   skip:26
> fi-skl-6260u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14
> fi-skl-6700hq    total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23
> fi-skl-6700k     total:246  pass:222  dwarn:1   dfail:0   fail:0   skip:23
> fi-skl-6770hq    total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14
> fi-snb-2520m     total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37
> fi-snb-2600      total:246  pass:208  dwarn:0   dfail:0   fail:0   skip:38
>
> f746a2112fbb563743acc132304075706551d123 drm-intel-nightly: 2016y-10m-25d-20h-02m-34s UTC integration manifest
> 8bf8257 drm/i915: Remove two invalid warns
> c81be94 drm/i915: Rotated view does not need a fence

Sweet success. :) Pushed to dinq, thanks for the review!

Regards,

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

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

end of thread, other threads:[~2016-10-26  8:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
2016-10-25 14:00 ` [PATCH 2/2] drm/i915: Remove two invalid warns Tvrtko Ursulin
2016-10-25 14:09   ` Chris Wilson
2016-10-25 14:12     ` Tvrtko Ursulin
2016-10-25 14:16       ` Tvrtko Ursulin
2016-10-25 14:26       ` Chris Wilson
2016-10-25 16:41         ` [PATCH v2 " Tvrtko Ursulin
2016-10-25 14:07 ` [PATCH 1/2] drm/i915: Rotated view does not need a fence Chris Wilson
2016-10-25 16:40   ` [PATCH v2 " Tvrtko Ursulin
2016-10-25 19:55     ` Chris Wilson
2016-10-25 14:12 ` [PATCH " Ville Syrjälä
2016-10-25 14:17   ` Chris Wilson
2016-10-25 14:23     ` Ville Syrjälä
2016-10-25 14:17   ` Tvrtko Ursulin
2016-10-25 15:16 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
2016-10-25 17:54 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3) Patchwork
2016-10-26  7:46 ` ✓ Fi.CI.BAT: success " Patchwork
2016-10-26  8:10   ` Tvrtko Ursulin

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.