diff mbox

[2/2] drm/i915: Remove two invalid warns

Message ID 1477404024-2864-2-git-send-email-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin Oct. 25, 2016, 2 p.m. UTC
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(-)

Comments

Chris Wilson Oct. 25, 2016, 2:09 p.m. UTC | #1
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
Tvrtko Ursulin Oct. 25, 2016, 2:12 p.m. UTC | #2
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
Tvrtko Ursulin Oct. 25, 2016, 2:16 p.m. UTC | #3
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
Chris Wilson Oct. 25, 2016, 2:26 p.m. UTC | #4
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
diff mbox

Patch

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));
 }
 
 /**