Re: [PATCH RFC v4 6/7] drm/msm/dpu: Allow NULL FBs in atomic commit

2023-06-30 Thread Pekka Paalanen
On Fri, 30 Jun 2023 03:52:37 +0300 Dmitry Baryshkov wrote: > On 30/06/2023 03:25, Jessica Zhang wrote: > > Since solid fill planes allow for a NULL framebuffer in a valid commit, > > add NULL framebuffer checks to atomic commit calls within DPU. > > > > Signed-off-by: Jessica Zhang > > --- > >

Re: [PATCH RFC v4 7/7] drm/msm/dpu: Use DRM solid_fill property

2023-06-30 Thread Pekka Paalanen
On Thu, 29 Jun 2023 17:25:06 -0700 Jessica Zhang wrote: > Drop DPU_PLANE_COLOR_FILL_FLAG and check the DRM solid_fill property to > determine if the plane is solid fill. In addition drop the DPU plane > color_fill field as we can now use drm_plane_state.solid_fill instead, > and pass in drm_plane

Re: [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-06-30 Thread Pekka Paalanen
On Thu, 29 Jun 2023 17:25:00 -0700 Jessica Zhang wrote: > Document and add support for solid_fill property to drm_plane. In > addition, add support for setting and getting the values for solid_fill. > > To enable solid fill planes, userspace must assign a property blob to > the "solid_fill" plan

Re: [PATCH RFC v4 2/7] drm: Introduce pixel_source DRM plane property

2023-06-30 Thread Pekka Paalanen
On Fri, 30 Jun 2023 03:42:28 +0300 Dmitry Baryshkov wrote: > On 30/06/2023 03:25, Jessica Zhang wrote: > > Add support for pixel_source property to drm_plane and related > > documentation. > > > > This enum property will allow user to specify a pixel source for the > > plane. Possible pixel sour

Re: [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-06-30 Thread Dmitry Baryshkov
On 30/06/2023 03:25, Jessica Zhang wrote: Document and add support for solid_fill property to drm_plane. In addition, add support for setting and getting the values for solid_fill. To enable solid fill planes, userspace must assign a property blob to the "solid_fill" plane property containing th

Re: [PATCH RFC v4 2/7] drm: Introduce pixel_source DRM plane property

2023-06-30 Thread Sebastian Wick
On Fri, Jun 30, 2023 at 2:26 AM Jessica Zhang wrote: > > Add support for pixel_source property to drm_plane and related > documentation. > > This enum property will allow user to specify a pixel source for the > plane. Possible pixel sources will be defined in the > drm_plane_pixel_source enum. >

Re: [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-06-30 Thread Jessica Zhang
On 6/30/2023 3:33 AM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Document and add support for solid_fill property to drm_plane. In addition, add support for setting and getting the values for solid_fill. To enable solid fill planes, userspace must assign a property blo

Re: [PATCH RFC v4 3/7] drm/atomic: Move framebuffer checks to helper

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:43 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Currently framebuffer checks happen directly in drm_atomic_plane_check(). Move these checks into their own helper method. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/drm_atomic.c | 130 ++

Re: [PATCH RFC v4 2/7] drm: Introduce pixel_source DRM plane property

2023-06-30 Thread Jessica Zhang
On 6/30/2023 7:43 AM, Sebastian Wick wrote: On Fri, Jun 30, 2023 at 2:26 AM Jessica Zhang wrote: Add support for pixel_source property to drm_plane and related documentation. This enum property will allow user to specify a pixel source for the plane. Possible pixel sources will be defined

Re: [PATCH RFC v4 4/7] drm/atomic: Loosen FB atomic checks

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:48 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Loosen the requirements for atomic and legacy commit so that, in cases where solid fill planes is enabled but no FB is set, the commit can still go through. This includes adding framebuffer NULL checks in

Re: [PATCH RFC v4 5/7] drm/msm/dpu: Add solid fill and pixel source properties

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:49 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Add solid_fill and pixel_source properties to DPU plane Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 ++   1 file changed, 2 insertions(+) This should be the last com

Re: [PATCH RFC v4 6/7] drm/msm/dpu: Allow NULL FBs in atomic commit

2023-06-30 Thread Jessica Zhang
On 6/30/2023 1:21 AM, Pekka Paalanen wrote: On Fri, 30 Jun 2023 03:52:37 +0300 Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Since solid fill planes allow for a NULL framebuffer in a valid commit, add NULL framebuffer checks to atomic commit calls within DPU. Signed-of

Re: [PATCH RFC v4 7/7] drm/msm/dpu: Use DRM solid_fill property

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:59 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Drop DPU_PLANE_COLOR_FILL_FLAG and check the DRM solid_fill property to determine if the plane is solid fill. In addition drop the DPU plane color_fill field as we can now use drm_plane_state.solid_fill in

[PATCH v4 0/6] drm: Add support for atomic async page-flip

2023-06-30 Thread André Almeida
Hi, This work from me and Simon adds support for DRM_MODE_PAGE_FLIP_ASYNC through the atomic API. This feature is already available via the legacy API. The use case is to be able to present a new frame immediately (or as soon as possible), even if after missing a vblank. This might result in teari

[PATCH v4 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2023-06-30 Thread André Almeida
From: Simon Ser If the driver supports it, allow user-space to supply the DRM_MODE_PAGE_FLIP_ASYNC flag to request an async page-flip. Set drm_crtc_state.async_flip accordingly. Document that drivers will reject atomic commits if an async flip isn't possible. This allows user-space to fall back

[PATCH v4 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-06-30 Thread André Almeida
From: Simon Ser This new kernel capability indicates whether async page-flips are supported via the atomic uAPI. DRM clients can use it to check for support before feeding DRM_MODE_PAGE_FLIP_ASYNC to the kernel. Make it clear that DRM_CAP_ASYNC_PAGE_FLIP is for legacy uAPI only. Signed-off-by:

[PATCH v4 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-06-30 Thread André Almeida
From: Simon Ser This new field indicates whether the driver has the necessary logic to support async page-flips via the atomic uAPI. This is leveraged by the next commit to allow user-space to use this functionality. All atomic drivers setting drm_mode_config.async_page_flip are updated to also

[PATCH v4 4/6] amd/display: indicate support for atomic async page-flips on DC

2023-06-30 Thread André Almeida
From: Simon Ser amdgpu_dm_commit_planes() already sets the flip_immediate flag for async page-flips. This flag is used to set the UNP_FLIP_CONTROL register. Thus, no additional change is required to handle async page-flips with the atomic uAPI. Signed-off-by: Simon Ser Reviewed-by: André Almeid

[PATCH v4 5/6] drm: Refuse to async flip with atomic prop changes

2023-06-30 Thread André Almeida
Given that prop changes may lead to modesetting, which would defeat the fast path of the async flip, refuse any atomic prop change for async flips in atomic API. The only exceptions are the framebuffer ID to flip to and the mode ID, that could be referring to an identical mode. Signed-off-by: Andr

[PATCH v4 6/6] drm/doc: Define KMS atomic state set

2023-06-30 Thread André Almeida
Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: André Almeida --- v4: new patch --- Documentation/gpu/drm-uapi.rst | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/gpu/drm-uapi.rs