Re: [Freedreno] [PATCH 3/3] drm/msm/dpu: drop dpu_encoder_phys_ops.atomic_mode_set

2023-08-29 Thread Abhinav Kumar
On 8/17/2023 12:27 PM, Abhinav Kumar wrote: On 8/17/2023 11:50 AM, Dmitry Baryshkov wrote: On 08/08/2023 02:49, Abhinav Kumar wrote: On 6/4/2023 7:45 AM, Dmitry Baryshkov wrote: The atomic_mode_set() callback only sets the phys_enc's IRQ data. As the INTF and WB are statically allocate

Re: [Freedreno] [PATCH 2/3] drm/msm/dpu: split _dpu_encoder_resource_control_helper()

2023-08-29 Thread Abhinav Kumar
On 6/4/2023 7:45 AM, Dmitry Baryshkov wrote: Follow the _dpu_encoder_irq_control() change and split the _dpu_encoder_resource_control_helper() into enable and disable parts. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 45 + 1 file

Re: [Freedreno] [PATCH 1/3] drm/msm/dpu: split irq_control into irq_enable and _disable

2023-08-29 Thread Abhinav Kumar
On 6/4/2023 7:45 AM, Dmitry Baryshkov wrote: The single helper for both enable and disable cases is too complicated, especially if we start adding more code to these helpers. Split it into irq_enable and irq_disable cases. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/d

[Freedreno] [PATCH 6/7] drm/msm/dp: Inline dp_link_parse_sink_count()

2023-08-29 Thread Stephen Boyd
The function dp_link_parse_sink_count() is really just drm_dp_read_sink_count(). It debug prints out the bit for content protection (DP_SINK_CP_READY), but that is not useful beyond debug because 'link->dp_link.sink_count' is overwritten to only contain the sink_count in this same function. Just us

[Freedreno] [PATCH 2/7] drm/msm/dp: Use drm_dp_read_sink_count() helper

2023-08-29 Thread Stephen Boyd
Use the common function drm_dp_read_sink_count() instead of open-coding it. This shrinks the kernel text a tiny bit. Cc: Vinod Polimera Cc: Kuogee Hsieh Signed-off-by: Stephen Boyd --- drivers/gpu/drm/msm/dp/dp_panel.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-)

[Freedreno] [PATCH 7/7] drm/msm/dp: Remove dp_display_is_ds_bridge()

2023-08-29 Thread Stephen Boyd
This function is simply drm_dp_is_branch() so use that instead of open-coding it. Cc: Vinod Polimera Cc: Kuogee Hsieh Signed-off-by: Stephen Boyd --- drivers/gpu/drm/msm/dp/dp_display.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_displa

[Freedreno] [PATCH 3/7] drm/msm/dp: Remove dead code related to downstream cap info

2023-08-29 Thread Stephen Boyd
We read the downstream port count and capability info but never use it anywhere. Remove 'ds_port_cnt' and 'ds_cap_info' and any associated code from this driver. Fold the check for 'dfp_present' into a call to drm_dp_is_branch() at the one place it is used to get rid of any member storage related t

[Freedreno] [PATCH 4/7] drm/msm/dp: Remove aux_cfg_update_done and related code

2023-08-29 Thread Stephen Boyd
The member 'aux_cfg_update_done' is always false. This is dead code that never runs. Remove it. Cc: Vinod Polimera Cc: Kuogee Hsieh Signed-off-by: Stephen Boyd --- drivers/gpu/drm/msm/dp/dp_panel.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_pa

[Freedreno] [PATCH 5/7] drm/msm/dp: Simplify with drm_dp_{max_link_rate, max_lane_count}()

2023-08-29 Thread Stephen Boyd
These are open-coded versions of common functions. Replace them with the common code to improve readability. Cc: Vinod Polimera Cc: Kuogee Hsieh Signed-off-by: Stephen Boyd --- drivers/gpu/drm/msm/dp/dp_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[Freedreno] [PATCH 0/7] drm/msm/dp: Simplify DPCD related code with helpers

2023-08-29 Thread Stephen Boyd
This driver open-codes a few of the DPCD register reads when it can be simplified by using the helpers instead. This series reworks the MSM DP driver to use the DPCD helpers and removes some dead code along the way. There's the potential for even more code reduction around the test registers, but I

[Freedreno] [PATCH 1/7] drm/msm/dp: Replace open-coded drm_dp_read_dpcd_caps()

2023-08-29 Thread Stephen Boyd
This function duplicates the common function drm_dp_read_dpcd_caps(). The array of DPCD registers filled in is one size larger than the function takes, but from what I can tell that extra byte was never used. Resize the array and use the common function to reduce the code here. Cc: Vinod Polimera

Re: [Freedreno] [PATCH RFC v6 00/10] Support for Solid Fill Planes

2023-08-29 Thread Sebastian Wick
On Mon, Aug 28, 2023 at 05:05:06PM -0700, Jessica Zhang wrote: > 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

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

2023-08-29 Thread Sebastian Wick
On Mon, Aug 28, 2023 at 05:05:08PM -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"

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

2023-08-29 Thread Pekka Paalanen
On Mon, 28 Aug 2023 17:05:13 -0700 Jessica Zhang wrote: > 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

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

2023-08-29 Thread Pekka Paalanen
On Mon, 28 Aug 2023 17:05:11 -0700 Jessica Zhang wrote: > Add solid_fill property data to the atomic plane state dump. > > 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 +++ > 3 files

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

2023-08-29 Thread Pekka Paalanen
On Mon, 28 Aug 2023 17:05:09 -0700 Jessica Zhang wrote: > 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 > Signed-off-by: Jessica Zhang > --

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

2023-08-29 Thread Pekka Paalanen
On Mon, 28 Aug 2023 17:05:08 -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: [Freedreno] [PATCH RFC v6 01/10] drm: Introduce pixel_source DRM plane property

2023-08-29 Thread Pekka Paalanen
On Mon, 28 Aug 2023 17:05:07 -0700 Jessica Zhang wrote: > 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 allo