Re: [Freedreno] [PATCH] drm/msm/gem: Add metadata

2023-10-27 Thread Dmitry Baryshkov
On Fri, 27 Oct 2023 at 22:45, Rob Clark wrote: > > From: Rob Clark > > The EXT_external_objects extension is a bit awkward as it doesn't pass > explicit modifiers, leaving the importer to guess with incomplete > information. In the case of vk (turnip) exporting and gl (freedreno) > importing, th

Re: [Freedreno] [PATCH 3/7] drm/msm/gem: Don't queue job to sched in error cases

2023-10-27 Thread Dmitry Baryshkov
On Fri, 27 Oct 2023 at 19:59, Rob Clark wrote: > > From: Rob Clark > > We shouldn't be running the job in error cases. This also avoids having > to think too hard about where the objs get unpinned (and if necessary, > the resv takes over tracking that the obj is busy).. ie. error cases it > alwa

Re: [Freedreno] [PATCH 2/7] drm/msm/gem: Remove submit_unlock_unpin_bo()

2023-10-27 Thread Dmitry Baryshkov
On Fri, 27 Oct 2023 at 19:59, Rob Clark wrote: > > From: Rob Clark > > The only point it is called is before pinning objects, so the "unpin" > part of the name is fiction. Just remove call submit_cleanup_bo() Nit: 'remove it and call' Other than that: Reviewed-by: Dmitry Baryshkov > directl

Re: [Freedreno] [PATCH v2 1/2] drm/msm/dp: don't touch DP subconnector property in eDP case

2023-10-27 Thread Dmitry Baryshkov
On Sat, 28 Oct 2023 at 00:02, Abhinav Kumar wrote: > > > > On 10/25/2023 2:23 AM, Dmitry Baryshkov wrote: > > From: Abel Vesa > > > > In case of the eDP connection there is no subconnetor and as such no > > subconnector property. Put drm_dp_set_subconnector_property() calls > > under the !is_edp

[Freedreno] [PATCH RFC v7 07/10] drm/atomic: Loosen FB atomic checks

2023-10-27 Thread Jessica Zhang
Loosen the requirements for atomic and legacy commit so that, in cases where pixel_source != FB, the commit can still go through. This includes adding framebuffer NULL checks in other areas to account for FB being NULL when non-FB pixel sources are enabled. To disable a plane, the pixel_source mu

[Freedreno] [PATCH RFC v7 01/10] drm: Introduce pixel_source DRM plane property

2023-10-27 Thread Jessica Zhang
Add support for pixel_source property to drm_plane and related documentation. In addition, force pixel_source to DRM_PLANE_PIXEL_SOURCE_FB in DRM_IOCTL_MODE_SETPLANE as to not break legacy userspace. This enum property will allow user to specify a pixel source for the plane. Possible pixel sources

[Freedreno] [PATCH RFC v7 05/10] drm/atomic: Add solid fill data to plane state dump

2023-10-27 Thread Jessica Zhang
Add solid_fill property data to the atomic plane state dump. Reviewed-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang --- drivers/gpu/drm/drm_atomic.c | 4 drivers/gpu/drm/drm_plane.c | 8 include/drm/drm_plane.h | 3 +++

[Freedreno] [PATCH RFC v7 03/10] drm: Add solid fill pixel source

2023-10-27 Thread Jessica Zhang
Add "SOLID_FILL" as a valid pixel source. If the pixel_source property is set to "SOLID_FILL", it will display data from the drm_plane "solid_fill" blob property. Reviewed-by: Dmitry Baryshkov Acked-by: Pekka Paalanen Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zha

[Freedreno] [PATCH RFC v7 02/10] drm: Introduce solid fill DRM plane property

2023-10-27 Thread Jessica Zhang
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 the following information: struct drm_mode_so

[Freedreno] [PATCH RFC v7 00/10] Support for Solid Fill Planes

2023-10-27 Thread Jessica Zhang
Some drivers support hardware that have optimizations for solid fill planes. This series aims to expose these capabilities to userspace as some compositors have a solid fill flag (ex. SOLID_COLOR in the Android hardware composer HAL) that can be set by apps like the Android Gears test app. In orde

[Freedreno] [PATCH RFC v7 09/10] drm/msm/dpu: Use DRM solid_fill property

2023-10-27 Thread Jessica Zhang
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_state.alpha to _dpu_plane_color_fill_pipe() to allow userspace to

[Freedreno] [PATCH RFC v7 10/10] drm/msm/dpu: Add solid fill and pixel source properties

2023-10-27 Thread Jessica Zhang
Add solid_fill and pixel_source properties to DPU plane Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_p

[Freedreno] [PATCH RFC v7 06/10] drm/atomic: Move framebuffer checks to helper

2023-10-27 Thread Jessica Zhang
Currently framebuffer checks happen directly in drm_atomic_plane_check(). Move these checks into their own helper method. Reviewed-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang --- drivers/gpu/drm/drm_atomic.c | 130 +++

[Freedreno] [PATCH RFC v7 04/10] drm/atomic: Add pixel source to plane state dump

2023-10-27 Thread Jessica Zhang
Add pixel source to the atomic plane state dump Reviewed-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang --- drivers/gpu/drm/drm_atomic.c| 1 + drivers/gpu/drm/drm_blend.c | 1 + drivers/gpu/drm/drm_crtc_internal.h | 1 + 3 f

[Freedreno] [PATCH RFC v7 08/10] drm/msm/dpu: Allow NULL FBs in atomic commit

2023-10-27 Thread Jessica Zhang
Since solid fill planes allow for a NULL framebuffer in a valid commit, add NULL framebuffer checks to atomic commit calls within DPU. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 9 +++- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.

Re: [Freedreno] [PATCH v2 1/2] drm/msm/dp: don't touch DP subconnector property in eDP case

2023-10-27 Thread Abhinav Kumar
On 10/25/2023 2:23 AM, Dmitry Baryshkov wrote: From: Abel Vesa In case of the eDP connection there is no subconnetor and as such no subconnector property. Put drm_dp_set_subconnector_property() calls under the !is_edp condition. Fixes: bfcc3d8f94f4 ("drm/msm/dp: support setting the DP subco

[Freedreno] [PATCH] drm/msm/gem: Add metadata

2023-10-27 Thread Rob Clark
From: Rob Clark The EXT_external_objects extension is a bit awkward as it doesn't pass explicit modifiers, leaving the importer to guess with incomplete information. In the case of vk (turnip) exporting and gl (freedreno) importing, the "OPTIMAL_TILING_EXT" layout depends on VkImageCreateInfo fl

[Freedreno] [PATCH 7/7] drm/msm/gem: Convert to drm_exec

2023-10-27 Thread Rob Clark
From: Rob Clark Replace the ww_mutex locking dance with the drm_exec helper. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/msm_gem.h| 5 +- drivers/gpu/drm/msm/msm_gem_submit.c | 117 +-- 3 files changed, 24 ins

[Freedreno] [PATCH 6/7] drm/exec: Pass in initial # of objects

2023-10-27 Thread Rob Clark
From: Rob Clark In cases where the # is known ahead of time, it is silly to do the table resize dance. Signed-off-by: Rob Clark --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++-- drivers/gpu

[Freedreno] [PATCH 5/7] drm/msm/gem: Cleanup submit_cleanup_bo()

2023-10-27 Thread Rob Clark
From: Rob Clark Now that it only handles unlock duty, drop the superfluous arg and rename it. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/g

[Freedreno] [PATCH 3/7] drm/msm/gem: Don't queue job to sched in error cases

2023-10-27 Thread Rob Clark
From: Rob Clark We shouldn't be running the job in error cases. This also avoids having to think too hard about where the objs get unpinned (and if necessary, the resv takes over tracking that the obj is busy).. ie. error cases it always happens synchronously, and normal cases it happens from sc

[Freedreno] [PATCH 4/7] drm/msm/gem: Split out submit_unpin_objects() helper

2023-10-27 Thread Rob Clark
From: Rob Clark Untangle unpinning from unlock/unref loop. The unpin only happens in error paths so it is easier to decouple from the normal unlock path. Since we never have an intermediate state where a subset of buffers are pinned (ie. we never bail out of the pin or unpin loops) we can repla

[Freedreno] [PATCH 2/7] drm/msm/gem: Remove submit_unlock_unpin_bo()

2023-10-27 Thread Rob Clark
From: Rob Clark The only point it is called is before pinning objects, so the "unpin" part of the name is fiction. Just remove call submit_cleanup_bo() directly. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-)

[Freedreno] [PATCH 1/7] drm/msm/gem: Remove "valid" tracking

2023-10-27 Thread Rob Clark
From: Rob Clark This was a small optimization for pre-soft-pin userspace. But mesa switched to soft-pin nearly 5yrs ago. So lets drop the optimization and simplify the code. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.h| 2 -- drivers/gpu/drm/msm/msm_gem_submit.c | 44 +

[Freedreno] [PATCH 0/7] drm/msm/gem: drm_exec conversion

2023-10-27 Thread Rob Clark
From: Rob Clark Simplify the exec path (removing a legacy optimization) and convert to drm_exec. One drm_exec patch to allow passing in the expected # of GEM objects to avoid re-allocation. I'd be a bit happier if I could avoid the extra objects table allocation in drm_exec in the first place,

Re: [Freedreno] [PATCH 4/8] dt-bindings: display: msm: document the SM8650 Mobile Display Subsystem

2023-10-27 Thread Krzysztof Kozlowski
On 25/10/2023 09:35, Neil Armstrong wrote: > Document the Mobile Display Subsystem (MDSS) on the SM8650 Platform. > > Signed-off-by: Neil Armstrong > --- > .../bindings/display/msm/qcom,sm8650-mdss.yaml | 322 > + > 1 file changed, 322 insertions(+) > Reviewed-by: Krzy

Re: [Freedreno] [PATCH 3/8] dt-bindings: display: msm: document the SM8650 DPU

2023-10-27 Thread Krzysztof Kozlowski
On 25/10/2023 09:35, Neil Armstrong wrote: > Document the DPU Display Controller on the SM8650 Platform. > > Signed-off-by: Neil Armstrong > --- Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [Freedreno] [PATCH 2/8] dt-bindings: display: msm-dsi-controller-main: document the SM8650 DSI Controller

2023-10-27 Thread Krzysztof Kozlowski
On 25/10/2023 09:35, Neil Armstrong wrote: > Document the DSI Controller on the SM8650 Platform. > > Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [Freedreno] [PATCH 1/8] dt-bindings: display: msm-dsi-phy-7nm: document the SM8650 DSI PHY

2023-10-27 Thread Krzysztof Kozlowski
On 25/10/2023 09:34, Neil Armstrong wrote: > Document the DSI PHY on the SM8650 Platform. > > Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof