Skip to content

Commit

Permalink
accel/ivpu: Fix compilation with CONFIG_PM=n
Browse files Browse the repository at this point in the history
Use pm_runtime_status_suspended() instead of dev->power.runtime_status
field that is not available without PM.

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://lore.kernel.org/all/20231106130827.1600948-1-jacek.lawrynowicz@linux.intel.com
  • Loading branch information
Jacek Lawrynowicz committed Nov 7, 2023
1 parent 27d9620 commit c015fb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/accel/ivpu/ivpu_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <linux/genalloc.h>
#include <linux/highmem.h>
#include <linux/kthread.h>
#include <linux/pm_runtime.h>
#include <linux/wait.h>

#include "ivpu_drv.h"
Expand Down Expand Up @@ -318,8 +319,7 @@ int ivpu_ipc_send_receive_active(struct ivpu_device *vdev, struct vpu_jsm_msg *r
struct vpu_jsm_msg hb_resp;
int ret, hb_ret;

drm_WARN_ON(&vdev->drm,
vdev->drm.dev->power.runtime_status == RPM_SUSPENDED);
drm_WARN_ON(&vdev->drm, pm_runtime_status_suspended(vdev->drm.dev));

ret = ivpu_ipc_send_receive_internal(vdev, req, expected_resp, resp, channel, timeout_ms);
if (ret != -ETIMEDOUT)
Expand Down

0 comments on commit c015fb6

Please sign in to comment.