Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] pm: omitted reordering of pm_runtime_set_suspended() contrary to commit message --
commit e5b622a5bf50c2417ee98e980c4b45ec511cb4e7 Author: Adrián Larumbe <[email protected]> drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove This commit attempts to fix PM reference count and autosuspend issues during device probe and removal. It manually adjusts the PM reference count, disables autosuspend in wind-down paths, and aims to reorder PM teardown steps to mirror initialization. > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c > b/drivers/gpu/drm/panfrost/panfrost_drv.c > index 55fc22e8d4d4e..907d4a14a0b55 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c [ ... ] > @@ -866,13 +871,16 @@ static int panfrost_probe(struct platform_device *pdev) [ ... ] > err_out1: > + pm_runtime_dont_use_autosuspend(pfdev->base.dev); > pm_runtime_disable(pfdev->base.dev); > panfrost_device_fini(pfdev); > pm_runtime_set_suspended(pfdev->base.dev); [Severity: Medium] The commit message states "Move pm_runtime_set_suspended() before panfrost_device_fini() so that resource unwinding happens in the opposite order as initialisation." However, this structural reordering appears to be missing from the code. Should pm_runtime_set_suspended() be moved above panfrost_device_fini() in the panfrost_probe() error path to match the intent described in the commit message? > + pm_runtime_put_noidle(pfdev->base.dev); > err_out0: > return err; > } > @@ -884,9 +892,12 @@ static void panfrost_remove(struct platform_device *pdev) [ ... ] > pm_runtime_get_sync(pfdev->base.dev); > + pm_runtime_dont_use_autosuspend(pfdev->base.dev); > pm_runtime_disable(pfdev->base.dev); > panfrost_device_fini(pfdev); > pm_runtime_set_suspended(pfdev->base.dev); [Severity: Medium] Similarly, in the panfrost_remove() path, the reordering mentioned in the commit message is omitted. Should pm_runtime_set_suspended() be moved above panfrost_device_fini() here as well? > + pm_runtime_put_noidle(pfdev->base.dev); > + > } -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
