[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-11-05 Thread Mario Kleiner
On 10/28/2016 07:48 PM, Christian König wrote: > Am 28.10.2016 um 19:37 schrieb Mario Kleiner: >> >> >> On 10/28/2016 03:34 AM, Michel Dänzer wrote: >>> On 27/10/16 10:33 PM, Mike Lothian wrote: Just another gentle ping to see where you are with this? >>> >>> I haven't got a chance

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-31 Thread Michel Dänzer
On 31/10/16 05:00 PM, Christian König wrote: > Am 31.10.2016 um 07:44 schrieb Michel Dänzer: >> On 29/10/16 10:58 PM, Mike Lothian wrote: >>> I turned on vsync and everything works great in tomb raider >>> >>> :D >>> >>> Thanks again to everyone who made this possible >>> >>> On Fri, 28 Oct 2016

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-31 Thread Michel Dänzer
On 29/10/16 10:58 PM, Mike Lothian wrote: > I turned on vsync and everything works great in tomb raider > > :D > > Thanks again to everyone who made this possible > > On Fri, 28 Oct 2016 at 19:37 Mike Lothian > wrote: > > Hi Mario > > That fixes the

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-31 Thread Michel Dänzer
On 29/10/16 02:37 AM, Mario Kleiner wrote: > On 10/28/2016 03:34 AM, Michel Dänzer wrote: >> On 27/10/16 10:33 PM, Mike Lothian wrote: >>> >>> Just another gentle ping to see where you are with this? >> >> I haven't got a chance to look into this any further. > > Fwiw., as a proof of concept,

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-31 Thread Christian König
Am 31.10.2016 um 07:44 schrieb Michel Dänzer: > On 29/10/16 10:58 PM, Mike Lothian wrote: >> I turned on vsync and everything works great in tomb raider >> >> :D >> >> Thanks again to everyone who made this possible >> >> On Fri, 28 Oct 2016 at 19:37 Mike Lothian >

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-29 Thread Mike Lothian
I turned on vsync and everything works great in tomb raider :D Thanks again to everyone who made this possible On Fri, 28 Oct 2016 at 19:37 Mike Lothian wrote: > Hi Mario > > That fixes the tearing, it's been replaced with a strange stutter, like > it's only showing half the number of frames

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-28 Thread Christian König
Am 28.10.2016 um 19:37 schrieb Mario Kleiner: > > > On 10/28/2016 03:34 AM, Michel Dänzer wrote: >> On 27/10/16 10:33 PM, Mike Lothian wrote: >>> >>> Just another gentle ping to see where you are with this? >> >> I haven't got a chance to look into this any further. >> >> > > Fwiw., as a proof of

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-28 Thread Mario Kleiner
On 10/28/2016 03:34 AM, Michel Dänzer wrote: > On 27/10/16 10:33 PM, Mike Lothian wrote: >> >> Just another gentle ping to see where you are with this? > > I haven't got a chance to look into this any further. > > Fwiw., as a proof of concept, the attached experimental patch does work as

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-28 Thread Mike Lothian
Hi Mario 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 Thanks for your work on this, the stutter is much more manageable than the tearing was I've attached the patch that

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-28 Thread Michel Dänzer
On 27/10/16 10:33 PM, Mike Lothian wrote: > > Just another gentle ping to see where you are with this? I haven't got a chance to look into this any further. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-27 Thread Mike Lothian
Hi Just another gentle ping to see where you are with this? Cheers Mike On Wed, 12 Oct 2016 at 01:40 Michel Dänzer wrote: > On 11/10/16 09:04 PM, Christian König wrote: > > Am 11.10.2016 um 05:58 schrieb Michel Dänzer: > >> On 07/10/16 09:34 PM, Mike Lothian wrote: > >>> This has

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-12 Thread Michel Dänzer
On 11/10/16 09:04 PM, Christian König wrote: > Am 11.10.2016 um 05:58 schrieb Michel Dänzer: >> On 07/10/16 09:34 PM, Mike Lothian wrote: >>> This has discussion has gone a little quiet >>> >>> Was there any agreement about what needed doing to get this working >>> for i965/amdgpu? >> Christian,

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-11 Thread Christian König
Am 11.10.2016 um 05:58 schrieb Michel Dänzer: > On 07/10/16 09:34 PM, Mike Lothian wrote: >> This has discussion has gone a little quiet >> >> Was there any agreement about what needed doing to get this working >> for i965/amdgpu? > Christian, do you see anything which could prevent the solution

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-11 Thread Michel Dänzer
On 07/10/16 09:34 PM, Mike Lothian wrote: > > This has discussion has gone a little quiet > > Was there any agreement about what needed doing to get this working > for i965/amdgpu? Christian, do you see anything which could prevent the solution I outlined from working? -- Earthling Michel

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-10-07 Thread Mike Lothian
Hi This has discussion has gone a little quiet Was there any agreement about what needed doing to get this working for i965/amdgpu? Regards Mike On Mon, 26 Sep 2016 at 09:04 Daniel Vetter wrote: > > On Mon, Sep 26, 2016 at 09:48:37AM +0900, Michel Dänzer wrote: > > On 23/09/16 09:09 PM,

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-26 Thread Daniel Vetter
On Mon, Sep 26, 2016 at 09:48:37AM +0900, Michel Dänzer wrote: > On 23/09/16 09:09 PM, Daniel Vetter wrote: > > On Fri, Sep 23, 2016 at 07:00:25PM +0900, Michel Dänzer wrote: > >> On 22/09/16 10:22 PM, Christian König wrote: > >>> Am 22.09.2016 um 15:05 schrieb Daniel Vetter: > > But

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-26 Thread Michel Dänzer
On 23/09/16 09:09 PM, Daniel Vetter wrote: > On Fri, Sep 23, 2016 at 07:00:25PM +0900, Michel Dänzer wrote: >> On 22/09/16 10:22 PM, Christian König wrote: >>> Am 22.09.2016 um 15:05 schrieb Daniel Vetter: But the current approach in amdgpu_sync.c of declaring a fence as

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-23 Thread Michel Dänzer
On 22/09/16 10:22 PM, Christian König wrote: > Am 22.09.2016 um 15:05 schrieb Daniel Vetter: >> On Thu, Sep 22, 2016 at 2:44 PM, Christian König >> wrote: - explicit fencing: Userspace passes around distinct fence objects for any work going on on the gpu. The kernel doesn't insert any

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-23 Thread Daniel Vetter
On Fri, Sep 23, 2016 at 07:00:25PM +0900, Michel Dänzer wrote: > On 22/09/16 10:22 PM, Christian König wrote: > > Am 22.09.2016 um 15:05 schrieb Daniel Vetter: > >> On Thu, Sep 22, 2016 at 2:44 PM, Christian König > >> wrote: > - explicit fencing: Userspace passes around distinct fence

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Christian König
Am 22.09.2016 um 15:05 schrieb Daniel Vetter: > On Thu, Sep 22, 2016 at 2:44 PM, Christian König > wrote: >>> - explicit fencing: Userspace passes around distinct fence objects for >>> any work going on on the gpu. The kernel doesn't insert any stall of >>> it's own (except for moving buffer

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Daniel Vetter
On Thu, Sep 22, 2016 at 2:44 PM, Christian König wrote: >> - explicit fencing: Userspace passes around distinct fence objects for >> any work going on on the gpu. The kernel doesn't insert any stall of >> it's own (except for moving buffer objects around ofc). This is what >> Android. This also

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Daniel Vetter
On Thu, Sep 22, 2016 at 12:55 PM, Christian König wrote: > Am 22.09.2016 um 08:36 schrieb Daniel Vetter: >> >> On Wed, Sep 21, 2016 at 06:23:35PM +0200, Christian König wrote: >>> >>> For a quick workaround I suggest to just serialize all accesses to BO >>> shared >>> with different drivers,

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Daniel Vetter
On Wed, Sep 21, 2016 at 06:23:35PM +0200, Christian König wrote: > For a quick workaround I suggest to just serialize all accesses to BO shared > with different drivers, but essentially I think it is a perfectly valid > requirement to have multiple writers to one BO. It is, but it's not possible

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Daniel Vetter
On Thu, Sep 22, 2016 at 12:07:24AM +0900, Michel Dänzer wrote: > On 21/09/16 09:56 PM, Daniel Vetter wrote: > > On Wed, Sep 21, 2016 at 1:19 PM, Christian König > > wrote: > >> Am 21.09.2016 um 13:04 schrieb Daniel Vetter: > >>> On Wed, Sep 21, 2016 at 12:30 PM, Christian König > >>> wrote: >

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Michel Dänzer
On 22/09/16 12:15 AM, Christian König wrote: > Am 21.09.2016 um 17:07 schrieb Michel Dänzer: >> On 21/09/16 09:56 PM, Daniel Vetter wrote: >>> On Wed, Sep 21, 2016 at 1:19 PM, Christian König >>> wrote: We use multiple writers without implicit syncing between processes in the

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Michel Dänzer
On 22/09/16 12:21 AM, Christian König wrote: > Am 21.09.2016 um 17:13 schrieb Michel Dänzer: >> On 21/09/16 07:30 PM, Christian König wrote: >>> Am 21.09.2016 um 11:56 schrieb Michel Dänzer: FWIW, we seem to have the same issue with radeon vs. amdgpu: radeon only seems to wait

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Michel Dänzer
On 21/09/16 07:30 PM, Christian König wrote: > Am 21.09.2016 um 11:56 schrieb Michel Dänzer: >> >> FWIW, we seem to have the same issue with radeon vs. amdgpu: radeon only >> seems to wait for exclusive fences, so e.g. running Xorg on amdgpu and >> using PRIME slave scanout on radeon leaves

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-22 Thread Michel Dänzer
On 21/09/16 09:56 PM, Daniel Vetter wrote: > On Wed, Sep 21, 2016 at 1:19 PM, Christian König > wrote: >> Am 21.09.2016 um 13:04 schrieb Daniel Vetter: >>> On Wed, Sep 21, 2016 at 12:30 PM, Christian König >>> wrote: Am 21.09.2016 um 11:56 schrieb Michel Dänzer: > > > Looks

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Michel Dänzer
On 13/09/16 09:52 PM, Christian König wrote: > Am 13.09.2016 um 11:39 schrieb Chris Wilson: >> On Tue, Sep 13, 2016 at 10:44:11AM +0200, Christian König wrote: >>> Am 09.09.2016 um 03:15 schrieb Michel Dänzer: On 09/09/16 01:23 AM, Chris Wilson wrote: > On Thu, Sep 08, 2016 at

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Christian König
Am 21.09.2016 um 17:29 schrieb Michel Dänzer: > On 22/09/16 12:15 AM, Christian König wrote: >> Am 21.09.2016 um 17:07 schrieb Michel Dänzer: >>> On 21/09/16 09:56 PM, Daniel Vetter wrote: On Wed, Sep 21, 2016 at 1:19 PM, Christian König wrote: > We use multiple writers without

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Christian König
Am 21.09.2016 um 17:13 schrieb Michel Dänzer: > On 21/09/16 07:30 PM, Christian König wrote: >> Am 21.09.2016 um 11:56 schrieb Michel Dänzer: >>> FWIW, we seem to have the same issue with radeon vs. amdgpu: radeon only >>> seems to wait for exclusive fences, so e.g. running Xorg on amdgpu and

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Christian König
Am 21.09.2016 um 17:07 schrieb Michel Dänzer: > On 21/09/16 09:56 PM, Daniel Vetter wrote: >> On Wed, Sep 21, 2016 at 1:19 PM, Christian König >> wrote: >>> Am 21.09.2016 um 13:04 schrieb Daniel Vetter: On Wed, Sep 21, 2016 at 12:30 PM, Christian König wrote: > Am 21.09.2016 um

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Daniel Vetter
On Wed, Sep 21, 2016 at 1:19 PM, Christian König wrote: > Am 21.09.2016 um 13:04 schrieb Daniel Vetter: >> >> On Wed, Sep 21, 2016 at 12:30 PM, Christian König >> wrote: >>> >>> Am 21.09.2016 um 11:56 schrieb Michel Dänzer: Looks like there are different interpretations of the

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Christian König
Am 21.09.2016 um 13:04 schrieb Daniel Vetter: > On Wed, Sep 21, 2016 at 12:30 PM, Christian König > wrote: >> Am 21.09.2016 um 11:56 schrieb Michel Dänzer: >>> >>> Looks like there are different interpretations of the semantics of >>> exclusive vs. shared fences. Where are these semantics

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Daniel Vetter
On Wed, Sep 21, 2016 at 12:30 PM, Christian König wrote: > Am 21.09.2016 um 11:56 schrieb Michel Dänzer: >> >> >> Looks like there are different interpretations of the semantics of >> exclusive vs. shared fences. Where are these semantics documented? > > > Yeah, I think as well that this is the

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-21 Thread Christian König
Am 21.09.2016 um 11:56 schrieb Michel Dänzer: > > Looks like there are different interpretations of the semantics of > exclusive vs. shared fences. Where are these semantics documented? Yeah, I think as well that this is the primary question here. IIRC the fences were explicitly called

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-13 Thread Christian König
Am 13.09.2016 um 11:39 schrieb Chris Wilson: > On Tue, Sep 13, 2016 at 10:44:11AM +0200, Christian König wrote: >> Am 09.09.2016 um 03:15 schrieb Michel Dänzer: >>> On 09/09/16 01:23 AM, Chris Wilson wrote: On Thu, Sep 08, 2016 at 05:21:42PM +0200, Mario Kleiner wrote: > On 09/08/2016

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-13 Thread Christian König
Am 09.09.2016 um 03:15 schrieb Michel Dänzer: > On 09/09/16 01:23 AM, Chris Wilson wrote: >> On Thu, Sep 08, 2016 at 05:21:42PM +0200, Mario Kleiner wrote: >>> On 09/08/2016 08:30 AM, Chris Wilson wrote: On Thu, Sep 08, 2016 at 02:14:43AM +0200, Mario Kleiner wrote: > amdgpu-kms uses

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-13 Thread Chris Wilson
On Tue, Sep 13, 2016 at 10:44:11AM +0200, Christian König wrote: > Am 09.09.2016 um 03:15 schrieb Michel Dänzer: > >On 09/09/16 01:23 AM, Chris Wilson wrote: > >>On Thu, Sep 08, 2016 at 05:21:42PM +0200, Mario Kleiner wrote: > >>>On 09/08/2016 08:30 AM, Chris Wilson wrote: > On Thu, Sep 08,

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-09 Thread Michel Dänzer
On 09/09/16 01:23 AM, Chris Wilson wrote: > On Thu, Sep 08, 2016 at 05:21:42PM +0200, Mario Kleiner wrote: >> On 09/08/2016 08:30 AM, Chris Wilson wrote: >>> On Thu, Sep 08, 2016 at 02:14:43AM +0200, Mario Kleiner wrote: amdgpu-kms uses shared fences for its prime exported dmabufs,

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-08 Thread Chris Wilson
On Thu, Sep 08, 2016 at 05:21:42PM +0200, Mario Kleiner wrote: > On 09/08/2016 08:30 AM, Chris Wilson wrote: > >On Thu, Sep 08, 2016 at 02:14:43AM +0200, Mario Kleiner wrote: > >>amdgpu-kms uses shared fences for its prime exported dmabufs, > >>instead of an exclusive fence. Therefore we need to

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-08 Thread Mario Kleiner
On 09/08/2016 08:30 AM, Chris Wilson wrote: > On Thu, Sep 08, 2016 at 02:14:43AM +0200, Mario Kleiner wrote: >> amdgpu-kms uses shared fences for its prime exported dmabufs, >> instead of an exclusive fence. Therefore we need to wait for >> all fences of the dmabuf reservation object to prevent >>

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-08 Thread Chris Wilson
On Thu, Sep 08, 2016 at 02:14:43AM +0200, Mario Kleiner wrote: > amdgpu-kms uses shared fences for its prime exported dmabufs, > instead of an exclusive fence. Therefore we need to wait for > all fences of the dmabuf reservation object to prevent > unsynchronized rendering and flipping. No. Fix

[PATCH] drm/i915: Before pageflip, also wait for shared dmabuf fences.

2016-09-08 Thread Mario Kleiner
amdgpu-kms uses shared fences for its prime exported dmabufs, instead of an exclusive fence. Therefore we need to wait for all fences of the dmabuf reservation object to prevent unsynchronized rendering and flipping. This patch was tested to behave properly with intel-kms +