<div dir="ltr">Hi Mario<div><br></div><div>That fixes the tearing, it's been replaced with a strange stutter, like it's only showing half the number of frames being reported - it's really noticeable in tomb raider</div><div><br></div><div>Thanks for your work on this, the stutter is much more manageable than the tearing was</div><div><br></div><div>I've attached the patch that applies cleanly to 4.10-wip</div><div><br></div><div> <br><br><div class="gmail_quote"><div dir="ltr">On Fri, 28 Oct 2016 at 18:37 Mario Kleiner <<a href="mailto:mario.kleiner.de@gmail.com">mario.kleiner.de@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
<br class="gmail_msg">
On 10/28/2016 03:34 AM, Michel Dänzer wrote:<br class="gmail_msg">
> On 27/10/16 10:33 PM, Mike Lothian wrote:<br class="gmail_msg">
>><br class="gmail_msg">
>> Just another gentle ping to see where you are with this?<br class="gmail_msg">
><br class="gmail_msg">
> I haven't got a chance to look into this any further.<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
Fwiw., as a proof of concept, the attached experimental patch does work<br class="gmail_msg">
as tested on Intel HD Haswell + AMD R9 380 Tonga under amdgpu and<br class="gmail_msg">
DRI3/Present when applied to drm-next (updated from a few days ago).<br class="gmail_msg">
With DRI_PRIME=1 tearing for page-flipped fullscreen windows is gone<br class="gmail_msg">
under all loads. The tearing with "windowed" windows now looks as<br class="gmail_msg">
expected for regular tearing not related to Prime.<br class="gmail_msg">
<br class="gmail_msg">
ftrace confirms the i915 driver's pageflip function is waiting on the<br class="gmail_msg">
fence in reservation_object_wait_timeout_rcu() as it should.<br class="gmail_msg">
<br class="gmail_msg">
That entry->tv.shared needs to be set false for such buffers in<br class="gmail_msg">
amdgpu_bo_list_set() makes sense to me, as that is part of the buffer<br class="gmail_msg">
validation for command stream submission. There are other places in the<br class="gmail_msg">
driver where tv.shared is set, which i didn't check so far.<br class="gmail_msg">
<br class="gmail_msg">
I don't know which of these would need to be updated with a "exported<br class="gmail_msg">
bo" check as well, e.g., for video decoding or maybe gpu compute? Adding<br class="gmail_msg">
or removing the check to amdgpu_gem_va_update_vm(), e.g., made no<br class="gmail_msg">
difference. I assume that makes sense because that functions seems to<br class="gmail_msg">
deal with amdgpu internal vm page tables or page table entries for such<br class="gmail_msg">
a bo, not with something visible to external clients?<br class="gmail_msg">
<br class="gmail_msg">
All i can say is it fixes 3D rendering under DRI3 + Prime + pageflipping<br class="gmail_msg">
without causing any obvious new problems.<br class="gmail_msg">
<br class="gmail_msg">
-mario<br class="gmail_msg">
</blockquote></div></div></div>