Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Marek Olšák
Timeline semaphore waits (polling on memory) will be unmonitored and as fast as the roundtrip to memory. Semaphore writes will be slower because the copy of those write requests will also be forwarded to the kernel. Arbitrary writes are not protected by the hw but the kernel will take action agains

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 02:28:06PM -0400, Marek Olšák wrote: > The kernel will know who should touch the implicit-sync semaphore next, and > at the same time, the copy of all write requests to the implicit-sync > semaphore will be forwarded to the kernel for monitoring and bo_wait. > > Syncobjs co

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Marek Olšák
The kernel will know who should touch the implicit-sync semaphore next, and at the same time, the copy of all write requests to the implicit-sync semaphore will be forwarded to the kernel for monitoring and bo_wait. Syncobjs could either use the same monitored access as implicit sync or be complet

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 07:13:00PM +0200, Christian König wrote: > As long as we can figure out who touched to a certain sync object last that > would indeed work, yes. Don't you need to know who will touch it next, i.e. who is holding up your fence? Or maybe I'm just again totally confused. -Dani

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-14 Thread Christian König
As long as we can figure out who touched to a certain sync object last that would indeed work, yes. Christian. Am 14.06.21 um 19:10 schrieb Marek Olšák: The call to the hw scheduler has a limitation on the size of all parameters combined. I think we can only pass a 32-bit sequence number and

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-14 Thread Marek Olšák
The call to the hw scheduler has a limitation on the size of all parameters combined. I think we can only pass a 32-bit sequence number and a ~16-bit global (per-GPU) syncobj handle in one call and not much else. The syncobj handle can be an element index in a global (per-GPU) syncobj table and it

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-10 Thread Christian König
Hi guys, maybe soften that a bit. Reading from the shared memory of the user fence is ok for everybody. What we need to take more care of is the writing side. So my current thinking is that we allow read only access, but writing a new sequence value needs to go through the scheduler/kernel.

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-10 Thread Marek Olšák
Hi Daniel, We just talked about this whole topic internally and we came up to the conclusion that the hardware needs to understand sync object handles and have high-level wait and signal operations in the command stream. Sync objects will be backed by memory, but they won't be readable or writable

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-09 Thread Daniel Vetter
On Wed, Jun 09, 2021 at 03:58:26PM +0200, Christian König wrote: > Am 09.06.21 um 15:19 schrieb Daniel Vetter: > > [SNIP] > > > Yeah, we call this the lightweight and the heavyweight tlb flush. > > > > > > The lighweight can be used when you are sure that you don't have any of > > > the > > > PTE

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-09 Thread Christian König
Am 09.06.21 um 15:19 schrieb Daniel Vetter: [SNIP] Yeah, we call this the lightweight and the heavyweight tlb flush. The lighweight can be used when you are sure that you don't have any of the PTEs currently in flight in the 3D/DMA engine and you just need to invalidate the TLB. The heavyweigh

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-09 Thread Daniel Vetter
On Fri, Jun 04, 2021 at 01:27:15PM +0200, Christian König wrote: > Am 04.06.21 um 10:57 schrieb Daniel Vetter: > > On Fri, Jun 04, 2021 at 09:00:31AM +0200, Christian König wrote: > > > Am 02.06.21 um 21:19 schrieb Daniel Vetter: > > > > On Wed, Jun 02, 2021 at 08:52:38PM +0200, Christian König wro

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-04 Thread Christian König
Am 04.06.21 um 10:57 schrieb Daniel Vetter: On Fri, Jun 04, 2021 at 09:00:31AM +0200, Christian König wrote: Am 02.06.21 um 21:19 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 08:52:38PM +0200, Christian König wrote: Am 02.06.21 um 20:48 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 05:38:5

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-04 Thread Daniel Vetter
On Fri, Jun 04, 2021 at 09:00:31AM +0200, Christian König wrote: > Am 02.06.21 um 21:19 schrieb Daniel Vetter: > > On Wed, Jun 02, 2021 at 08:52:38PM +0200, Christian König wrote: > > > > > > Am 02.06.21 um 20:48 schrieb Daniel Vetter: > > > > On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-04 Thread Christian König
Am 02.06.21 um 21:19 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 08:52:38PM +0200, Christian König wrote: Am 02.06.21 um 20:48 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: Yes, we can't break anythi

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Marek Olšák
On Thu., Jun. 3, 2021, 15:18 Daniel Vetter, wrote: > On Thu, Jun 3, 2021 at 7:53 PM Marek Olšák wrote: > > > > Daniel, I think what you are suggesting is that we need to enable user > queues with the drm scheduler and dma_fence first, and once that works, we > can investigate how much of that ke

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Daniel Vetter
On Thu, Jun 3, 2021 at 7:53 PM Marek Olšák wrote: > > Daniel, I think what you are suggesting is that we need to enable user queues > with the drm scheduler and dma_fence first, and once that works, we can > investigate how much of that kernel logic can be moved to the hw. Would that > work? In

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Marek Olšák
Daniel, I think what you are suggesting is that we need to enable user queues with the drm scheduler and dma_fence first, and once that works, we can investigate how much of that kernel logic can be moved to the hw. Would that work? In theory it shouldn't matter whether the kernel does it or the hw

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Daniel Vetter
On Thu, Jun 3, 2021 at 12:55 PM Marek Olšák wrote: > > On Thu., Jun. 3, 2021, 06:03 Daniel Vetter, wrote: >> >> On Thu, Jun 03, 2021 at 04:20:18AM -0400, Marek Olšák wrote: >> > On Thu, Jun 3, 2021 at 3:47 AM Daniel Vetter wrote: >> > >> > > On Wed, Jun 02, 2021 at 11:16:39PM -0400, Marek Olšák

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Marek Olšák
On Thu., Jun. 3, 2021, 06:03 Daniel Vetter, wrote: > On Thu, Jun 03, 2021 at 04:20:18AM -0400, Marek Olšák wrote: > > On Thu, Jun 3, 2021 at 3:47 AM Daniel Vetter wrote: > > > > > On Wed, Jun 02, 2021 at 11:16:39PM -0400, Marek Olšák wrote: > > > > On Wed, Jun 2, 2021 at 2:48 PM Daniel Vetter >

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Daniel Vetter
On Thu, Jun 03, 2021 at 04:20:18AM -0400, Marek Olšák wrote: > On Thu, Jun 3, 2021 at 3:47 AM Daniel Vetter wrote: > > > On Wed, Jun 02, 2021 at 11:16:39PM -0400, Marek Olšák wrote: > > > On Wed, Jun 2, 2021 at 2:48 PM Daniel Vetter wrote: > > > > > > > On Wed, Jun 02, 2021 at 05:38:51AM -0400,

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Marek Olšák
On Thu, Jun 3, 2021 at 3:47 AM Daniel Vetter wrote: > On Wed, Jun 02, 2021 at 11:16:39PM -0400, Marek Olšák wrote: > > On Wed, Jun 2, 2021 at 2:48 PM Daniel Vetter wrote: > > > > > On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: > > > > On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wr

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-03 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 11:16:39PM -0400, Marek Olšák wrote: > On Wed, Jun 2, 2021 at 2:48 PM Daniel Vetter wrote: > > > On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: > > > On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: > > > > > > > Yes, we can't break anything because we don'

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
On Wed, Jun 2, 2021 at 2:48 PM Daniel Vetter wrote: > On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: > > On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: > > > > > Yes, we can't break anything because we don't want to complicate things > > > for us. It's pretty much all NAK'd alre

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 08:52:38PM +0200, Christian König wrote: > > > Am 02.06.21 um 20:48 schrieb Daniel Vetter: > > On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: > > > On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: > > > > > > > Yes, we can't break anything because we don't

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Christian König
Am 02.06.21 um 20:48 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: Yes, we can't break anything because we don't want to complicate things for us. It's pretty much all NAK'd already. We are trying to ga

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 05:38:51AM -0400, Marek Olšák wrote: > On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: > > > Yes, we can't break anything because we don't want to complicate things > > for us. It's pretty much all NAK'd already. We are trying to gather more > > knowledge and then make b

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Christian König
Am 02.06.21 um 11:58 schrieb Marek Olšák: On Wed, Jun 2, 2021 at 5:44 AM Christian König > wrote: Am 02.06.21 um 10:57 schrieb Daniel Stone: > Hi Christian, > > On Tue, 1 Jun 2021 at 13:51, Christian König > mailto:ckoenig.leichtzumer

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
On Wed, Jun 2, 2021 at 5:44 AM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 02.06.21 um 10:57 schrieb Daniel Stone: > > Hi Christian, > > > > On Tue, 1 Jun 2021 at 13:51, Christian König > > wrote: > >> Am 01.06.21 um 14:30 schrieb Daniel Vetter: > >>> If you want to enable thi

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Christian König
Am 02.06.21 um 10:57 schrieb Daniel Stone: Hi Christian, On Tue, 1 Jun 2021 at 13:51, Christian König wrote: Am 01.06.21 um 14:30 schrieb Daniel Vetter: If you want to enable this use-case with driver magic and without the compositor being aware of what's going on, the solution is EGLStreams.

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: > Yes, we can't break anything because we don't want to complicate things > for us. It's pretty much all NAK'd already. We are trying to gather more > knowledge and then make better decisions. > > The idea we are considering is that we'll expose m

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
Yes, we can't break anything because we don't want to complicate things for us. It's pretty much all NAK'd already. We are trying to gather more knowledge and then make better decisions. The idea we are considering is that we'll expose memory-based sync objects to userspace for read only, and the

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Daniel Stone
Hi Christian, On Tue, 1 Jun 2021 at 13:51, Christian König wrote: > Am 01.06.21 um 14:30 schrieb Daniel Vetter: > > If you want to enable this use-case with driver magic and without the > > compositor being aware of what's going on, the solution is EGLStreams. > > Not sure we want to go there, bu

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Daniel Stone
Hi, On Tue, 1 Jun 2021 at 14:18, Michel Dänzer wrote: > On 2021-06-01 2:10 p.m., Christian König wrote: > > Am 01.06.21 um 12:49 schrieb Michel Dänzer: > >> There isn't a choice for Wayland compositors in general, since there can > >> be arbitrary other state which needs to be applied atomically

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Michel Dänzer
On 2021-06-01 3:18 p.m., Michel Dänzer wrote: > On 2021-06-01 2:10 p.m., Christian König wrote: >> Am 01.06.21 um 12:49 schrieb Michel Dänzer: >>> On 2021-06-01 12:21 p.m., Christian König wrote: Am 01.06.21 um 11:02 schrieb Michel Dänzer: > On 2021-05-27 11:51 p.m., Marek Olšák wrote: >>>

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Michel Dänzer
On 2021-06-01 3:01 p.m., Marek Olšák wrote: > > > On Tue., Jun. 1, 2021, 08:51 Christian König, > mailto:ckoenig.leichtzumer...@gmail.com>> > wrote: > > Am 01.06.21 um 14:30 schrieb Daniel Vetter: > > On Tue, Jun 1, 2021 at 2:10 PM Christian König > >

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Michel Dänzer
On 2021-06-01 2:10 p.m., Christian König wrote: > Am 01.06.21 um 12:49 schrieb Michel Dänzer: >> On 2021-06-01 12:21 p.m., Christian König wrote: >>> Am 01.06.21 um 11:02 schrieb Michel Dänzer: On 2021-05-27 11:51 p.m., Marek Olšák wrote: > 3) Compositors (and other privileged processes, a

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Marek Olšák
On Tue., Jun. 1, 2021, 08:51 Christian König, < ckoenig.leichtzumer...@gmail.com> wrote: > Am 01.06.21 um 14:30 schrieb Daniel Vetter: > > On Tue, Jun 1, 2021 at 2:10 PM Christian König > > wrote: > >> Am 01.06.21 um 12:49 schrieb Michel Dänzer: > >>> On 2021-06-01 12:21 p.m., Christian König wro

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Christian König
Am 01.06.21 um 14:30 schrieb Daniel Vetter: On Tue, Jun 1, 2021 at 2:10 PM Christian König wrote: Am 01.06.21 um 12:49 schrieb Michel Dänzer: On 2021-06-01 12:21 p.m., Christian König wrote: Am 01.06.21 um 11:02 schrieb Michel Dänzer: On 2021-05-27 11:51 p.m., Marek Olšák wrote: 3) Composit

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Daniel Vetter
On Tue, Jun 1, 2021 at 2:10 PM Christian König wrote: > > Am 01.06.21 um 12:49 schrieb Michel Dänzer: > > On 2021-06-01 12:21 p.m., Christian König wrote: > >> Am 01.06.21 um 11:02 schrieb Michel Dänzer: > >>> On 2021-05-27 11:51 p.m., Marek Olšák wrote: > 3) Compositors (and other privileged

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-01 Thread Christian König
Am 01.06.21 um 12:49 schrieb Michel Dänzer: On 2021-06-01 12:21 p.m., Christian König wrote: Am 01.06.21 um 11:02 schrieb Michel Dänzer: On 2021-05-27 11:51 p.m., Marek Olšák wrote: 3) Compositors (and other privileged processes, and display flipping) can't trust imported/exported fences. The