Re: [Freedreno] [PATCH] drm/msm/dsi: Implement reset correctly

2019-10-10 Thread Jeffrey Hugo
On Thu, Oct 10, 2019 at 12:49 PM Sean Paul wrote: > > On Thu, Oct 10, 2019 at 2:45 PM Sean Paul wrote: > > > > On Wed, Oct 09, 2019 at 02:34:54PM -0700, Jeffrey Hugo wrote: > > > On msm8998, vblank timeouts are observed because the DSI controller is not > > > reset properly, which ends up

Re: [Freedreno] [PATCH v2 3/5] drm/msm/dsi: Add configuration for 28nm PLL on family B

2019-10-10 Thread Sean Paul
On Thu, Sep 26, 2019 at 12:52:54PM +0200, khol...@gmail.com wrote: > From: "Angelo G. Del Regno" > > The 28nm PLL has a different iospace on MSM/APQ family B SoCs: > add a new configuration and use it when the DT reports the > "qcom,dsi-phy-28nm-hpm-fam-b" compatible. > > Signed-off-by: Angelo

Re: [Freedreno] [PATCH v2 1/5] drm/msm/mdp5: Add optional TBU and TBU_RT clocks

2019-10-10 Thread Sean Paul
On Thu, Sep 26, 2019 at 12:52:52PM +0200, khol...@gmail.com wrote: > From: "Angelo G. Del Regno" Hi Angelo, Thank you for your patches! > > Some SoCs, like MSM8956/8976 (and APQ variants), do feature these > clocks and we need to enable them in order to get the hardware to > properly work.

Re: [Freedreno] [PATCH] drm/msm/dsi: Implement reset correctly

2019-10-10 Thread Sean Paul
On Thu, Oct 10, 2019 at 2:45 PM Sean Paul wrote: > > On Wed, Oct 09, 2019 at 02:34:54PM -0700, Jeffrey Hugo wrote: > > On msm8998, vblank timeouts are observed because the DSI controller is not > > reset properly, which ends up stalling the MDP. This is because the reset > > logic is not correct

Re: [Freedreno] [PATCH] drm/msm/dsi: Implement reset correctly

2019-10-10 Thread Sean Paul
On Wed, Oct 09, 2019 at 02:34:54PM -0700, Jeffrey Hugo wrote: > On msm8998, vblank timeouts are observed because the DSI controller is not > reset properly, which ends up stalling the MDP. This is because the reset > logic is not correct per the hardware documentation. > > The documentation

[Freedreno] [PATCH v2] drm/msm: Sanitize the modeset_is_locked checks in dpu

2019-10-10 Thread Sean Paul
From: Sean Paul As Daniel mentions in his email [1], non-blocking commits don't hold the modeset locks, so we can safely access state as long as these functions are in the commit path. So remove the WARN_ON in dpu_kms_encoder_enable. In dpu_crtc_get_intf_mode, things are a bit more complicated.

[Freedreno] [PATCH 3/4] media: radio: wl1273: fix interrupt masking on release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the radio device and the core lock is contended, release() could return early and fail to update the interrupt mask. Note that the return value of the v4l2 release file operation is ignored. Fixes: 87d1a50ce451 ("[media] V4L2: WL1273 FM Radio: TI

Re: [Freedreno] [PATCH 2/4] media: bdisp: fix memleak on release

2019-10-10 Thread Fabien DESSENNE
Hi Johan Thank you for the patch BR Fabien On 10/10/2019 3:13 PM, Johan Hovold wrote: > If a process is interrupted while accessing the video device and the > device lock is contended, release() could return early and fail to free > related resources. > > Note that the return value of the

[Freedreno] [PATCH 0/4] treewide: fix interrupted release

2019-10-10 Thread Johan Hovold
Two old USB drivers had a bug in them which could lead to memory leaks if an interrupted process raced with a disconnect event. Turns out we had a few more driver in other subsystems with the same kind of bug in them. Note that all but the s390 patch have only been compile tested, while the s390

[Freedreno] [PATCH 1/4] drm/msm: fix memleak on release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the "gpu" debugfs file and the drm device struct_mutex is contended, release() could return early and fail to free related resources. Note that the return value from release() is ignored. Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function

[Freedreno] [PATCH 2/4] media: bdisp: fix memleak on release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the video device and the device lock is contended, release() could return early and fail to free related resources. Note that the return value of the v4l2 release file operation is ignored. Fixes: 28ffeebbb7bd ("[media] bdisp: 2D blitter driver using

[Freedreno] [PATCH 4/4] s390/zcrypt: fix memleak at release

2019-10-10 Thread Johan Hovold
If a process is interrupted while accessing the crypto device and the global ap_perms_mutex is contented, release() could return early and fail to free related resources. Fixes: 00fab2350e6b ("s390/zcrypt: multiple zcrypt device nodes support") Cc: stable # 4.19 Cc: Harald Freudenberger Cc:

Re: [Freedreno] [PATCH] Revert "drm/msm: dpu: Add modeset lock checks where applicable"

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 5:13 PM Sean Paul wrote: > > From: Sean Paul > > This reverts commit 1dfdb0e107dbe6ebff3f6bbbe4aad0b5aa87bba4. > > As Daniel mentions in his email [1], non-blocking commits don't hold the > modeset locks, so we can safely access state as long as these functions > are in

[Freedreno] [PATCH] Revert "drm/msm: dpu: Add modeset lock checks where applicable"

2019-10-10 Thread Sean Paul
From: Sean Paul This reverts commit 1dfdb0e107dbe6ebff3f6bbbe4aad0b5aa87bba4. As Daniel mentions in his email [1], non-blocking commits don't hold the modeset locks, so we can safely access state as long as these functions are in the commit path. I'm not entirely sure if these have always been

Re: [Freedreno] [PATCH 0/4] treewide: fix interrupted release

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 03:13:29PM +0200, Johan Hovold wrote: > Two old USB drivers had a bug in them which could lead to memory leaks > if an interrupted process raced with a disconnect event. > > Turns out we had a few more driver in other subsystems with the same > kind of bug in them. > >

Re: [Freedreno] [PATCH v2 16/24] drm/msm: dpu: Add modeset lock checks where applicable

2019-10-10 Thread Sean Paul
On Thu, Oct 10, 2019 at 12:20:56AM +0200, Daniel Vetter wrote: > On Fri, Nov 16, 2018 at 7:44 PM Sean Paul wrote: > > > > From: Sean Paul > > > > Add modeset lock checks to functions that could be called outside the > > core atomic stack. > > > > Changes in v2: > > - None > > > > Signed-off-by:

[Freedreno] [PATCH 0/4] drm/msm: Remove four set but not used variables

2019-10-10 Thread zhengbin
zhengbin (4): drm/msm/mdp5: Remove set but not used variable 'fmt' drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup drm/msm/dsi: Remove set but not used variable 'lpx' drm/msm/dsi: Remove set but not used variable 'lp' drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 3

[Freedreno] [PATCH 3/4] drm/msm/dsi: Remove set but not used variable 'lpx'

2019-10-10 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/dsi/phy/dsi_phy.c: In function msm_dsi_dphy_timing_calc_v2: drivers/gpu/drm/msm/dsi/phy/dsi_phy.c:156:17: warning: variable lpx set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/dsi/phy/dsi_phy.c: In function

[Freedreno] [PATCH 4/4] drm/msm/dsi: Remove set but not used variable 'lp'

2019-10-10 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/dsi/dsi_host.c: In function dsi_cmd_dma_rx: drivers/gpu/drm/msm/dsi/dsi_host.c:1302:7: warning: variable lp set but not used [-Wunused-but-set-variable] It is not used since commit a689554ba6ed ("drm/msm: Initial add DSI

[Freedreno] [PATCH 2/4] drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup

2019-10-10 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c: In function blend_setup: drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:225:28: warning: variable hw_cfg set but not used [-Wunused-but-set-variable] It is not used since commit 14be3200cd5f ("drm/msm: rename

[Freedreno] [PATCH 1/4] drm/msm/mdp5: Remove set but not used variable 'fmt'

2019-10-10 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function mdp5_smp_calculate: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:134:6: warning: variable fmt set but not used [-Wunused-but-set-variable] It is not used since commit 24c478ead0bf ("drm/fourcc: Pass