[Freedreno] [PATCH] drm/msm/a6xx: Remove some unused functions

2023-10-11 Thread Jiapeng Chong
These functions are defined in the a6xx_gpu_state.h file, but not called elsewhere, so delete these unused functions. drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h:356:36: warning: ‘a7xx_ahb_reglist’ defined but not used. drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h:360:36: warning: ‘a7xx_gbif_regl

[Freedreno] [PATCH v2 2/2] drm/msm/dsi: free TX buffer in unbind

2023-10-11 Thread Dmitry Baryshkov
If the drm/msm init code gets an error during output modeset initialisation, the kernel will report an error regarding DRM memory manager not being clean during shutdown. This is because msm_dsi_modeset_init() allocates a piece of GEM memory for the TX buffer, but destruction of the buffer happens

[Freedreno] [PATCH v2 1/2] drm/msm/dsi: use msm_gem_kernel_put to free TX buffer

2023-10-11 Thread Dmitry Baryshkov
Use exiting function to free the allocated GEM object instead of open-coding it. This has a bonus of internally calling msm_gem_put_vaddr() to compensate for msm_gem_get_vaddr() in msm_get_kernel_new(). Fixes: 1e29dff00400 ("drm/msm: Add a common function to free kernel buffer objects") Signed-of

[Freedreno] [PATCH v2 0/2] drm/msm/dsi: fix handling of TX DMA buffer

2023-10-11 Thread Dmitry Baryshkov
Fix two issues in how the MSM DSI driver handles the GEM-allocated TX DMA buffer object. Changes since v1: - Dropped the unused 'priv' variable from msm_dsi_tx_buf_free() Dmitry Baryshkov (2): drm/msm/dsi: use msm_gem_kernel_put to free TX buffer drm/msm/dsi: free TX buffer in unbind driver

[Freedreno] [PATCH] drm/msm/a7xx: actually use a7xx state registers

2023-10-11 Thread Dmitry Baryshkov
Make a6xx_get_registers() use a7xx registers instead of a6xx ones if the detected Adreno is from the A7xx family. Fixes: e997ae5f45ca ("drm/msm/a6xx: Mostly implement A7xx gpu_state") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 17 + drivers/

Re: [Freedreno] [PATCH v7 5/7] drm/msm/dp: incorporate pm_runtime framework into DP driver

2023-10-11 Thread Dmitry Baryshkov
On 07/10/2023 01:55, Kuogee Hsieh wrote: Currently DP driver is executed independent of PM runtime framework. This leads msm eDP panel can not being detected by edp_panel driver during generic_edp_panel_probe() due to AUX DPCD read failed at edp panel driver. Incorporate PM runtime framework into

Re: [Freedreno] [PATCH v7 5/7] drm/msm/dp: incorporate pm_runtime framework into DP driver

2023-10-11 Thread Dmitry Baryshkov
On 07/10/2023 01:55, Kuogee Hsieh wrote: Currently DP driver is executed independent of PM runtime framework. This leads msm eDP panel can not being detected by edp_panel driver during generic_edp_panel_probe() due to AUX DPCD read failed at edp panel driver. Incorporate PM runtime framework into

[Freedreno] [PATCH 2/2] drm/msm/dsi: free TX buffer in unbind

2023-10-11 Thread Dmitry Baryshkov
If the drm/msm init code gets an error during output modeset initialisation, the kernel will report an error regarding DRM memory manager not being clean during shutdown. This is because msm_dsi_modeset_init() allocates a piece of GEM memory for the TX buffer, but destruction of the buffer happens

[Freedreno] [PATCH 1/2] drm/msm/dsi: use msm_gem_kernel_put to free TX buffer

2023-10-11 Thread Dmitry Baryshkov
Use exiting function to free the allocated GEM object instead of open-coding it. This has a bonus of internally calling msm_gem_put_vaddr() to compensate for msm_gem_get_vaddr() in msm_get_kernel_new(). Fixes: 1e29dff00400 ("drm/msm: Add a common function to free kernel buffer objects") Signed-of

[Freedreno] [PATCH 0/2] drm/msm/dsi: fix handling of TX DMA buffer

2023-10-11 Thread Dmitry Baryshkov
Fix two issues in how the MSM DSI driver handles the GEM-allocated TX DMA buffer object. Dmitry Baryshkov (2): drm/msm/dsi: use msm_gem_kernel_put to free TX buffer drm/msm/dsi: free TX buffer in unbind drivers/gpu/drm/msm/dsi/dsi.c | 1 + drivers/gpu/drm/msm/dsi/dsi.h | 1 + dri

[Freedreno] [PATCH] drm/bridge: lt9611uxc: fix the race in the error path

2023-10-11 Thread Dmitry Baryshkov
. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 10 at kernel/locking/mutex.c:582 __mutex_lock+0x468/0x77c Modules linked in: CPU: 0 PID: 10 Comm: kworker/0:1 Tainted: G U 6.6.0-rc5-next-20231011-gd81f81c2b682-dirty #1206 Hardware name: Qualcomm Technologies, Inc. Robotics RB5

[Freedreno] [PATCH 3/3] drm/msm/dp: use correct lifetime device for devm_drm_bridge_add

2023-10-11 Thread Dmitry Baryshkov
The lifetime of the created drm_bridge is attached to the drm_device rather than the DP's platform_device. Use correct lifetime for devm_drm_bridge_add() call. Fixes: 61a72d5efce5 ("drm/msm/dp: switch to devm_drm_bridge_add()") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_drm.c

[Freedreno] [PATCH 2/3] drm/msm/hdmi: use correct lifetime device for devm_drm_bridge_add

2023-10-11 Thread Dmitry Baryshkov
The lifetime of the created drm_bridge is attached to the drm_device rather than the HDMI's platform_device. Use correct lifetime for devm_drm_bridge_add() call. Fixes: 719093a67c7f ("drm/msm/hdmi: switch to devm_drm_bridge_add()") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdm

[Freedreno] [PATCH 1/3] drm/msm/dsi: use correct lifetime device for devm_drm_bridge_add

2023-10-11 Thread Dmitry Baryshkov
The lifetime of the created drm_bridge is attached to the drm_device rather than the DSI's platform_device. Use correct lifetime for devm_drm_bridge_add() call. Fixes: 5f403fd7d5c2 ("drm/msm/dsi: switch to devm_drm_bridge_add()") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_ma

[Freedreno] [PATCH 0/3] drm/msm: use correct lifetime devices for devm_drm_bridge_add

2023-10-11 Thread Dmitry Baryshkov
While reworking the drm/msm driver to use devm_drm_bridge_add() I didn't notice that the drm_bridge instances are allocated with the drm_device used as a lifetime parameter instead of corresponding platform_device. This mostly works fine, in rare cases of device reprobing resulting in the oops such

Re: [Freedreno] [PATCH v2 2/5] drm/msm/dpu: add setup_clk_force_ctrl() op to sspp & wb

2023-10-11 Thread Neil Armstrong
On 11/10/2023 14:45, Dmitry Baryshkov wrote: On Wed, 11 Oct 2023 at 14:59, Neil Armstrong wrote: Starting from SM8550, the SSPP & WB clock controls are moved the SSPP and WB register range, as it's called "VBIF_CLK_SPLIT" downstream. Implement setup_clk_force_ctrl() only starting from major v

Re: [Freedreno] [PATCH v2 4/5] drm/msm/dpu: sm8550: remove unused VIG and DMA clock controls entries

2023-10-11 Thread Dmitry Baryshkov
On Wed, 11 Oct 2023 at 14:59, Neil Armstrong wrote: > > The SM8550 has the SSPP clk_ctrl in the SSPP registers, remove the > duplicate clock controls from the MDP top. > > Signed-off-by: Neil Armstrong > --- > .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 20 > > 1

Re: [Freedreno] [PATCH v2 3/5] drm/msm/dpu: move setup_force_clk_ctrl handling into plane and wb

2023-10-11 Thread Dmitry Baryshkov
On Wed, 11 Oct 2023 at 14:59, Neil Armstrong wrote: > > Now SSPP and WB can have setup_force_clk_ctrl() ops, it's simpler to call > them from the plane and wb code and call into the mdp ops if not present. Reviewed-by: Dmitry Baryshkov > > Signed-off-by: Neil Armstrong > --- > .../gpu/drm/msm

Re: [Freedreno] [PATCH v2 5/5] drm/msm/dpu: enable writeback on SM8550

2023-10-11 Thread Dmitry Baryshkov
On Wed, 11 Oct 2023 at 14:59, Neil Armstrong wrote: > > Enable WB2 hardware block, enabling writeback support on this platform. > > Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 16 > 1 file change

Re: [Freedreno] [PATCH v2 2/5] drm/msm/dpu: add setup_clk_force_ctrl() op to sspp & wb

2023-10-11 Thread Dmitry Baryshkov
On Wed, 11 Oct 2023 at 14:59, Neil Armstrong wrote: > > Starting from SM8550, the SSPP & WB clock controls are moved > the SSPP and WB register range, as it's called "VBIF_CLK_SPLIT" > downstream. > > Implement setup_clk_force_ctrl() only starting from major version 9 > which corresponds to SM8550

[Freedreno] [PATCH v2 3/5] drm/msm/dpu: move setup_force_clk_ctrl handling into plane and wb

2023-10-11 Thread Neil Armstrong
Now SSPP and WB can have setup_force_clk_ctrl() ops, it's simpler to call them from the plane and wb code and call into the mdp ops if not present. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c| 37 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_pla

[Freedreno] [PATCH v2 5/5] drm/msm/dpu: enable writeback on SM8550

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

[Freedreno] [PATCH v2 4/5] drm/msm/dpu: sm8550: remove unused VIG and DMA clock controls entries

2023-10-11 Thread Neil Armstrong
The SM8550 has the SSPP clk_ctrl in the SSPP registers, remove the duplicate clock controls from the MDP top. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 20 1 file changed, 20 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/d

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

2023-10-11 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. Implement setup_clk_force_ctrl() only starting from major version 9 which corresponds to SM8550 MDSS. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/msm/di

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

2023-10-11 Thread Neil Armstrong
Add an helper to setup the force clock control as it will be used in multiple HW files. Reviewed-by: Dmitry Baryshkov 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

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

2023-10-11 Thread Neil Armstrong
Starting with the SM8550 platform, the SSPP & WB Clock Controls are no more in the MDP TOP registers, but in the SSPP & WB register space. Add the corresponding SSPP & WB ops and use them before/after calling the QoS and OT limit setup functions. Signed-off-by: Neil Armstrong --- Changes in v2:

Re: [Freedreno] [PATCH] soc: qcom: pmic_glink: fix connector type to be DisplayPort

2023-10-11 Thread Neil Armstrong
On 11/10/2023 00:52, Dmitry Baryshkov wrote: As it was pointed out by Simon Ser, the DRM_MODE_CONNECTOR_USB connector is reserved for the GUD devices. Other drivers (i915, amdgpu) use DRM_MODE_CONNECTOR_DisplayPort even if the DP stream is handled by the USB-C altmode. While we are still working

Re: [Freedreno] [PATCH] soc: qcom: pmic_glink: fix connector type to be DisplayPort

2023-10-11 Thread Simon Ser
Thanks for fixing this! Acked-by: Simon Ser