Skip to content

Commit

Permalink
accel/ivpu: Fix WARN in ivpu_ipc_send_receive_internal()
Browse files Browse the repository at this point in the history
Move pm_runtime_set_active() to ivpu_pm_init() so when
ivpu_ipc_send_receive_internal() is executed before ivpu_pm_enable()
it already has correct runtime state, even if last resume was
not successful.

Fixes: 8ed520f ("accel/ivpu: Move set autosuspend delay to HW specific code")
Cc: stable@vger.kernel.org # v6.7+
Reviewed-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241210130939.1575610-4-jacek.lawrynowicz@linux.intel.com
  • Loading branch information
Jacek Lawrynowicz committed Dec 19, 2024
1 parent 6c9ba75 commit 0f6482c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/accel/ivpu/ivpu_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ void ivpu_pm_init(struct ivpu_device *vdev)

pm_runtime_use_autosuspend(dev);
pm_runtime_set_autosuspend_delay(dev, delay);
pm_runtime_set_active(dev);

ivpu_dbg(vdev, PM, "Autosuspend delay = %d\n", delay);
}
Expand All @@ -392,7 +393,6 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
{
struct device *dev = vdev->drm.dev;

pm_runtime_set_active(dev);
pm_runtime_allow(dev);
pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
Expand Down

0 comments on commit 0f6482c

Please sign in to comment.