Re: [PATCH V3 08/11] accel/amdxdna: Add suspend and resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/4/24 11:08, Jeffrey Hugo wrote:
On 9/11/2024 12:06 PM, Lizhi Hou wrote:
+static int amdxdna_rpmops_suspend(struct device *dev)
+{
+    struct amdxdna_dev *xdna = pci_get_drvdata(to_pci_dev(dev));
+    int ret;
+
+    mutex_lock(&xdna->dev_lock);
+    WARN_ON(!list_empty(&xdna->client_list));

This feels weird. Can you explain?

The driver uses auto suspend. When there is opened client, auto suspend is held. So the client list should not be empty here.  The WARN_ON is kind of assert and  can be removed.


Thanks,

Lizhi


+    ret = amdxdna_dev_suspend_nolock(xdna);
+    mutex_unlock(&xdna->dev_lock);
+
+    XDNA_DBG(xdna, "Runtime suspend done ret: %d", ret);
+    return ret;
+}
+



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux