Skip to contentSkip to conversation

accel/ivpu: Fix compilation with CONFIG_PM=n

PATCH Applied Jacek Lawrynowicz 2 participants 3 messages Nov 6, 2023 – Nov 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/ivpu: Fix compilation with CONFIG_PM=n

Use pm_runtime_status_suspended() instead of dev->power.runtime_status field that is not available without PM.

---
 drivers/accel/ivpu/ivpu_ipc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/accel/ivpu/ivpu_ipc.c +2 -2
index a5fb2e5e824b7..88453762c9d53 100644
@@ -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"
@@ -315,8 +316,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)
Signature · 1 line
2.42.0
author Applied
#2 lore raw
In reply to Jacek Lawrynowicz

Applied to drm-misc-next

Quoted 30 lines · Jacek Lawrynowicz

Use pm_runtime_status_suspended() instead of dev->power.runtime_status field that is not available without PM.

---
 drivers/accel/ivpu/ivpu_ipc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/accel/ivpu/ivpu_ipc.c +2 -2
index a5fb2e5e824b7..88453762c9d53 100644
@@ -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"
@@ -315,8 +316,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)