[Freedreno] [PATCH v2 0/3] drm/msm/dpu: remove dpu_encoder_phys_ops::atomic_mode_set callback

2023-10-09 Thread Dmitry Baryshkov
The dpu_encoder_phys_ops::atomic_mode_set() callback is mostly redundant. Implementations only set the IRQ indices there. Move statically allocated IRQs to dpu_encoder_phys_*_init() and set dynamically allocated IRQs in the irq_enable() callback. Changes since v1: - Split trace events into enable/

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

2023-10-09 Thread Dmitry Baryshkov
The atomic_mode_set() callback only sets the phys_enc's IRQ data. As the INTF and WB are statically allocated to each encoder/phys_enc, drop the atomic_mode_set callback and set the IRQs during encoder init. For the CMD panel usecase some of IRQ indexes depend on the selected resources. Move setti

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

2023-10-09 Thread Dmitry Baryshkov
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/dpu_encoder.c | 36 --- .../gpu/drm/msm/di

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

2023-10-09 Thread Dmitry Baryshkov
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 + drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 12 -- 2

Re: [Freedreno] [PATCH v2] drm/panel: Enable DSC and CMD mode for Visionox VTDR6130 panel

2023-10-09 Thread neil . armstrong
Hi Paloma, On 28/07/2023 03:26, Paloma Arellano wrote: Enable display compression (DSC v1.2) and CMD mode for 1080x2400 Visionox VTDR6130 AMOLED DSI panel. In addition, this patch will set the default to command mode with DSC enabled. Note: This patch has only been validated DSC over command mo

Re: [Freedreno] [PATCH v4 0/4] drm/msm: move resource allocation to the _probe function

2023-10-09 Thread Rob Clark
On Tue, Jul 4, 2023 at 10:45 AM Dmitry Baryshkov wrote: > > This patchset was left untouched for almost a year. Let's reiterate it > in attempt to solve the long-standing issue. > > As discussed several times on IRC, move display subdriver resource > allocation from kms_init to probe time to let i

[Freedreno] [PATCH RFC 0/5] drm/msm: dpu1: correctly implement SSPP & WB Clock Control Split

2023-10-09 Thread Neil Armstrong
bif.h | 12 --- 13 files changed, 120 insertions(+), 61 deletions(-) --- base-commit: 9119cf579b4432b36be9d33a92f4331922067d92 change-id: 20231009-topic-sm8550-graphics-sspp-split-clk-43c32e37b6aa Best regards, -- Neil Armstrong

[Freedreno] [PATCH RFC 1/5] drm/msm: dpu1: create a dpu_hw_clk_force_ctrl() helper

2023-10-09 Thread Neil Armstrong
Add an helper to setup the force clock control as it will be used in multiple HW files. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 23 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 21 + drivers/gpu/drm/msm/disp/dpu

[Freedreno] [PATCH RFC 3/5] drm/msm: dpu1: vbif: add dpu_vbif_setup_clk_force_ctrl() helper

2023-10-09 Thread Neil Armstrong
Move the actual call to the MDP setup_clk_force_ctrl() op to an helper which will call the correct op depending on the caps. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu

[Freedreno] [PATCH RFC 4/5] drm/msm: dpu1: call wb & sspp clk_force_ctrl op if split clock control

2023-10-09 Thread Neil Armstrong
Now clk_ctrl IDs can be optional and the clk_ctrl_reg can be specified on the SSPP & WB caps directly, pass the SSPP & WB hw struct to the qos & limit params then call the clk_force_ctrl() op accordingly. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c| 4 +

[Freedreno] [PATCH RFC 5/5] drm/msm: dpu1: sm8550: move split clock controls to sspp entries

2023-10-09 Thread Neil Armstrong
The SM8550 has the SSPP clk_ctrl in the SSPP registers, move them out of the MDP top. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 35 ++ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/ca

[Freedreno] [PATCH RFC 2/5] drm/msm: dpu1: add setup_clk_force_ctrl() op to sspp & wb

2023-10-09 Thread Neil Armstrong
Starting from SM8550, the SSPP & WB clock controls are moved the SSPP and WB register range, as it's called "VBIF_CLK_SPLIT" downstream. An optional clk_ctrl struct is added to the SSPP & WB caps, which can be used by the setup_clk_force_ctrl() op. Signed-off-by: Neil Armstrong --- drivers/gpu/

Re: [Freedreno] [PATCH] drm/msm/dpu: enable smartdma on sm8350

2023-10-09 Thread Dmitry Baryshkov
On 08/09/2023 22:33, Abhinav Kumar wrote: To support high resolutions on sm8350, enable smartdma in its catalog. Signed-off-by: Abhinav Kumar Tested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov --- Notes: only compile tested, to be landed after sufficient testing -- With bes

[Freedreno] [PATCH] drm/msm/dpu: enable SmartDMA on SM8450

2023-10-09 Thread Dmitry Baryshkov
Enable the SmartDMA / multirect support on the SM8450 platform to support higher resoltion modes. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu

Re: [Freedreno] [PATCH RFC 1/5] drm/msm: dpu1: create a dpu_hw_clk_force_ctrl() helper

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 19:36, Neil Armstrong wrote: Add an helper to setup the force clock control as it will be used in multiple HW files. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 23 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 21

Re: [Freedreno] [PATCH RFC 3/5] drm/msm: dpu1: vbif: add dpu_vbif_setup_clk_force_ctrl() helper

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 19:36, Neil Armstrong wrote: Move the actual call to the MDP setup_clk_force_ctrl() op to an helper which will call the correct op depending on the caps. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 15 +++ 1 file changed, 11 insertio

Re: [Freedreno] [PATCH RFC 4/5] drm/msm: dpu1: call wb & sspp clk_force_ctrl op if split clock control

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 19:36, Neil Armstrong wrote: Now clk_ctrl IDs can be optional and the clk_ctrl_reg can be specified on the SSPP & WB caps directly, pass the SSPP & WB hw struct to the qos & limit params then call the clk_force_ctrl() op accordingly. Signed-off-by: Neil Armstrong --- .../gpu/drm

Re: [Freedreno] [PATCH RFC 5/5] drm/msm: dpu1: sm8550: move split clock controls to sspp entries

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 19:36, Neil Armstrong wrote: The SM8550 has the SSPP clk_ctrl in the SSPP registers, move them out of the MDP top. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 35 ++ 1 file changed, 15 insertions(+), 20 deletions(-)

[Freedreno] [PATCH 1/3] drm/msm/dpu: enable writeback on SDM845

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 18 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 6 -- 2 files changed, 22 insertions(+), 2 deletions(-) diff

[Freedreno] [PATCH 0/3] drm/msm/dpu: enable writeback on several platforms

2023-10-09 Thread Dmitry Baryshkov
This enables writeback on several platforms where I could actually test it. Dmitry Baryshkov (3): drm/msm/dpu: enable writeback on SDM845 drm/msm/dpu: enable writeback on SM8350 drm/msm/dpu: enable writeback on SM8450 .../drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 18 ++

[Freedreno] [PATCH 2/3] drm/msm/dpu: enable writeback on SM8350

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h b/drivers/gpu

[Freedreno] [PATCH 3/3] drm/msm/dpu: enable writeback on SM8450

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h b/drivers/gpu

[Freedreno] [PATCH] drm/msm/dpu: correct clk bit for WB2 block

2023-10-09 Thread Dmitry Baryshkov
On sc7280 there are two clk bits for WB2: control and status. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7280_mdp struct lists the latter one. Correct that to ensure proper programming sequence for WB2 on sc7280. Fixes: 3ce166380567 ("drm/ms

[Freedreno] [RFT PATCH 1/4] drm/msm/dpu: enable writeback on SM8150

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h b/drivers/gpu

[Freedreno] [RFT PATCH 2/4] drm/msm/dpu: enable writeback on SC8108X

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h| 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h b/drivers/gp

[Freedreno] [RFT PATCH 0/4] drm/msm/dpu: enable writeback on the other platforms

2023-10-09 Thread Dmitry Baryshkov
I was not able to test it on my own, this is a call for testing for the owners of these platforms. The git version of modetest now fully supports writeback. Compile libdrm/modetest from git version, run modetest -ac to determine the writeback connector, cat /sys/kernel/debug/dri/0/state to determi

[Freedreno] [RFT PATCH 4/4] drm/msm/dpu: enable writeback on SM6350

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h b/drivers/gpu

[Freedreno] [RFT PATCH 3/4] drm/msm/dpu: enable writeback on SM6125

2023-10-09 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h b/drivers/gpu

Re: [Freedreno] [PATCH 00/13] drm/msm: move KMS code from msm_drv.c

2023-10-09 Thread Rob Clark
On Sun, Jul 2, 2023 at 5:37 PM Dmitry Baryshkov wrote: > > Currently both msm_drm_init() and msm_drm_uninit() functions are trying > to handle both normal and headless Adreno cases. This results in a > suboptimal code, since headless case still gets modesetting and atomic > interfaces enabled. Two

[Freedreno] [PATCH v7 0/3 RESEND] drm/bridge_connector: implement OOB HPD handling

2023-10-09 Thread Dmitry Baryshkov
This is a resend, since the previous submission got no responses. The patches have been reviewed/acked by several maintainers. Can we please gain some attention and either get it merged or understand what should be changed / improved. This series is required to delivere HPD events from altmode driv

[Freedreno] [PATCH v7 1/3 RESEND] drm: Add HPD state to drm_connector_oob_hotplug_event()

2023-10-09 Thread Dmitry Baryshkov
From: Bjorn Andersson In some implementations, such as the Qualcomm platforms, the display driver has no way to query the current HPD state and as such it's impossible to distinguish between disconnect and attention events. Add a parameter to drm_connector_oob_hotplug_event() to pass the HPD sta

[Freedreno] [PATCH v7 3/3 RESEND] drm/bridge_connector: implement oob_hotplug_event

2023-10-09 Thread Dmitry Baryshkov
Implement the oob_hotplug_event() callback. Translate it to the HPD notification sent to the HPD bridge in the chain. Reviewed-by: Janne Grunau Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 31 +++--- 1 file changed, 28 insertions(+), 3 deletio

[Freedreno] [PATCH v7 2/3 RESEND] drm/bridge_connector: stop filtering events in drm_bridge_connector_hpd_cb()

2023-10-09 Thread Dmitry Baryshkov
In some cases the bridge drivers would like to receive hotplug events even in the case new status is equal to the old status. In the DP case this is used to deliver "attention" messages to the DP host. Stop filtering the events in the drm_bridge_connector_hpd_cb() and let drivers decide whether the

[Freedreno] [PATCH v5 0/4] drm/msm: move resource allocation to the _probe function

2023-10-09 Thread Dmitry Baryshkov
This patchset was left untouched for almost a year. Let's reiterate it in attempt to solve the long-standing issue. As discussed several times on IRC, move display subdriver resource allocation from kms_init to probe time to let it bail early. Changes since v4: - Rebased on top of linux-next Cha

[Freedreno] [PATCH v5 1/4] drm/msm: allow passing struct msm_kms to msm_drv_probe()

2023-10-09 Thread Dmitry Baryshkov
In preparation of moving resource allocation to the probe time, allow MSM KMS drivers to pass struct msm_kms pointer via msm_drv_probe(). Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 +-

[Freedreno] [PATCH v5 2/4] drm/msm/dpu: move resource allocation to the _probe function

2023-10-09 Thread Dmitry Baryshkov
To let the probe function bail early if any of the resources is unavailable, move resource allocattion from kms_init directly to the probe callback. While we are at it, replace irq_of_parse_and_map() with platform_get_irq(). This also drops devm_iounmap() calls. It is too early to have them _dpu_k

[Freedreno] [PATCH v5 4/4] drm/msm/mdp5: move resource allocation to the _probe function

2023-10-09 Thread Dmitry Baryshkov
To let the probe function bail early if any of the resources is unavailable, move resource allocattion from kms_init directly to the probe callback. Reviewed-by: Abhinav Kumar Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 100 ++--

[Freedreno] [PATCH v5 3/4] drm/msm/mdp4: move resource allocation to the _probe function

2023-10-09 Thread Dmitry Baryshkov
To let the probe function bail early if any of the resources is unavailable, move resource allocattion from kms_init directly to the probe callback. While we are at it, replace irq_of_parse_and_map() with platform_get_irq(). Reviewed-by: Abhinav Kumar Reviewed-by: Rob Clark Signed-off-by: Dmitry

[Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 22 +

[Freedreno] [PATCH v2 00/13] drm/msm: move KMS code from msm_drv.c

2023-10-09 Thread Dmitry Baryshkov
Currently both msm_drm_init() and msm_drm_uninit() functions are trying to handle both normal and headless Adreno cases. This results in a suboptimal code, since headless case still gets modesetting and atomic interfaces enabled. Two mentioned functions are a spaghetti of `if (priv->kms)' condition

[Freedreno] [PATCH v2 01/13] drm/msm/dsi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
Make MSM DSI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 28 +++

[Freedreno] [PATCH v2 04/13] drm/msm/dp: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
Make MSM DP driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 9 ++

[Freedreno] [PATCH v2 05/13] drm/msm: remove msm_drm_private::bridges field

2023-10-09 Thread Dmitry Baryshkov
As all output devices have switched to devm_drm_bridge_add(), we can drop the bridges array from struct msm_drm_private. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 4 drivers/gpu/drm/msm/msm_drv.h | 3 --- 2 files changed, 7 deletions(-) dif

[Freedreno] [PATCH v2 03/13] drm/msm/dp: move pdev from struct dp_display_private to struct msm_dp

2023-10-09 Thread Dmitry Baryshkov
The dp_drm needs accessing the DP's platform device. Move pdev to the public structure. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 25 - drivers/gpu/drm/msm/dp/dp_display.h | 1 + 2 files changed, 13 insertions(+), 1

[Freedreno] [PATCH v2 06/13] drm/msm: drop pm ops from the headless msm driver

2023-10-09 Thread Dmitry Baryshkov
The msm_pm_prepare()/msm_pm_complete() only make sense for the KMS-enabled devices, they have priv->kms guards inside. Drop global msm_pm_ops, which were used only by the headless msm device. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 6 -- 1

[Freedreno] [PATCH v2 08/13] drm/msm: remove shutdown callback from msm_platform_driver

2023-10-09 Thread Dmitry Baryshkov
The msm_drv_shutdown only makes sense for the KMS-enabled devices, while msm_platform_driver is only used in the headless case. Remove the shutdown callback from the driver structure. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 1 - 1 file changed,

[Freedreno] [PATCH v2 07/13] drm/msm: rename msm_pm_prepare/complete to note the KMS nature

2023-10-09 Thread Dmitry Baryshkov
Rename the msm_pm_prepare() and msm_pm_complete() to msm_kms_pm_prepare() and msm_kms_pm_complete() consequently. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 ++-- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 ++-- drivers/gpu/drm/msm/

[Freedreno] [PATCH v2 13/13] drm/msm: carve out KMS code from msm_drv.c

2023-10-09 Thread Dmitry Baryshkov
The msm_drv.c contains generic code intermixed with KMS handling code. Move all KMS-related code to a separate msm_kms.c file, cleaning up init code while doing this move. This also prevents msm driver from registering modesetting / atomic interfaces in the headless case. Reviewed-by: Rob Clark S

[Freedreno] [PATCH v2 12/13] drm/msm: make fb debugfs file available only in KMS case

2023-10-09 Thread Dmitry Baryshkov
Don't register the 'fb' debugfs file, if there is no KMS (and so no framebuffers). Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_debugfs.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/driver

[Freedreno] [PATCH v2 09/13] drm/msm: rename msm_drv_shutdown() to msm_kms_shutdown()

2023-10-09 Thread Dmitry Baryshkov
The msm_drv_shutdown function should only be used in the KMS case. Rename it accordingly. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +-

[Freedreno] [PATCH v2 10/13] drm/msm: switch to drmm_mode_config_init()

2023-10-09 Thread Dmitry Baryshkov
Switch to drmm_mode_config_init() instead of drm_mode_config_init(). Drop drm_mode_config_cleanup() calls. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm

[Freedreno] [PATCH v2 11/13] drm/msm: only register 'kms' debug file if KMS is used

2023-10-09 Thread Dmitry Baryshkov
There is little point in having the empty debugfs file which always returns -ENODEV. Change this file to be created only if KMS is actually used. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(

Re: [Freedreno] [PATCH 2/3] drm/bridge: migrate bridge_chains to per-encoder file

2023-10-09 Thread Dmitry Baryshkov
On 06/10/2023 10:51, Tomi Valkeinen wrote: Hi, On 06/10/2023 10:35, Neil Armstrong wrote: Hi, On 04/09/2023 03:53, Dmitry Baryshkov wrote: Instead of having a single file with all bridge chains, list bridges under a corresponding per-encoder debugfs directory. Example of the listing: $ cat

Re: [Freedreno] [PATCH v2 01/13] drm/msm/dsi: switch to devm_drm_bridge_add()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM DSI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov

Re: [Freedreno] [PATCH v2 01/13] drm/msm/dsi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 21:39, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM DSI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by: R

[Freedreno] [PATCH v2 0/3] drm: introduce per-encoder debugfs directory

2023-10-09 Thread Dmitry Baryshkov
Each of connectors and CRTCs used by the DRM device provides debugfs directory, which is used by several standard debugfs files and can further be extended by the driver. Add such generic debugfs directories for encoder. As a showcase for this dir, migrate `bridge_chains' debugfs file (which contai

[Freedreno] [PATCH v2 1/3] drm/encoder: register per-encoder debugfs dir

2023-10-09 Thread Dmitry Baryshkov
Each of connectors and CRTCs used by the DRM device provides debugfs directory, which is used by several standard debugfs files and can further be extended by the driver. Add such generic debugfs directories for encoder. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov --- drivers/gp

[Freedreno] [PATCH v2 2/3] drm/bridge: migrate bridge_chains to per-encoder file

2023-10-09 Thread Dmitry Baryshkov
Instead of having a single file with all bridge chains, list bridges under a corresponding per-encoder debugfs directory. While we are at it, also slightly improve the formatting of the bridge data: split a single line entry into multiple lines, include the symbol name of the bridge funcs and add

[Freedreno] [PATCH v2 3/3] drm/msm/dpu: move encoder status to standard encoder debugfs dir

2023-10-09 Thread Dmitry Baryshkov
Now as we have standard per-encoder debugfs directory, move DPU encoder status file to that directory. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 45 +++-- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/msm/di

Re: [Freedreno] [PATCH v2 01/13] drm/msm/dsi: switch to devm_drm_bridge_add()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:46 AM, Dmitry Baryshkov wrote: On 09/10/2023 21:39, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM DSI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created

Re: [Freedreno] [PATCH v2 01/13] drm/msm/dsi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 21:51, Abhinav Kumar wrote: On 10/9/2023 11:46 AM, Dmitry Baryshkov wrote: On 09/10/2023 21:39, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM DSI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require a

Re: [Freedreno] [PATCH v2 01/13] drm/msm/dsi: switch to devm_drm_bridge_add()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 12:01 PM, Dmitry Baryshkov wrote: On 09/10/2023 21:51, Abhinav Kumar wrote: On 10/9/2023 11:46 AM, Dmitry Baryshkov wrote: On 09/10/2023 21:39, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM DSI driver use devm_drm_bridge_add() instead of plai

Re: [Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov

Re: [Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 22:19, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bridge to the priv->bridges array. Reviewed-by:

Re: [Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 12:21 PM, Dmitry Baryshkov wrote: On 09/10/2023 22:19, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding create

Re: [Freedreno] [PATCH v2 06/13] drm/msm: drop pm ops from the headless msm driver

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: The msm_pm_prepare()/msm_pm_complete() only make sense for the KMS-enabled devices, they have priv->kms guards inside. Drop global msm_pm_ops, which were used only by the headless msm device. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshko

Re: [Freedreno] [PATCH v2 07/13] drm/msm: rename msm_pm_prepare/complete to note the KMS nature

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Rename the msm_pm_prepare() and msm_pm_complete() to msm_kms_pm_prepare() and msm_kms_pm_complete() consequently. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 ++-- drivers/gpu/drm/m

Re: [Freedreno] [PATCH v2 10/13] drm/msm: switch to drmm_mode_config_init()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Switch to drmm_mode_config_init() instead of drm_mode_config_init(). Drop drm_mode_config_cleanup() calls. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- 1 file changed, 5 insertion

Re: [Freedreno] [PATCH v2 08/13] drm/msm: remove shutdown callback from msm_platform_driver

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: The msm_drv_shutdown only makes sense for the KMS-enabled devices, while msm_platform_driver is only used in the headless case. Remove the shutdown callback from the driver structure. Reviewed-by: Rob Clark Signed-off-by: Dmitry Baryshkov ---

Re: [Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
On 09/10/2023 22:21, Dmitry Baryshkov wrote: On 09/10/2023 22:19, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't require any additional cleanup, stop adding created bri

[Freedreno] [PATCH 0/5] drm/msm/dsi: remove unused fields

2023-10-09 Thread Dmitry Baryshkov
As a followup to [1], as suggested by Abhinav drop unused fields from struct msm_dsi. [1] https://patchwork.freedesktop.org/series/120125/ Dmitry Baryshkov (5): drm/msm/dsi: do not store internal bridge pointer drm/msm/dsi: drop msm_dsi_device_connected() function drm/msm/dsi: stop calling

[Freedreno] [PATCH 2/5] drm/msm/dsi: drop msm_dsi_device_connected() function

2023-10-09 Thread Dmitry Baryshkov
Since the commit 8f59ee9a570c ("drm/msm/dsi: Adjust probe order") the DSI hosts are not bound through the component framework if the DSI driver wasn't attached to the DSI device connected to this host. Afterwards, if there is no bridge (including the panel bridge) created for the DSI device then d

[Freedreno] [PATCH 1/5] drm/msm/dsi: do not store internal bridge pointer

2023-10-09 Thread Dmitry Baryshkov
Since the driver was switched to devm_drm_bridge_add(), there is no need anymore to store the created bridge instance in struct msm_dsi. Drop this field and pass data directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 8 +--- drivers/gpu/drm/msm/dsi/dsi.h

[Freedreno] [PATCH 3/5] drm/msm/dsi: stop calling set_split_display

2023-10-09 Thread Dmitry Baryshkov
Since the commit 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual DSI mode"), the second DSI host in the bonded pair will not be associated with the encoder and will not get the bridges, thus making condition in msm_dsi_manager_set_split_display() always false. Technically that change broke

[Freedreno] [PATCH 4/5] drm/msm/dsi: remove msm_dsi::encoder

2023-10-09 Thread Dmitry Baryshkov
There is no need anymore to stop the drm_encoder instance in struct msm_dsi. Remove corresponding field. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 4 +--- drivers/gpu/drm/msm/dsi/dsi.h | 6 ++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 8 +++- 3 fil

[Freedreno] [PATCH 5/5] drm/msm/mdp5: drop split display support

2023-10-09 Thread Dmitry Baryshkov
The MSM DSI driver has dropped support for calling mdp_kms_funcs::set_split_display() callback. Drop corresponding callback from the mdp5 driver together with the rest of the infrastructure. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c | 42 --

Re: [Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Abhinav Kumar
On 10/9/2023 1:53 PM, Dmitry Baryshkov wrote: On 09/10/2023 22:21, Dmitry Baryshkov wrote: On 09/10/2023 22:19, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm_bridge_add(). As the driver doesn't requi

Re: [Freedreno] [PATCH v2 02/13] drm/msm/hdmi: switch to devm_drm_bridge_add()

2023-10-09 Thread Dmitry Baryshkov
On 10/10/2023 00:04, Abhinav Kumar wrote: On 10/9/2023 1:53 PM, Dmitry Baryshkov wrote: On 09/10/2023 22:21, Dmitry Baryshkov wrote: On 09/10/2023 22:19, Abhinav Kumar wrote: On 10/9/2023 11:10 AM, Dmitry Baryshkov wrote: Make MSM HDMI driver use devm_drm_bridge_add() instead of plain drm

[Freedreno] [PATCH v3 0/6] SDM670 display subsystem support

2023-10-09 Thread Richard Acayan
Changes since v2 (20231003012119.857198-9-mailingrad...@gmail.com): - rebase on series and reference generic sblk definitions (5/6) - add interconnects properties in example (3/6) - remove phy-names properties from dtsi (6/6) - accumulate review tags (4/6, 6/6) Changes since v1 (20230925232625

[Freedreno] [PATCH v3 1/6] dt-bindings: display/msm: dsi-controller-main: add SDM670 compatible

2023-10-09 Thread Richard Acayan
The SDM670 has DSI ports. Add the compatible for the controller. Acked-by: Rob Herring Signed-off-by: Richard Acayan --- .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-contro

[Freedreno] [PATCH v3 3/6] dt-bindings: display: msm: Add SDM670 MDSS

2023-10-09 Thread Richard Acayan
Add documentation for the SDM670 display subsystem, adapted from the SDM845 and SM6125 documentation. Signed-off-by: Richard Acayan --- .../display/msm/qcom,sdm670-mdss.yaml | 292 ++ 1 file changed, 292 insertions(+) create mode 100644 Documentation/devicetree/bindings

[Freedreno] [PATCH v3 4/6] drm/msm: mdss: add support for SDM670

2023-10-09 Thread Richard Acayan
Add support for the MDSS block on the SDM670 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Richard Acayan --- drivers/gpu/drm/msm/msm_mdss.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index 2e87dd6cb17b..2a

[Freedreno] [PATCH v3 2/6] dt-bindings: display/msm: sdm845-dpu: Describe SDM670

2023-10-09 Thread Richard Acayan
The SDM670 display controller has the same requirements as the SDM845 display controller, despite having distinct properties as described in the catalog. Add the compatible for SDM670 to the SDM845 controller. Acked-by: Rob Herring Signed-off-by: Richard Acayan --- .../devicetree/bindings/displ

[Freedreno] [PATCH v3 5/6] drm/msm/dpu: Add hw revision 4.1 (SDM670)

2023-10-09 Thread Richard Acayan
The Snapdragon 670 uses similar clocks (with one frequency added) to the Snapdragon 845 but reports DPU revision 4.1. Add support for this DPU with configuration from the Pixel 3a downstream kernel. Since revision 4.0 is SDM845, reuse some configuration from its catalog entry. Link: https://andr

[Freedreno] [PATCH v3 6/6] arm64: dts: qcom: sdm670: add display subsystem

2023-10-09 Thread Richard Acayan
The Snapdragon 670 has a display subsystem for controlling and outputting to the display. Add support for it in the device tree. Reviewed-by: Dmitry Baryshkov Signed-off-by: Richard Acayan --- arch/arm64/boot/dts/qcom/sdm670.dtsi | 292 +++ 1 file changed, 292 insertions

[Freedreno] [PATCH] drm/msm: fix fault injection support

2023-10-09 Thread Dmitry Baryshkov
Readd the header that was erroneously dropped during KMS code refactoring. Fixes: 506efcba3129 ("drm/msm: carve out KMS code from msm_drv.c") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310100836.6e6zjece-...@intel.com/ Signed-off-by: Dmitry Baryshkov --- dr

[Freedreno] [PATCH] drm/msm: don't create GPU-related debugfs files with no GPU present

2023-10-09 Thread Dmitry Baryshkov
If there is no GPU present, skip creation of the GPU-related debugfs files, making the MSM's debugfs more usable. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_debugfs.c | 41 +++ drivers/gpu/drm/msm/msm_rd.c | 3 +++ 2 files changed, 28 insertions