Re: [PATCH RFC] drm/msm/dpu: Force modeset if new CTLs have been reserved

2025-03-03 Thread Dmitry Baryshkov
On Tue, 4 Mar 2025 at 03:44, Jessica Zhang wrote: > > > > On 3/3/2025 3:49 PM, Dmitry Baryshkov wrote: > > On Mon, Mar 03, 2025 at 10:28:00AM -0800, Jessica Zhang wrote: > >> If new CTLs are reserved by CRTC but atomic_enable() is skipped, the > >> encoders will configure the stale CTL instead of

Re: [PATCH RFC] drm/msm/dpu: Force modeset if new CTLs have been reserved

2025-03-03 Thread Jessica Zhang
On 3/3/2025 3:49 PM, Dmitry Baryshkov wrote: On Mon, Mar 03, 2025 at 10:28:00AM -0800, Jessica Zhang wrote: If new CTLs are reserved by CRTC but atomic_enable() is skipped, the encoders will configure the stale CTL instead of the newly reserved one. The CTLs are propagates in .atomic_mode_s

Re: [PATCH v2 05/16] dt-bindings: display/msm: dp-controller: Add SM8750

2025-03-03 Thread Dmitry Baryshkov
On Mon, Mar 03, 2025 at 01:23:11PM -0800, Abhinav Kumar wrote: > > > On 2/24/2025 7:14 PM, Dmitry Baryshkov wrote: > > On Mon, 24 Feb 2025 at 20:59, Abhinav Kumar > > wrote: > > > > > > > > > > > > On 2/19/2025 9:08 AM, Dmitry Baryshkov wrote: > > > > On Wed, Feb 19, 2025 at 06:02:20PM +0100

Re: [PATCH v6 03/14] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2025-03-03 Thread Dmitry Baryshkov
On Mon, Mar 03, 2025 at 10:45:19AM -0800, Jessica Zhang wrote: > > > On 2/27/2025 7:07 AM, Dmitry Baryshkov wrote: > > On Fri, Feb 14, 2025 at 04:14:26PM -0800, Jessica Zhang wrote: > > > From: Dmitry Baryshkov > > > > > > Up to now the driver has been using encoder to allocate hardware > > > r

Re: [PATCH RFC] drm/msm/dpu: Force modeset if new CTLs have been reserved

2025-03-03 Thread Dmitry Baryshkov
On Mon, Mar 03, 2025 at 10:28:00AM -0800, Jessica Zhang wrote: > If new CTLs are reserved by CRTC but atomic_enable() is skipped, the > encoders will configure the stale CTL instead of the newly reserved one. The CTLs are propagates in .atomic_mode_set(), not in .atomic_enable(). > > Avoid this

Re: [PATCH v2 05/16] dt-bindings: display/msm: dp-controller: Add SM8750

2025-03-03 Thread Abhinav Kumar
On 2/24/2025 7:14 PM, Dmitry Baryshkov wrote: On Mon, 24 Feb 2025 at 20:59, Abhinav Kumar wrote: On 2/19/2025 9:08 AM, Dmitry Baryshkov wrote: On Wed, Feb 19, 2025 at 06:02:20PM +0100, Krzysztof Kozlowski wrote: On 17/02/2025 19:58, Dmitry Baryshkov wrote: On Mon, Feb 17, 2025 at 05:41

Re: [PATCH v6 03/14] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2025-03-03 Thread Jessica Zhang
On 2/27/2025 7:07 AM, Dmitry Baryshkov wrote: On Fri, Feb 14, 2025 at 04:14:26PM -0800, Jessica Zhang wrote: From: Dmitry Baryshkov Up to now the driver has been using encoder to allocate hardware resources. Switch it to use CRTC id in preparation for the next step. Reviewed-by: Abhinav Ku

[PATCH RFC] drm/msm/dpu: Force modeset if new CTLs have been reserved

2025-03-03 Thread Jessica Zhang
If new CTLs are reserved by CRTC but atomic_enable() is skipped, the encoders will configure the stale CTL instead of the newly reserved one. Avoid this by setting mode_changed to true if new CTLs have been reserved by CRTC. Note: This patch only adds tracking for the CTL reservation, but eventua

[PATCH v8 15/15] drm/msm/dpu: Enable quad-pipe for DSC and dual-DSI case

2025-03-03 Thread Jun Nie
To support high-resolution cases that exceed the width limitation of a pair of SSPPs, or scenarios that surpass the maximum MDP clock rate, additional pipes are necessary to enable parallel data processing within the SSPP width constraints and MDP clock rate. Request 4 mixers and 4 DSCs for high-r

[PATCH v8 14/15] drm/msm/dpu: support plane splitting in quad-pipe case

2025-03-03 Thread Jun Nie
The content of every half of screen is sent out via one interface in dual-DSI case. The content for every interface is blended by a LM pair in quad-pipe case, thus a LM pair should not blend any content that cross the half of screen in this case. Clip plane into pipes per left and right half screen

[PATCH v8 13/15] drm/msm/dpu: support SSPP assignment for quad-pipe case

2025-03-03 Thread Jun Nie
Currently, SSPPs are assigned to a maximum of two pipes. However, quad-pipe usage scenarios require four pipes and involve configuring two stages. In quad-pipe case, the first two pipes share a set of mixer configurations and enable multi-rect mode when certain conditions are met. The same applies

[PATCH v8 12/15] drm/msm/dpu: blend pipes per mixer pairs config

2025-03-03 Thread Jun Nie
Currently, only 2 pipes are used at most for a plane. A stage structure describes the configuration for a mixer pair. So only one stage is needed for current usage cases. The quad-pipe case will be added in future and 2 stages are used in the case. So extend the stage to an array with array size ST

[PATCH v8 11/15] drm/msm/dpu: split PIPES_PER_STAGE definition per plane and mixer

2025-03-03 Thread Jun Nie
The stage contains configuration for a mixer pair. Currently the plane supports just one stage and 2 pipes. Quad-pipe support will require handling 2 stages and 4 pipes at the same time. In preparation for that add a separate define, PIPES_PER_PLANE, to denote number of pipes that can be used by th

[PATCH v8 08/15] drm/msm/dpu: bind correct pingpong for quad pipe

2025-03-03 Thread Jun Nie
There are 2 interfaces and 4 pingpong in quad pipe. Map the 2nd interface to 3rd PP instead of the 2nd PP. Signed-off-by: Jun Nie Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 -- 1 file changed, 8 insertions(+), 2 deletio

[PATCH v8 09/15] drm/msm/dpu: Add pipe as trace argument

2025-03-03 Thread Jun Nie
Add pipe as trace argument in trace_dpu_crtc_setup_mixer() to ease converting pipe into pipe array later. Signed-off-by: Jun Nie Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 10 +-

[PATCH v8 10/15] drm/msm/dpu: handle pipes as array

2025-03-03 Thread Jun Nie
There are 2 pipes in a drm plane at most currently, while 4 pipes are required for quad-pipe case. Generalize the handling to pipe pair and ease handling to another pipe pair later. Store pipes in array with removing dedicated r_pipe. Signed-off-by: Jun Nie Reviewed-by: Dmitry Baryshkov Reviewed

[PATCH v8 07/15] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2025-03-03 Thread Jun Nie
Up to now the driver has been using encoder to allocate hardware resources. Switch it to use CRTC id so that mixer number can be known in dpu_plane_virtual_assign_resources() via CRTC id for sspp alloation. Because the mixer allocation is done in drm_atomic_helper_check_modeset() as part of CRTC o

[PATCH v8 06/15] drm/msm/dpu: fix mixer number counter on allocation

2025-03-03 Thread Jun Nie
Current code only supports usage cases with one pair of mixers at most. To support quad-pipe usage case, two pairs of mixers need to be reserved. The lm_count for all pairs is cleared if a peer allocation fails in current implementation. Reset the current lm_count to an even number instead of compl

[PATCH v8 05/15] drm/msm/dpu: decide right side per last bit

2025-03-03 Thread Jun Nie
Currently, only one pair of mixers is supported, so a non-zero counter value is sufficient to identify the correct mixer within that pair. However, future implementations may involve multiple mixer pairs. With the current implementation, all mixers within the second pair would be incorrectly select

[PATCH v8 02/15] drm/msm/dpu: Do not fix number of DSC

2025-03-03 Thread Jun Nie
Currently, if DSC is enabled, only 2 DSC engines are supported so far. More usage cases will be added, such as 4 DSC in 4:4:2 topology. So get the real number of DSCs to decide whether DSC merging is needed. Signed-off-by: Jun Nie Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang --- dr

[PATCH v8 04/15] drm/msm/dpu: polish log for resource allocation

2025-03-03 Thread Jun Nie
It is more likely that resource allocation may fail in complex usage case, such as quad-pipe case, than existing usage cases. A resource type ID is printed on failure in the current implementation, but the raw ID number is not explicit enough to help easily understand which resource caused the fail

[PATCH v8 03/15] drm/msm/dpu: configure DSC per number in use

2025-03-03 Thread Jun Nie
Currently if DSC support is requested, the driver only supports using 2 DSC blocks. We need 4 DSC in quad-pipe topology in future. So Only configure DSC engines in use, instead of the maximum number of DSC engines. Signed-off-by: Jun Nie Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang

[PATCH v8 01/15] drm/msm/dpu: check every pipe per capability

2025-03-03 Thread Jun Nie
The capability stored in sblk and pipe_hw_caps is checked only for SSPP of the first pipe in the pair with current implementation. That of the 2nd pipe, r_pipe, is not checked and may violate hardware capability. Move requirement check to dpu_plane_atomic_check_pipe() for the check of every pipe.

[PATCH v8 00/15] drm/msm/dpu: Support quad pipe with dual-DSI

2025-03-03 Thread Jun Nie
2 or more SSPPs and dual-DSI interface are need for super wide panel. And 4 DSC are preferred for power optimal in this case due to width limitation of SSPP and MDP clock rate constrain. This patch set extends number of pipes to 4 and revise related mixer blending logic to support quad pipe. All th

Re: [RESEND] drm/msm/dpu: Delete a variable initialisation before a null pointer check in two functions

2025-03-03 Thread Dan Carpenter
On Mon, Mar 03, 2025 at 09:15:14AM +0100, Markus Elfring wrote: > >>> The address of a data structure member was determined before > >>> a corresponding null pointer check in the implementation of > >>> the functions “dpu_hw_pp_enable_te” and “dpu_hw_pp_get_vsync_info”. > >>> > >>> Thus avoid the r