[Freedreno] [PATCH v2] drm/msm/dpu: Fix memory leak in msm_mdss_parse_data_bus_icc_path

2022-12-06 Thread Miaoqian Lin
of_icc_get() alloc resources for path1, we should release it when not need anymore. Early return when IS_ERR_OR_NULL(path0) may leak path1. Defer getting path1 to fix this. Fixes: b9364eed9232 ("drm/msm/dpu: Move min BW request and full BW disable back to mdss") Signed-off-by: Miaoqian Lin ---

[Freedreno] [PATCH v4 5/5] arm64: dts: qcom: sm8450-hdk: Enable HDMI Display

2022-12-06 Thread Dmitry Baryshkov
From: Vinod Koul Add the HDMI display nodes and link it to DSI. Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 37 + 1 file changed, 37 insertions(+)

[Freedreno] [PATCH v4 3/5] arm64: dts: qcom: sm8450-hdk: enable display hardware

2022-12-06 Thread Dmitry Baryshkov
Enable MDSS/DPU/DSI0 on SM8450-HDK device. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts

[Freedreno] [PATCH v4 2/5] arm64: dts: qcom: sm8450: add display hardware devices

2022-12-06 Thread Dmitry Baryshkov
Add devices tree nodes describing display hardware on SM8450: - Display Clock Controller - MDSS - MDP - two DSI controllers and DSI PHYs This does not provide support for DP controllers present on SM8450. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v4 1/5] arm64: dts: qcom: sm8450: add RPMH_REGULATOR_LEVEL_LOW_SVS_D1

2022-12-06 Thread Dmitry Baryshkov
Add another power saving state used on SM8450. Unfortunately adding it in proper place causes renumbering of all the opp states in sm8450.dtsi Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 20

[Freedreno] [PATCH v4 0/5] arm64: dts: qcom: sm8450-hdk: enable HDMI output

2022-12-06 Thread Dmitry Baryshkov
Add device tree nodes for MDSS, DPU and DSI devices on Qualcomm SM8450 platform. Enable these devices and add the HDMI bridge configuration on SM8450 HDK. Changes since v3: - Renamed mdss node to display-subsystem@ (Krzysztof) - Dropped empty line from the patch4 (Krzysztof) - Renamed HDMI

[Freedreno] [PATCH v4 4/5] arm64: dts: qcom: sm8450-hdk: Add LT9611uxc HDMI bridge

2022-12-06 Thread Dmitry Baryshkov
From: Vinod Koul Add the LT9611uxc DSI-HDMI bridge and supplies Signed-off-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 58 + 1 file changed, 58 insertions(+) diff --git

[Freedreno] [PATCH v6 11/11] drm/msm: mdss add support for SM8450

2022-12-06 Thread Dmitry Baryshkov
Add support for the MDSS block on SM8450 platform. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Freedreno] [PATCH v6 08/11] drm/msm/dpu: merge all MDP TOP registers to dpu_hwio.h

2022-12-06 Thread Dmitry Baryshkov
There is a separate header containing some of MDP TOP register definitions, dpu_hwio.h. Move missing register definitions from dpu_hw_top.c to the mentioned header. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 25 --

[Freedreno] [PATCH v6 09/11] drm/msm/dpu: add support for MDP_TOP blackhole

2022-12-06 Thread Dmitry Baryshkov
On sm8450 a register block was removed from MDP TOP. Accessing it during snapshotting results in NoC errors / immediate reboot. Skip accessing these registers during snapshot. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v6 07/11] drm/msm/dsi: add support for DSI 2.6.0

2022-12-06 Thread Dmitry Baryshkov
Add support for DSI 2.6.0 (block used on sm8450). Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 ++ drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 + 2 files changed, 3

[Freedreno] [PATCH v6 04/11] dt-bindings: display/msm: add support for the display on SM8450

2022-12-06 Thread Dmitry Baryshkov
Add DPU and MDSS schemas to describe MDSS and DPU blocks on the Qualcomm SM8450 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- .../bindings/display/msm/qcom,sm8450-dpu.yaml | 139 +++ .../display/msm/qcom,sm8450-mdss.yaml | 343 ++ 2

[Freedreno] [PATCH v6 10/11] drm/msm/dpu: add support for SM8450

2022-12-06 Thread Dmitry Baryshkov
Add definitions for the display hardware used on Qualcomm SM8450 platform. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 224 ++

[Freedreno] [PATCH v6 05/11] drm/msm/dsi/phy: rework register setting for 7nm PHY

2022-12-06 Thread Dmitry Baryshkov
In preparation to adding the sm8350 and sm8450 PHYs support, rearrange register values calculations in dsi_7nm_phy_enable(). This change bears no functional changes itself, it is merely a preparation for the next patch. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v6 02/11] dt-bindings: display/msm: *mdss.yaml: split required properties clauses

2022-12-06 Thread Dmitry Baryshkov
Require only properties declared in given schema, which makes the code a bit more readable and easy to follow. Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/msm/mdss-common.yaml | 1 -

[Freedreno] [PATCH v6 06/11] drm/msm/dsi: add support for DSI-PHY on SM8350 and SM8450

2022-12-06 Thread Dmitry Baryshkov
SM8350 and SM8450 use 5nm DSI PHYs, which share register definitions with 7nm DSI PHYs. Rather than duplicating the driver, handle 5nm variants inside the common 5+7nm driver. Co-developed-by: Robert Foss Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by:

[Freedreno] [PATCH v6 01/11] dt-bindings: display/msm: *dpu.yaml: split required properties clauses

2022-12-06 Thread Dmitry Baryshkov
Require only properties declared in given schema, which makes the code a bit more readable and easy to follow. Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- .../devicetree/bindings/display/msm/dpu-common.yaml| 4

[Freedreno] [PATCH v6 03/11] dt-bindings: display/msm: add sm8350 and sm8450 DSI PHYs

2022-12-06 Thread Dmitry Baryshkov
SM8350 and SM8450 platforms use the same driver and same bindings as the existing 7nm DSI PHYs. Add corresponding compatibility strings. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml | 2 ++ 1 file changed, 2

[Freedreno] [PATCH v6 00/11] drm/msm: add support for SM8450

2022-12-06 Thread Dmitry Baryshkov
This adds support for the MDSS/DPU/DSI on the Qualcomm SM8450 platform. Change since v5: - Added defines to be used for the MDP_PERIPH_TOP0 blackhole Change since v4: - Fixed commit messages for the first two patches (Krzysztof) - Dropped clock-names requirement patch - Removed clock-names from

Re: [Freedreno] [PATCH v5 08/10] drm/msm/dpu: add support for MDP_TOP blackhole

2022-12-06 Thread Dmitry Baryshkov
On 25/11/2022 08:01, Abhinav Kumar wrote: On 11/23/2022 1:04 PM, Dmitry Baryshkov wrote: On sm8450 a register block was removed from MDP TOP. Accessing it during snapshotting results in NoC errors / immediate reboot. Skip accessing these registers during snapshot. Tested-by: Vinod Koul

Re: [Freedreno] [PATCH 1/4] drm/msm/adreno: Fix null ptr access in adreno_gpu_cleanup()

2022-12-06 Thread Akhil P Oommen
On 12/5/2022 2:10 PM, Dan Carpenter wrote: > On Sun, Dec 04, 2022 at 04:11:41AM +0530, Akhil P Oommen wrote: >> Fix the below kernel panic due to null pointer access: >> [ 18.504431] Unable to handle kernel NULL pointer dereference at virtual >> address 0048 >> [ 18.513464] Mem

Re: [Freedreno] [PATCH v7 0/6] clk/qcom: Support gdsc collapse polling using 'reset' interface

2022-12-06 Thread Akhil P Oommen
On 12/2/2022 12:30 PM, Akhil P Oommen wrote: > On 12/2/2022 4:27 AM, Bjorn Andersson wrote: >> On Wed, Oct 05, 2022 at 02:36:58PM +0530, Akhil P Oommen wrote: >> @Ulf, Akhil has a power-domain for a piece of hardware which may be >> voted active by multiple different subsystems

[Freedreno] [PATCH] drm/msm: Add MSM_SUBMIT_BO_NO_IMPLICIT

2022-12-06 Thread Rob Clark
From: Rob Clark In cases where implicit sync is used, it is still useful (for things like sub-allocation, etc) to allow userspace to opt-out of implicit sync on per-BO basis. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c| 3 ++- drivers/gpu/drm/msm/msm_gem_submit.c | 11

Re: [Freedreno] (subset) [PATCH v2 00/12] SM6115 DTS changes

2022-12-06 Thread Bjorn Andersson
On Wed, 30 Nov 2022 21:09:38 +0100, Adam Skladowski wrote: > This patch series adds bunch of new nodes > also it fixes some small nitpicks in yamls and adds compatible. > > Changes since v1 > > 1. Changed title for mdss yaml patch > 2. Added missing dmas to spi0 > 3. Wired freq

Re: [Freedreno] [PATCH] drm/msm/dpu: Add check for cstate

2022-12-06 Thread Abhinav Kumar
On 12/6/2022 12:05 AM, Jiasheng Jiang wrote: As kzalloc may fail and return NULL pointer, it should be better to check cstate in order to avoid the NULL pointer dereference in __drm_atomic_helper_crtc_reset. You have wrapped around your lines too short. Please try to utilize the full word

Re: [Freedreno] [PATCH] drm/msm/dpu: Fix memory leak in msm_mdss_parse_data_bus_icc_path

2022-12-06 Thread Doug Anderson
Hi, On Mon, Dec 5, 2022 at 11:55 PM Miaoqian Lin wrote: > > of_icc_get() alloc resources for path1, we should release it when not > need anymore. Early return when IS_ERR_OR_NULL(path0) may leak path1. > Add icc_put(path1) in the error path to fix this. > > Fixes: b9364eed9232 ("drm/msm/dpu:

Re: [Freedreno] [PATCH v9 2/5] dt-bindings: msm/dp: add data-lanes and link-frequencies property

2022-12-06 Thread Rob Herring
On Mon, 05 Dec 2022 15:08:11 -0800, Kuogee Hsieh wrote: > Add both data-lanes and link-frequencies property into endpoint > > Changes in v7: > -- split yaml out of dtsi patch > -- link-frequencies from link rate to symbol rate > -- deprecation of old data-lanes property > > Changes in v8: > --

[Freedreno] [PATCH] drm/msm/dpu: Add check for cstate

2022-12-06 Thread Jiasheng Jiang
As kzalloc may fail and return NULL pointer, it should be better to check cstate in order to avoid the NULL pointer dereference in __drm_atomic_helper_crtc_reset. Fixes: 1cff7440a86e ("drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset.") Signed-off-by: Jiasheng Jiang ---

[Freedreno] [PATCH] drm/msm/dpu: Add check for pstates

2022-12-06 Thread Jiasheng Jiang
As kzalloc may fail and return NULL pointer, it should be better to check pstates in order to avoid the NULL pointer dereference. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ 1 file changed, 2

[Freedreno] [PATCH] drm/msm/dpu: Add check for cstate

2022-12-06 Thread Jiasheng Jiang
As kzalloc may fail and return NULL pointer, it should be better to check pstates in order to avoid the NULL pointer dereference later. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ 1 file changed, 2