Re: [Freedreno] [PATCH] dt-bindings: yamllint: Require a space after a comment '#'

2023-03-06 Thread Stephen Boyd
Quoting Rob Herring (2023-03-03 13:42:23) > Enable yamllint to check the prefered commenting style of requiring a > space after a comment character '#'. Fix the cases in the tree which > have a warning with this enabled. Most cases just need a space after the > '#'. A couple of cases with comments

Re: [Freedreno] [PATCH v14 00/14] Add PSR support for eDP

2023-03-06 Thread Doug Anderson
Hi, On Thu, Mar 2, 2023 at 8:33 AM Vinod Polimera wrote: > > Changes in v2: > - Use dp bridge to set psr entry/exit instead of dpu_enocder. > - Don't modify whitespaces. > - Set self refresh aware from atomic_check. > - Set self refresh aware only if psr is supported. > - Provide a stub

[Freedreno] [PATCH] drm/msm/dpu: Fix bit-shifting UB in DPU_HW_VER() macro

2023-03-06 Thread Geert Uytterhoeven
With gcc-5 and CONFIG_UBSAN_SHIFT=y: drivers/gpu/drm/msm/msm_mdss.c: In function 'msm_mdss_enable': drivers/gpu/drm/msm/msm_mdss.c:296:2: error: case label does not reduce to an integer constant case DPU_HW_VER_800: ^ drivers/gpu/drm/msm/msm_mdss.c:299:2: error: case label

Re: [Freedreno] [PATCH 09/10] drm/msm: use drmm_mode_config_init()

2023-03-06 Thread Johan Hovold
On Mon, Mar 06, 2023 at 02:38:37PM +0200, Dmitry Baryshkov wrote: > On 06/03/2023 12:07, Johan Hovold wrote: > > Switch to using drmm_mode_config_init() so that the mode config is > > released when the last reference to the DRM device is dropped rather > > than unconditionally at unbind() (which ma

Re: [Freedreno] [PATCH 09/10] drm/msm: use drmm_mode_config_init()

2023-03-06 Thread Dmitry Baryshkov
On 06/03/2023 12:07, Johan Hovold wrote: Switch to using drmm_mode_config_init() so that the mode config is released when the last reference to the DRM device is dropped rather than unconditionally at unbind() (which may be too soon). This also means that drm_bridge_detach() might be called at

[Freedreno] [PATCH 07/10] drm/msm: fix missing wq allocation error handling

2023-03-06 Thread Johan Hovold
Add the missing sanity check to handle workqueue allocation failures. Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Cc: sta...@vger.kernel.org # 3.12 Cc: Rob Clark Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/msm_drv.c | 4 1 file changed, 4 insertions(+) di

[Freedreno] [PATCH 10/10] drm/msm: move include directive

2023-03-06 Thread Johan Hovold
Move the include of of_address.h to the top of the file where it belongs. Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/msm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index ade17947d1e5..42ae7575

[Freedreno] [PATCH 01/10] Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue"

2023-03-06 Thread Johan Hovold
This reverts commit 643b7d0869cc7f1f7a5ac7ca6bd25d88f54e31d0. A recent patch that tried to fix up the msm_drm_init() paths with respect to the workqueue but only ended up making things worse: First, the newly added calls to msm_drm_uninit() on early errors would trigger NULL-pointer dereferences,

[Freedreno] [PATCH 04/10] drm/msm: fix NULL-deref on irq uninstall

2023-03-06 Thread Johan Hovold
In case of early initialisation errors and on platforms that do not use the DPU controller, the deinitilisation code can be called with the kms pointer set to NULL. Fixes: f026e431cf86 ("drm/msm: Convert to Linux IRQ interfaces") Cc: sta...@vger.kernel.org # 5.14 Cc: Thomas Zimmermann Signed

[Freedreno] [PATCH 00/10] drm/msm: fix bind error handling

2023-03-06 Thread Johan Hovold
I had reasons to look closer at the MSM DRM driver error handling and realised that it had suffered from a fair amount of bit rot over the years. Unfortunately, I started fixing this in my 6.2 branch and failed to notice two partial and, as it turned out, broken attempts to address this that are n

[Freedreno] [PATCH 03/10] drm/msm: fix NULL-deref on snapshot tear down

2023-03-06 Thread Johan Hovold
In case of early initialisation errors and on platforms that do not use the DPU controller, the deinitilisation code can be called with the kms pointer set to NULL. Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot") Cc: sta...@vger.kernel.org # 5.14 Cc: Abhinav Kumar Signed-of

[Freedreno] [PATCH 05/10] drm/msm: fix drm device leak on bind errors

2023-03-06 Thread Johan Hovold
Make sure to free the DRM device also in case of early errors during bind(). Fixes: 2027e5b3413d ("drm/msm: Initialize MDSS irq domain at probe time") Cc: sta...@vger.kernel.org # 5.17 Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/msm_drv.c | 10 -- 1 fil

[Freedreno] [PATCH 09/10] drm/msm: use drmm_mode_config_init()

2023-03-06 Thread Johan Hovold
Switch to using drmm_mode_config_init() so that the mode config is released when the last reference to the DRM device is dropped rather than unconditionally at unbind() (which may be too soon). Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- 1 file changed, 5 inse

[Freedreno] [PATCH 06/10] drm/msm: fix vram leak on bind errors

2023-03-06 Thread Johan Hovold
Make sure to release the VRAM buffer also in a case a subcomponent fails to bind. Fixes: d863f0c7b536 ("drm/msm: Call msm_init_vram before binding the gpu") Cc: sta...@vger.kernel.org # 5.11 Cc: Craig Tatlor Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/msm_drv.c | 26 +++

[Freedreno] [PATCH 02/10] Revert "drm/msm: Fix failure paths in msm_drm_init()"

2023-03-06 Thread Johan Hovold
This reverts commit 8636500300a01740d92b345c680b036b94555b1b. A recent commit tried to address a drm device leak in the early msm_drm_uninit() error paths but ended up making things worse. Specifically, it moved the drm device reference put in msm_drm_uninit() to msm_drm_init() which means that t

[Freedreno] [PATCH 08/10] drm/msm: fix workqueue leak on bind errors

2023-03-06 Thread Johan Hovold
Make sure to destroy the workqueue also in case of early errors during bind (e.g. a subcomponent failing to bind). Since commit c3b790ea07a1 ("drm: Manage drm_mode_config_init with drmm_") the mode config will be freed when the drm device is released also when using the legacy interface, but add a

Re: [Freedreno] [PATCH v3 2/2] dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible

2023-03-06 Thread Konrad Dybcio
On 6.03.2023 09:57, Krzysztof Kozlowski wrote: > On 04/03/2023 16:55, Konrad Dybcio wrote: >> Since the DSI autodetection is bound to work correctly on 6115 now, >> switch to using the correct per-SoC + generic fallback compatible >> combo. >> >> Signed-off-by: Konrad Dybcio >> --- >> .../devi

Re: [Freedreno] [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible

2023-03-06 Thread Konrad Dybcio
On 4.03.2023 18:53, Bryan O'Donoghue wrote: > On 04/03/2023 17:45, Bryan O'Donoghue wrote: >> On 04/03/2023 17:35, Konrad Dybcio wrote: you'll see no error. However if you just do this diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi

Re: [Freedreno] [PATCH v3 2/2] dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible

2023-03-06 Thread Krzysztof Kozlowski
On 04/03/2023 16:55, Konrad Dybcio wrote: > Since the DSI autodetection is bound to work correctly on 6115 now, > switch to using the correct per-SoC + generic fallback compatible > combo. > > Signed-off-by: Konrad Dybcio > --- > .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml

Re: [Freedreno] [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible

2023-03-06 Thread Krzysztof Kozlowski
On 04/03/2023 16:55, Konrad Dybcio wrote: > The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" > alone. This however didn't quite work out and the property became s/property/compatible/ > undocumented instead of deprecated. Fix that. Reviewed-by: Krzysztof Kozlowski Best r