Re: (subset) [PATCH v3 0/4] drm/msm/dsi/phy: Improvements around concurrent PHY_CMN_CLK_CFG[01]

2025-02-17 Thread Abhinav Kumar
On Fri, 14 Feb 2025 16:08:40 +0100, Krzysztof Kozlowski wrote: > Changes in v3: > - Define bitfields in patches 1-3, so move there parts from patch #4 > - Use FIELD_GET > - Keep separate cached->bit_clk_div and pix_clk_div > - I think this implements entire feedback from Dmitry > - Link to v2: >

Re: (subset) [PATCH 2/2] drm/msm/dpu: Drop extraneous return in dpu_crtc_reassign_planes()

2025-02-17 Thread Abhinav Kumar
On Wed, 08 Jan 2025 14:40:48 -0800, Jessica Zhang wrote: > Drop extra return at the end of dpu_crtc_reassign_planes() > > Applied to msm-fixes, thanks! [2/2] drm/msm/dpu: Drop extraneous return in dpu_crtc_reassign_planes() https://gitlab.freedesktop.org/drm/msm/-/commit/5e192eefebaa B

Re: (subset) [PATCH] drm/msm/dpu: Don't leak bits_per_component into random DSC_ENC fields

2025-02-17 Thread Abhinav Kumar
On Tue, 11 Feb 2025 00:19:32 +0100, Marijn Suijten wrote: > What used to be the input_10_bits boolean - feeding into the lowest > bit of DSC_ENC - on MSM downstream turned into an accidental OR with > the full bits_per_component number when it was ported to the upstream > kernel. > > On typical

Re: (subset) [PATCH] drm/msm/dpu: Disable dither in phys encoder cleanup

2025-02-17 Thread Abhinav Kumar
On Tue, 11 Feb 2025 19:59:19 -0800, Jessica Zhang wrote: > Disable pingpong dither in dpu_encoder_helper_phys_cleanup(). > > This avoids the issue where an encoder unknowingly uses dither after > reserving a pingpong block that was previously bound to an encoder that > had enabled dither. > >

Re: (subset) [PATCH v2] drm/msm/dpu: Fix uninitialized variable

2025-02-17 Thread Abhinav Kumar
On Sun, 09 Feb 2025 22:51:54 -0500, Ethan Carter Edwards wrote: > There is a possibility for an uninitialized *ret* variable to be > returned in some code paths. > > Fix this by initializing *ret* to 0. > > Applied to msm-fixes, thanks! [1/1] drm/msm/dpu: Fix uninitialized variable ht

[PATCH v2 0/4] Add and enable the panel

2025-02-17 Thread Danila Tikhonov
This patch series adds support for the Visionox RM692E5 panel, which is used on the Nothing Phone (1) and then adds it to the DTS. Before integrating the panel into the DTS, we update the DSI code to allow bits-per-component (bpc) values of 10 and 12, since the Visionox RM692E5 panel operates at 1

[PATCH v2 4/4] arm64: dts: qcom: sm7325-nothing-spacewar: Enable panel and GPU

2025-02-17 Thread Danila Tikhonov
From: Eugene Lepshy Enable the Adreno GPU and configure the Visionox RM692E5 panel. Signed-off-by: Eugene Lepshy Co-developed-by: Danila Tikhonov Signed-off-by: Danila Tikhonov Reviewed-by: Konrad Dybcio --- Note: Depends on https://lore.kernel.org/linux-arm-msm/20250122-dpu-111-topology-v2

[PATCH v2 3/4] drm/msm/dsi: Allow values of 10 and 12 for bits per component

2025-02-17 Thread Danila Tikhonov
From: Eugene Lepshy The DRM DSC helper has various bits_per_component values - not just 8. But the DSC 1.1 block supports only 8, 10, and 12. Extend the guard accordingly and add a comment noting this limitation. Signed-off-by: Eugene Lepshy Co-developed-by: Danila Tikhonov Signed-off-by: Dani

[PATCH v2 2/4] drm/panel: Add Visionox RM692E5 panel driver

2025-02-17 Thread Danila Tikhonov
From: Eugene Lepshy Add the driver for Visionox RM692E5 panel support found in Nothing Phone (1). Signed-off-by: Eugene Lepshy Co-developed-by: Danila Tikhonov Signed-off-by: Danila Tikhonov --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile

[PATCH v2 1/4] dt-bindings: display: panel: Add Visionox RM692E5

2025-02-17 Thread Danila Tikhonov
The Visionox RM692E5 is a 6.55" AMOLED panel used in Nothing Phone (1) (sm7325-nothing-spacewar). Signed-off-by: Danila Tikhonov Reviewed-by: Rob Herring (Arm) --- .../display/panel/visionox,rm692e5.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Docum

Re: (subset) [PATCH v2] drm/msm/dp: account for widebus and yuv420 during mode validation

2025-02-17 Thread Abhinav Kumar
On Thu, 06 Feb 2025 11:46:36 -0800, Abhinav Kumar wrote: > Widebus allows the DP controller to operate in 2 pixel per clock mode. > The mode validation logic validates the mode->clock against the max > DP pixel clock. However the max DP pixel clock limit assumes widebus > is already enabled. Adju

Re: (subset) [PATCH v2] drm/msm/dpu: correct LM pairing for SM6150

2025-02-17 Thread Abhinav Kumar
On Tue, 17 Dec 2024 14:35:40 +0200, Dmitry Baryshkov wrote: > The SM6150 platform doesn't have 3DMux (MERGE_3D) block, so it can not > split the screen between two LMs. Drop lm_pair fields as they don't make > sense for this platform. > > Applied to msm-fixes, thanks! [1/1] drm/msm/dpu: corre

Re: (subset) [PATCH 00/35] drm/msm/dpu: rework HW block feature handling

2025-02-17 Thread Abhinav Kumar
On Sat, 14 Dec 2024 00:14:16 +0200, Dmitry Baryshkov wrote: > Some time ago we started the process of converting HW blocks to use > revision-based checks instead of having feature bits (which are easy to > miss or to set incorrectly). Then the process of such a conversion was > postponed. (Mostly

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

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 10:15:53PM +0800, Jun Nie wrote: > 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 explici

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

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 10:16:01PM +0800, Jun Nie wrote: > 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 use

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

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 10:15:55PM +0800, Jun Nie wrote: > 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 implementati

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

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 10:15:50PM +0800, Jun Nie wrote: > 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 chec

[PATCH v2 01/16] dt-bindings: display/msm: dsi-controller-main: Combine if:then: entries

2025-02-17 Thread Krzysztof Kozlowski
Several devices have the same clock inputs, thus they can be in the same if:then: clause, making everything smaller. No functional impact. Signed-off-by: Krzysztof Kozlowski --- .../bindings/display/msm/dsi-controller-main.yaml | 64 ++ 1 file changed, 5 insertions(+), 59 d

Re: [PATCH v2 08/16] drm/msm/dpu: Drop useless comments

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:29PM +0100, Krzysztof Kozlowski wrote: > Drop comments about SoC before each 'struct dpu_lm_sub_blks' for given > SoC because it's duplicating the actual name of structure. Historically there were more SoC-specific data, now we are really limited to the LM sblk. Maybe

Re: [PATCH v2 15/16] drm/msm/dpu: Implement new v12.0 DPU differences

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:36PM +0100, Krzysztof Kozlowski wrote: > Implement new features and differences coming in v12.0 of DPU present on > Qualcomm SM8750 SoC: > 1. 10-bit color alpha. > 2. New CTL_PIPE_ACTIVE and CTL_LAYER_ACTIVE registers for pipes and >layer mixers. > 2. Several diffe

Re: [PATCH v2 14/16] drm/msm/dpu: Add missing "fetch" name to set_active_pipes()

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:35PM +0100, Krzysztof Kozlowski wrote: > The set_active_pipes() callback configures CTL_FETCH_PIPE_ACTIVE and > newer DPU v12.0 comes with CTL_PIPE_ACTIVE, thus rename it to > set_active_fetch_pipes() to better match the purpose. > > Signed-off-by: Krzysztof Kozlowski

[PATCH v2 11/16] drm/msm/dsi/phy: Add support for SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add support for DSI PHY v7.0 on Qualcomm SM8750 SoC which comes with an incompatible hardware interface change: ICODE_ACCUM_STATUS_LOW and ALOG_OBSV_BUS_STATUS_1 registers - their offsets were just switched. Currently these registers are not used in the driver, so the easiest is to document both

Re: [PATCH v2 13/16] drm/msm/dpu: Add support for SM8750

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:34PM +0100, Krzysztof Kozlowski wrote: > Add DPU version v12.0 support for the Qualcomm SM8750 platform. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes in v2: > 1. Add CDM > --- > .../drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h| 496 >

Re: [PATCH v2 12/16] drm/msm/dsi: Add support for SM8750

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:33PM +0100, Krzysztof Kozlowski wrote: > Add support for DSI on Qualcomm SM8750 SoC with notable difference: > > DSI PHY PLLs, the parents of pixel and byte clocks, cannot be used as > parents before DSI PHY is configured and the PLLs are prepared with > initial rate

Re: [PATCH v2 11/16] drm/msm/dsi/phy: Add support for SM8750

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:32PM +0100, Krzysztof Kozlowski wrote: > Add support for DSI PHY v7.0 on Qualcomm SM8750 SoC which comes with an > incompatible hardware interface change: > > ICODE_ACCUM_STATUS_LOW and ALOG_OBSV_BUS_STATUS_1 registers - their > offsets were just switched. Currently

Re: [PATCH v2 10/16] drm/msm/dpu: Add handling of LM_6 and LM_7 bits in pending flush mask

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:31PM +0100, Krzysztof Kozlowski wrote: > MDSS/MDP v12 comes with new bits in flush registers (e.g. > MDP_CTL_0_FLUSH) for Layer Mixer 6 and 7. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 6 ++ > 1 file changed, 6 i

Re: [PATCH v2 09/16] drm/msm/dpu: Add LM_7, DSC_[67], PP_[67] and MERGE_3D_5

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:30PM +0100, Krzysztof Kozlowski wrote: > Add IDs for new blocks present in MDSS/MDP v12 for LM, DSC, PINGPONG and > MERGE_3D blocks. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 6 ++ > 1 file changed, 6 insertions

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

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 05:41:26PM +0100, Krzysztof Kozlowski wrote: > Add DisplayPort controller for Qualcomm SM8750 SoC which so far looks > fully compatible with earlier SM8650 variant. As that became a question for QCS8300, does SM8750 also support exactly two MST streams? > > Signed-off-by:

[PATCH v2 08/16] drm/msm/dpu: Drop useless comments

2025-02-17 Thread Krzysztof Kozlowski
Drop comments about SoC before each 'struct dpu_lm_sub_blks' for given SoC because it's duplicating the actual name of structure. Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/msm/d

[PATCH v2 02/16] dt-bindings: display/msm: dsi-controller-main: Add missing minItems

2025-02-17 Thread Krzysztof Kozlowski
Specific constrain in if:then: blocks for variable lists, like clocks and clock-names, should have a fixed upper and lower size. Older dtschema implied minItems, but that's not true since 2024 and missing minItems means that lower bound is not set. Signed-off-by: Krzysztof Kozlowski --- .../dev

[PATCH v2 10/16] drm/msm/dpu: Add handling of LM_6 and LM_7 bits in pending flush mask

2025-02-17 Thread Krzysztof Kozlowski
MDSS/MDP v12 comes with new bits in flush registers (e.g. MDP_CTL_0_FLUSH) for Layer Mixer 6 and 7. Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gp

[PATCH v2 12/16] drm/msm/dsi: Add support for SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add support for DSI on Qualcomm SM8750 SoC with notable difference: DSI PHY PLLs, the parents of pixel and byte clocks, cannot be used as parents before DSI PHY is configured and the PLLs are prepared with initial rate is set. Therefore assigned-clock-parents are not working here and driver is re

[PATCH v2 16/16] drm/msm/mdss: Add support for SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add support for the Qualcomm SM8750 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/msm/msm_mdss.c | 33 + drivers/gpu/drm/msm/msm_mdss.h | 1 + 2 files changed, 34 insertions(+) diff --git a/drivers/gpu/drm/msm/ms

[PATCH v2 15/16] drm/msm/dpu: Implement new v12.0 DPU differences

2025-02-17 Thread Krzysztof Kozlowski
Implement new features and differences coming in v12.0 of DPU present on Qualcomm SM8750 SoC: 1. 10-bit color alpha. 2. New CTL_PIPE_ACTIVE and CTL_LAYER_ACTIVE registers for pipes and layer mixers. 2. Several differences in LM registers (also changed offsets) for LM crossbar hardware changes

[PATCH v2 13/16] drm/msm/dpu: Add support for SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add DPU version v12.0 support for the Qualcomm SM8750 platform. Signed-off-by: Krzysztof Kozlowski --- Changes in v2: 1. Add CDM --- .../drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h| 496 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 29 ++ drivers/gpu/drm/msm/

[PATCH v2 14/16] drm/msm/dpu: Add missing "fetch" name to set_active_pipes()

2025-02-17 Thread Krzysztof Kozlowski
The set_active_pipes() callback configures CTL_FETCH_PIPE_ACTIVE and newer DPU v12.0 comes with CTL_PIPE_ACTIVE, thus rename it to set_active_fetch_pipes() to better match the purpose. Signed-off-by: Krzysztof Kozlowski --- Changes in v2: 1. New patch --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc

[PATCH v2 04/16] dt-bindings: display/msm: dsi-controller-main: Add SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add DSI controller for Qualcomm SM8750 SoC which is quite different from previous (SM8650) generation. It does not allow the display clock controller clocks like "byte" and "pixel" to be reparented to DSI PHY PLLs while the DSI PHY PLL is not configured (not prepared, rate not set). Therefore ass

[PATCH v2 06/16] dt-bindings: display/msm: qcom,sm8650-dpu: Add SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add DPU for Qualcomm SM8750 SoC which has several differences, new blocks and changes in registers, making it incompatible with SM8650. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/display/msm/qcom,sm8650-dpu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Do

[PATCH v2 09/16] drm/msm/dpu: Add LM_7, DSC_[67], PP_[67] and MERGE_3D_5

2025-02-17 Thread Krzysztof Kozlowski
Add IDs for new blocks present in MDSS/MDP v12 for LM, DSC, PINGPONG and MERGE_3D blocks. Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/ms

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

2025-02-17 Thread Krzysztof Kozlowski
Add DisplayPort controller for Qualcomm SM8750 SoC which so far looks fully compatible with earlier SM8650 variant. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/display/msm/dp-controller.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/device

[PATCH v2 07/16] dt-bindings: display/msm: qcom,sm8750-mdss: Add SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add MDSS/MDP display subsystem for Qualcomm SM8750 SoC, next generation with two revisions up of the IP block comparing to SM8650. Signed-off-by: Krzysztof Kozlowski --- .../bindings/display/msm/qcom,sm8750-mdss.yaml | 460 + 1 file changed, 460 insertions(+) diff --git

[PATCH v2 03/16] dt-bindings: display/msm: dsi-phy-7nm: Add SM8750

2025-02-17 Thread Krzysztof Kozlowski
Add DSI PHY v7.0 for Qualcomm SM8750 SoC which is quite different from previous (SM8650) generation. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display

[PATCH v2 00/16] drm/msm: Add support for SM8750

2025-02-17 Thread Krzysztof Kozlowski
Hi, Dependency / Rabased on top of: https://lore.kernel.org/all/20241214-dpu-drop-features-v1-0-988f0662c...@linaro.org/ Changes in v2: - Implement LM crossbar, 10-bit alpha and active layer changes: New patch: drm/msm/dpu: Implement new v12.0 DPU differences - New patch: drm/msm/dpu: Add missi

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

2025-02-17 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 v6 06/15] drm/msm/dpu: fix mixer number counter on allocation

2025-02-17 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 v6 11/15] drm/msm/dpu: split PIPES_PER_STAGE definition per plane and mixer

2025-02-17 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

Re: [PATCH v4 4/4] drm/msm/dsi/phy: Define PHY_CMN_CLK_CFG[01] bitfields and simplify saving

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 02:37:31PM +0100, Krzysztof Kozlowski wrote: > On 17/02/2025 14:13, Dmitry Baryshkov wrote: > > On Mon, Feb 17, 2025 at 12:53:17PM +0100, Krzysztof Kozlowski wrote: > >> Add bitfields for PHY_CMN_CLK_CFG0 and PHY_CMN_CLK_CFG1 registers to > >> avoid hard-coding bit masks and

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

2025-02-17 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 v6 09/15] drm/msm/dpu: Add pipe as trace argument

2025-02-17 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 v6 12/15] drm/msm/dpu: blend pipes per mixer pairs config

2025-02-17 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 v6 07/15] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2025-02-17 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 v6 13/15] drm/msm/dpu: support SSPP assignment for quad-pipe case

2025-02-17 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 v6 15/15] drm/msm/dpu: Enable quad-pipe for DSC and dual-DSI case

2025-02-17 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 v6 10/15] drm/msm/dpu: handle pipes as array

2025-02-17 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 --- dri

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

2025-02-17 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 v6 05/15] drm/msm/dpu: decide right side per last bit

2025-02-17 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 v6 04/15] drm/msm/dpu: polish log for resource allocation

2025-02-17 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 v6 03/15] drm/msm/dpu: configure DSC per number in use

2025-02-17 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 v6 01/15] drm/msm/dpu: check every pipe per capability

2025-02-17 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 v6 00/15] drm/msm/dpu: Support quad pipe with dual-DSI

2025-02-17 Thread Jun Nie
/dpu_rm.c | 215 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 32 +- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h| 10 +- 12 files changed, 510 insertions(+), 346 deletions(-) --- base-commit: b44251a8c179381b9f3ed3aa49be04fe1d516903 change-id: 20250217-sm8650-v6-14-hmd

Re: [PATCH v4 4/4] drm/msm/dsi/phy: Define PHY_CMN_CLK_CFG[01] bitfields and simplify saving

2025-02-17 Thread Krzysztof Kozlowski
On 17/02/2025 14:13, Dmitry Baryshkov wrote: > On Mon, Feb 17, 2025 at 12:53:17PM +0100, Krzysztof Kozlowski wrote: >> Add bitfields for PHY_CMN_CLK_CFG0 and PHY_CMN_CLK_CFG1 registers to >> avoid hard-coding bit masks and shifts and make the code a bit more >> readable. While touching the lines i

Re: [PATCH v4 4/4] drm/msm/dsi/phy: Define PHY_CMN_CLK_CFG[01] bitfields and simplify saving

2025-02-17 Thread Dmitry Baryshkov
On Mon, Feb 17, 2025 at 12:53:17PM +0100, Krzysztof Kozlowski wrote: > Add bitfields for PHY_CMN_CLK_CFG0 and PHY_CMN_CLK_CFG1 registers to > avoid hard-coding bit masks and shifts and make the code a bit more > readable. While touching the lines in dsi_7nm_pll_save_state() > resulting cached->pix

[PATCH v3 1/3] drm/msm/dsi: Use existing per-interface slice count in DSC timing

2025-02-17 Thread Marijn Suijten
When configuring the timing of DSI hosts (interfaces) in dsi_timing_setup() all values written to registers are taking bonded-mode into account by dividing the original mode width by 2 (half the data is sent over each of the two DSI hosts), but the full width instead of the interface width is passe

[PATCH v4 4/4] drm/msm/dsi/phy: Define PHY_CMN_CLK_CFG[01] bitfields and simplify saving

2025-02-17 Thread Krzysztof Kozlowski
Add bitfields for PHY_CMN_CLK_CFG0 and PHY_CMN_CLK_CFG1 registers to avoid hard-coding bit masks and shifts and make the code a bit more readable. While touching the lines in dsi_7nm_pll_save_state() resulting cached->pix_clk_div assignment would be too big, so just combine pix_clk_div and bit_clk

[PATCH v4 3/4] drm/msm/dsi/phy: Do not overwite PHY_CMN_CLK_CFG1 when choosing bitclk source

2025-02-17 Thread Krzysztof Kozlowski
PHY_CMN_CLK_CFG1 register has four fields being used in the driver: DSI clock divider, source of bitclk and two for enabling the DSI PHY PLL clocks. dsi_7nm_set_usecase() sets only the source of bitclk, so should leave all other bits untouched. Use newly introduced dsi_pll_cmn_clk_cfg1_update() t

[PATCH v4 2/4] drm/msm/dsi/phy: Protect PHY_CMN_CLK_CFG1 against clock driver

2025-02-17 Thread Krzysztof Kozlowski
PHY_CMN_CLK_CFG1 register is updated by the PHY driver and by a mux clock from Common Clock Framework: devm_clk_hw_register_mux_parent_hws(). There could be a path leading to concurrent and conflicting updates between PHY driver and clock framework, e.g. changing the mux and enabling PLL clocks.

[PATCH v4 1/4] drm/msm/dsi/phy: Protect PHY_CMN_CLK_CFG0 updated from driver side

2025-02-17 Thread Krzysztof Kozlowski
PHY_CMN_CLK_CFG0 register is updated by the PHY driver and by two divider clocks from Common Clock Framework: devm_clk_hw_register_divider_parent_hw(). Concurrent access by the clocks side is protected with spinlock, however driver's side in restoring state is not. Restoring state is called from

[PATCH v4 0/4] drm/msm/dsi/phy: Improvements around concurrent PHY_CMN_CLK_CFG[01]

2025-02-17 Thread Krzysztof Kozlowski
Changes in v4: - Add tags - Patch #4: Add mising bitfield.h include - One more FIELD_GET and DSI_7nm_PHY_CMN_CLK_CFG1_DSICLK_SEL (Dmitry) - Link to v3: https://lore.kernel.org/r/20250214-drm-msm-phy-pll-cfg-reg-v3-0-0943b8507...@linaro.org Changes in v3: - Define bitfields in patches 1-3, so move

Re: [PATCH v3 4/4] drm/msm/dsi/phy: Define PHY_CMN_CLK_CFG[01] bitfields and simplify saving

2025-02-17 Thread Krzysztof Kozlowski
On 14/02/2025 16:20, Dmitry Baryshkov wrote: > On Fri, Feb 14, 2025 at 04:08:44PM +0100, Krzysztof Kozlowski wrote: >> Add bitfields for PHY_CMN_CLK_CFG0 and PHY_CMN_CLK_CFG1 registers to >> avoid hard-coding bit masks and shifts and make the code a bit more >> readable. While touching the lines i

[PATCH v3 3/3] drm/msm/dpu: Remove arbitrary limit of 1 interface in DSC topology

2025-02-17 Thread Marijn Suijten
When DSC is enabled the number of interfaces is forced to be 1, and documented that it is a "power-optimal" layout to use two DSC encoders together with two Layer Mixers. However, the same layout (two DSC hard-slice encoders with two LMs) is also used when the display is fed with data over two ins

[PATCH v3 2/3] drm/msm/dsi: Set PHY usescase (and mode) before registering DSI host

2025-02-17 Thread Marijn Suijten
Ordering issues here cause an uninitialized (default STANDALONE) usecase to be programmed (which appears to be a MUX) in some cases when msm_dsi_host_register() is called, leading to the slave PLL in bonded-DSI mode to source from a clock parent (dsi1vco) that is off. This should seemingly not be

[PATCH v3 0/3] drm/msm: Initial fixes for DUALPIPE (+DSC) topology

2025-02-17 Thread Marijn Suijten
This series covers a step-up towards supporting the DUALPIPE DSC topology, also known as 2:2:2 topology (on active-CTL hardware). It involves 2 layer mixers, 2 DSC compression encoders, and 2 interfaces (on DSI, this is called bonded-DSI) where bandwidth constraints (e.g. 4k panels at 120Hz) requi

Re: (subset) [PATCH RFC 0/4] Support for Adreno X1-85 Speedbin along with new OPP levels

2025-02-17 Thread Srinivas Kandagatla
On Thu, 09 Jan 2025 04:12:37 +0530, Akhil P Oommen wrote: > This series adds gpu speedbin support for Adreno X1-85 GPU along with > additional OPP levels. Because the higher OPPs require GPU ACD feature, > this series has dependency on the GPU ACD support series [1]. Also, > there is dependency o