This is a note to let you know that I've just added the patch titled accel/ivpu: PM: remove broken ivpu_dbg() statements to the 6.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: accel-ivpu-pm-remove-broken-ivpu_dbg-statements.patch and it can be found in the queue-6.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit d131902f17df39bdea1d8095a318514b0281b9bc Author: Arnd Bergmann <arnd@xxxxxxxx> Date: Thu Jan 26 17:37:54 2023 +0100 accel/ivpu: PM: remove broken ivpu_dbg() statements [ Upstream commit 17ab1ea679be48d905559d968a7622f5f212de6e ] When CONFIG_PM is disabled, the driver fails to build: drivers/accel/ivpu/ivpu_pm.c: In function 'ivpu_rpm_get': drivers/accel/ivpu/ivpu_pm.c:240:84: error: 'struct dev_pm_info' has no member named 'usage_count' 240 | ivpu_dbg(vdev, RPM, "rpm_get count %d\n", atomic_read(&vdev->drm.dev->power.usage_count)); | ^ include/linux/dynamic_debug.h:223:29: note: in definition of macro '__dynamic_func_call_cls' 223 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls' 249 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:272:9: note: in expansion of macro '_dynamic_func_call' 272 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg' 155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ drivers/accel/ivpu/ivpu_drv.h:65:17: note: in expansion of macro 'dev_dbg' 65 | dev_dbg((vdev)->drm.dev, "[%s] " fmt, #type, ##args); \ | ^~~~~~~ drivers/accel/ivpu/ivpu_pm.c:240:9: note: in expansion of macro 'ivpu_dbg' 240 | ivpu_dbg(vdev, RPM, "rpm_get count %d\n", atomic_read(&vdev->drm.dev->power.usage_count)); | ^~~~~~~~ It would be possible to rework these statements to only conditionally print the reference counter, or to make the driver depend on CONFIG_PM, but my impression is that these are not actually needed at all if the driver generally works, or they could be put back when required. Just remove all four of these to make the driver build in all configurations. Fixes: 852be13f3bd3 ("accel/ivpu: Add PM support") Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@xxxxxxxxxxxxxxx> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@xxxxxxxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20230126163804.3648051-1-arnd@xxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index bde42d6383da6..aa4d56dc52b39 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/ivpu/ivpu_pm.c @@ -239,8 +239,6 @@ int ivpu_rpm_get(struct ivpu_device *vdev) { int ret; - ivpu_dbg(vdev, RPM, "rpm_get count %d\n", atomic_read(&vdev->drm.dev->power.usage_count)); - ret = pm_runtime_resume_and_get(vdev->drm.dev); if (!drm_WARN_ON(&vdev->drm, ret < 0)) vdev->pm->suspend_reschedule_counter = PM_RESCHEDULE_LIMIT; @@ -250,8 +248,6 @@ int ivpu_rpm_get(struct ivpu_device *vdev) void ivpu_rpm_put(struct ivpu_device *vdev) { - ivpu_dbg(vdev, RPM, "rpm_put count %d\n", atomic_read(&vdev->drm.dev->power.usage_count)); - pm_runtime_mark_last_busy(vdev->drm.dev); pm_runtime_put_autosuspend(vdev->drm.dev); } @@ -321,16 +317,10 @@ void ivpu_pm_enable(struct ivpu_device *vdev) pm_runtime_allow(dev); pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); - - ivpu_dbg(vdev, RPM, "Enable RPM count %d\n", atomic_read(&dev->power.usage_count)); } void ivpu_pm_disable(struct ivpu_device *vdev) { - struct device *dev = vdev->drm.dev; - - ivpu_dbg(vdev, RPM, "Disable RPM count %d\n", atomic_read(&dev->power.usage_count)); - pm_runtime_get_noresume(vdev->drm.dev); pm_runtime_forbid(vdev->drm.dev); }