Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/msm/mdp5: inaccurate Fixes trailer in mdp5_kms_init() unwind
  commit
--

commit 9e7e45efa8a5a51745ca779b3100de8c25d89be0
Author: Dmitry Baryshkov <[email protected]>

> drm/msm/mdp5: unwind a failed mdp5_kms_init()
>
> mdp5_kms_init() returns straight away when one of its later steps fails,
> leaving behind the kms, the runtime PM reference taken around the address
> space setup and the address space itself, and lets the ->destroy()
> callback, which the caller runs afterwards, clean up. When mdp5_init()
> fails, however, it has already run mdp5_destroy() itself, and ->destroy()
> runs it a second time: the global state object is finalised twice.
>
> Undo the steps which have completed, in the reverse order, drop the
> runtime PM reference on the error path as well, and tell the caller not
> to run ->destroy() after a failed init. Fold the hardware setup, which
> can't fail, into mdp5_kms_init().
>
> Fixes: 8d58ef346f30 ("drm/msm/mdp5: Add global state as a private atomic 
> object")
> Assisted-by: LLM
> Acked-by: Konrad Dybcio <[email protected]>
> Signed-off-by: Dmitry Baryshkov <[email protected]>

[Severity: Low]
Is the Fixes tag pointing at the right commit?

At 8d58ef346f30 ("drm/msm/mdp5: Add global state as a private atomic
object"), mdp5_init() was called from mdp5_bind() rather than
mdp5_kms_init(), mdp5_destroy() was called from mdp5_unbind() rather than
mdp5_kms_destroy(), and mdp5_kms_init() unwound on failure via its own
fail label instead of returning early.

Calling mdp5_init() from mdp5_kms_init() and mdp5_destroy() from
mdp5_kms_destroy() was introduced in 6874f48bb8b0 ("drm/msm: make mdp5/dpu
devices master components"), while returning early from mdp5_kms_init() to
rely on the caller's ->destroy() callback was introduced in 93c125e4ea98
("drm/msm: don't tear down KMS twice when KMS init fails").

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/20261127-msm-kms-destroy-fixes-v4-0-242b0a3f8...@oss.qualcomm.com?part=7

Reply via email to