Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-06-04 Thread Daniel Stone
On Wed, 3 Jun 2020 at 19:53, Marek Olšák wrote: > TMZ is more complicated. If there is a TMZ buffer used by a command buffer, > then all other used buffers must also be TMZ or read only. If no TMZ buffers > are used by a command buffer, then TMZ is disabled. If a context is not > secure, TMZ is

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-06-03 Thread Marek Olšák
TMZ is more complicated. If there is a TMZ buffer used by a command buffer, then all other used buffers must also be TMZ or read only. If no TMZ buffers are used by a command buffer, then TMZ is disabled. If a context is not secure, TMZ is also disabled. A context can switch between secure and non-

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-06-03 Thread Daniel Stone
Hi Alex, On Mon, 1 Jun 2020 at 15:25, Alex Deucher wrote: > On Fri, May 29, 2020 at 11:03 AM Daniel Stone wrote: > > What Weston _does_ know, however, is that display controller can work > > with modifier set A, and the GPU can work with modifier set B, and if > > the client can pick something f

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-06-01 Thread Alex Deucher
On Fri, May 29, 2020 at 11:03 AM Daniel Stone wrote: > > On Fri, 29 May 2020 at 15:36, Alex Deucher wrote: > > On Fri, May 29, 2020 at 10:32 AM Daniel Stone wrote: > > > On Fri, 29 May 2020 at 15:29, Alex Deucher wrote: > > > > Maybe I'm over thinking this. I just don't want to get into a > >

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-06-01 Thread Neil Armstrong
On 29/05/2020 15:56, Daniel Stone wrote: > Hi Alex, > > On Fri, 29 May 2020 at 14:29, Alex Deucher wrote: >> On Fri, May 29, 2020 at 4:59 AM Simon Ser wrote: >>> OK. In this case I think it's fine to make the DMA-BUF import fail, as >>> we've suggested on IRC. The more-or-less planned fix for th

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-06-01 Thread Brian Starkey
Sorry for commenting on the obsolete v1 - that'll teach me for reading my backlog chronologically. On Thu, May 28, 2020 at 02:38:36PM +, Simon Ser wrote: > There have suggestions to bake pitch alignment, address alignement, > contiguous memory or other placement (hidden VRAM, GTT/BAR, etc) > c

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-30 Thread Michel Dänzer
On 2020-05-29 5:01 p.m., Daniel Stone wrote: > On Fri, 29 May 2020 at 15:36, Alex Deucher wrote: >> On Fri, May 29, 2020 at 10:32 AM Daniel Stone wrote: >>> On Fri, 29 May 2020 at 15:29, Alex Deucher wrote: Maybe I'm over thinking this. I just don't want to get into a situation where

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Alex Deucher
On Fri, May 29, 2020 at 11:03 AM Daniel Stone wrote: > > On Fri, 29 May 2020 at 15:36, Alex Deucher wrote: > > On Fri, May 29, 2020 at 10:32 AM Daniel Stone wrote: > > > On Fri, 29 May 2020 at 15:29, Alex Deucher wrote: > > > > Maybe I'm over thinking this. I just don't want to get into a > >

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Daniel Stone
On Fri, 29 May 2020 at 15:36, Alex Deucher wrote: > On Fri, May 29, 2020 at 10:32 AM Daniel Stone wrote: > > On Fri, 29 May 2020 at 15:29, Alex Deucher wrote: > > > Maybe I'm over thinking this. I just don't want to get into a > > > situation where we go through a lot of effort to add modifier

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Alex Deucher
On Fri, May 29, 2020 at 10:32 AM Daniel Stone wrote: > > On Fri, 29 May 2020 at 15:29, Alex Deucher wrote: > > Maybe I'm over thinking this. I just don't want to get into a > > situation where we go through a lot of effort to add modifier support > > and then performance ends up being worse than

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Daniel Stone
On Fri, 29 May 2020 at 15:29, Alex Deucher wrote: > Maybe I'm over thinking this. I just don't want to get into a > situation where we go through a lot of effort to add modifier support > and then performance ends up being worse than it is today in a lot of > cases. I'm genuinely curious: what d

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Alex Deucher
On Fri, May 29, 2020 at 9:58 AM Daniel Stone wrote: > > Hi Alex, > > On Fri, 29 May 2020 at 14:29, Alex Deucher wrote: > > On Fri, May 29, 2020 at 4:59 AM Simon Ser wrote: > > > OK. In this case I think it's fine to make the DMA-BUF import fail, as > > > we've suggested on IRC. The more-or-less

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Daniel Stone
Hi Alex, On Fri, 29 May 2020 at 14:29, Alex Deucher wrote: > On Fri, May 29, 2020 at 4:59 AM Simon Ser wrote: > > OK. In this case I think it's fine to make the DMA-BUF import fail, as > > we've suggested on IRC. The more-or-less planned fix for these buffer > > sharing issues is to revive the b

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Daniel Vetter
On Fri, May 29, 2020 at 3:29 PM Alex Deucher wrote: > > On Fri, May 29, 2020 at 4:59 AM Simon Ser wrote: > > > > On Thursday, May 28, 2020 5:49 PM, Marek Olšák wrote: > > > > > On most hardware, there is a minimum pitch alignment for linear and > > > any greater multiple of the alignment is fine

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Alex Deucher
On Fri, May 29, 2020 at 4:59 AM Simon Ser wrote: > > On Thursday, May 28, 2020 5:49 PM, Marek Olšák wrote: > > > On most hardware, there is a minimum pitch alignment for linear and > > any greater multiple of the alignment is fine. > > > > On Navi, the pitch in bytes for linear must be > > align(

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-29 Thread Simon Ser
On Thursday, May 28, 2020 5:49 PM, Marek Olšák wrote: > On most hardware, there is a minimum pitch alignment for linear and > any greater multiple of the alignment is fine. > > On Navi, the pitch in bytes for linear must be > align(width * bpp / 8, 256). That's because the hw computes the pitch >

Re: [PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-28 Thread Marek Olšák
On most hardware, there is a minimum pitch alignment for linear and any greater multiple of the alignment is fine. On Navi, the pitch in bytes for linear must be align(width * bpp / 8, 256). That's because the hw computes the pitch from the width and doesn't allow setting a custom pitch. For that

[PATCH v3] drm/fourcc: document modifier uniqueness requirements

2020-05-28 Thread Simon Ser
There have suggestions to bake pitch alignment, address alignement, contiguous memory or other placement (hidden VRAM, GTT/BAR, etc) constraints into modifiers. Last time this was brought up it seemed like the consensus was to not allow this. Document this in drm_fourcc.h. There are several reason