On 10/24/26 1:19 AM, Dmitry Baryshkov wrote:
> Unbinding the display driver on MSM8996 with DPU oopses about a second
> later:
> 
>   Unable to handle kernel NULL pointer dereference at virtual address 
> 0000000000000870
>   pc : drm_atomic_commit_alloc+0x10/0x9c
>   lr : drm_self_refresh_helper_entry_work+0x5c/0x1dc
> 
> dpu_crtc_init() sets up the self-refresh helper for each CRTC, but
> nothing ever calls drm_self_refresh_helper_cleanup(). Every modeset
> commit, including the one which shuts the display down on unbind, queues
> the delayed entry work of the helper, which then runs after the CRTC
> and the DRM device have been freed, and its data is leaked.
> 
> Clean the helpers up when tearing down the DPU hardware, which cancels
> the pending work while the KMS is still intact. Doing it from a managed
> action instead would not be enough: the DRM device, and its managed
> resources with it, outlives the unbind as long as userspace holds it
> open.
> 
> Fixes: 1122697810e5 ("drm/msm/disp/dpu: add PSR support for eDP interface in 
> dpu driver")
> Assisted-by: LLM
> Signed-off-by: Dmitry Baryshkov <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

Reply via email to