All of
 help / color / mirror / Atom feed
From: Guchun Chen <>
To: <>, <>,
	<>, <>,
Cc: Guchun Chen <>
Subject: [PATCH] drm/amdgpu: add missed write lock for pci detected state pci_channel_io_normal
Date: Fri, 1 Oct 2021 10:00:00 +0800	[thread overview]
Message-ID: <> (raw)

When a PCI error state pci_channel_io_normal is detectd, it will
report PCI_ERS_RESULT_CAN_RECOVER status to PCI driver, and PCI driver
will continue the execution of PCI resume callback report_resume by
pci_walk_bridge, and the callback will go into amdgpu_pci_resume
finally, where write lock is releasd unconditionally without acquiring
such lock.

Fixes: c9a6b82f45e2("drm/amdgpu: Implement DPC recovery")
Signed-off-by: Guchun Chen <>
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index bb5ad2b6ca13..12f822d51de2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5370,6 +5370,7 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
 	switch (state) {
 	case pci_channel_io_normal:
+		amdgpu_device_lock_adev(adev, NULL);
 	/* Fatal error, prepare for slot reset */
 	case pci_channel_io_frozen:

             reply	other threads:[~2021-10-01  2:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01  2:00 Guchun Chen [this message]
2021-10-01  2:21 ` [PATCH] drm/amdgpu: add missed write lock for pci detected state pci_channel_io_normal Andrey Grodzovsky
2021-10-01  8:21   ` Chen, Guchun
2021-10-01 14:28     ` Andrey Grodzovsky
2021-10-01 15:21       ` Chen, Guchun
2021-10-02 15:20         ` Chen, Guchun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.