All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Zoy.Bai@amd.com, Andrey Grodzovsky <andrey.grodzovsky@amd.com>,
	lijo.lazar@amd.com, Christian.Koenig@amd.com
Subject: [PATCH v3 3/7] drm/admgpu: Serialize RAS recovery work directly into reset domain queue.
Date: Wed, 25 May 2022 15:04:43 -0400	[thread overview]
Message-ID: <20220525190447.239867-4-andrey.grodzovsky@amd.com> (raw)
In-Reply-To: <20220525190447.239867-1-andrey.grodzovsky@amd.com>

Save the extra usless work schedule.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 31207f7eec02..a439c04223b5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -35,6 +35,8 @@
 #include "amdgpu_xgmi.h"
 #include "ivsrcid/nbio/irqsrcs_nbif_7_4.h"
 #include "atom.h"
+#include "amdgpu_reset.h"
+
 #ifdef CONFIG_X86_MCE_AMD
 #include <asm/mce.h>
 
@@ -1920,7 +1922,7 @@ static void amdgpu_ras_do_recovery(struct work_struct *work)
 	}
 
 	if (amdgpu_device_should_recover_gpu(ras->adev))
-		amdgpu_device_gpu_recover(ras->adev, NULL);
+		amdgpu_device_gpu_recover_imp(ras->adev, NULL);
 	atomic_set(&ras->in_recovery, 0);
 }
 
@@ -2928,7 +2930,7 @@ int amdgpu_ras_reset_gpu(struct amdgpu_device *adev)
 	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
 
 	if (atomic_cmpxchg(&ras->in_recovery, 0, 1) == 0)
-		schedule_work(&ras->recovery_work);
+		amdgpu_reset_domain_schedule(ras->adev->reset_domain, &ras->recovery_work);
 	return 0;
 }
 
-- 
2.25.1


  parent reply	other threads:[~2022-05-25 19:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 19:04 [PATCH v3 0/7] Fix multiple GPU resets in XGMI hive Andrey Grodzovsky
2022-05-25 19:04 ` [PATCH v3 1/7] Revert "workqueue: remove unused cancel_work()" Andrey Grodzovsky
2022-05-25 19:04 ` [PATCH v3 2/7] drm/amdgpu: Cache result of last reset at reset domain level Andrey Grodzovsky
2022-05-30  7:47   ` Christian König
2022-05-25 19:04 ` Andrey Grodzovsky [this message]
2022-05-30  7:49   ` [PATCH v3 3/7] drm/admgpu: Serialize RAS recovery work directly into reset domain queue Christian König
2022-05-31  3:02     ` Luben Tuikov
2022-05-25 19:04 ` [PATCH v3 4/7] drm/amdgpu: Add work_struct for GPU reset from debugfs Andrey Grodzovsky
2022-05-30  7:52   ` Christian König
2022-05-30 15:46     ` Andrey Grodzovsky
2022-05-25 19:04 ` [PATCH v3 5/7] drm/amdgpu: Add work_struct for GPU reset from kfd Andrey Grodzovsky
2022-05-30  7:54   ` Christian König
2022-05-31 15:31   ` Felix Kuehling
2022-05-25 19:04 ` [PATCH v3 6/7] drm/amdgpu: Rename amdgpu_device_gpu_recover_imp back to amdgpu_device_gpu_recover Andrey Grodzovsky
2022-05-30  7:55   ` Christian König
2022-05-25 19:04 ` [PATCH v3 7/7] drm/amdgpu: Stop any pending reset if another in progress Andrey Grodzovsky
2022-05-30  7:56   ` Christian König
2022-05-31 15:31   ` Felix Kuehling
2022-05-31 15:35     ` Felix Kuehling

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20220525190447.239867-4-andrey.grodzovsky@amd.com \
    --to=andrey.grodzovsky@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Zoy.Bai@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=lijo.lazar@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.