All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <christian.koenig@amd.com>,
	<sasundar@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Sathishkumar S <sathishkumar.sundararaju@amd.com>
Subject: [PATCH 32/33] drm/amdgpu/vcn2.5: implement ring reset
Date: Thu, 26 Jun 2025 23:40:01 -0400	[thread overview]
Message-ID: <20250627034002.5590-33-alexander.deucher@amd.com> (raw)
In-Reply-To: <20250627034002.5590-1-alexander.deucher@amd.com>

Use the new helpers to handle engine resets for VCN.

Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
index 58b527a6b795f..49ec4a7775f90 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
@@ -102,6 +102,7 @@ static int vcn_v2_5_pause_dpg_mode(struct amdgpu_vcn_inst *vinst,
 				   struct dpg_pause_state *new_state);
 static int vcn_v2_5_sriov_start(struct amdgpu_device *adev);
 static void vcn_v2_5_set_ras_funcs(struct amdgpu_device *adev);
+static int vcn_v2_5_reset(struct amdgpu_vcn_inst *vinst);
 
 static int amdgpu_ih_clientid_vcns[] = {
 	SOC15_IH_CLIENTID_VCN,
@@ -404,6 +405,7 @@ static int vcn_v2_5_sw_init(struct amdgpu_ip_block *ip_block)
 
 		if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)
 			adev->vcn.inst[j].pause_dpg_mode = vcn_v2_5_pause_dpg_mode;
+		adev->vcn.inst[j].reset = vcn_v2_5_reset;
 	}
 
 	if (amdgpu_sriov_vf(adev)) {
@@ -1816,6 +1818,7 @@ static const struct amdgpu_ring_funcs vcn_v2_5_dec_ring_vm_funcs = {
 	.emit_wreg = vcn_v2_0_dec_ring_emit_wreg,
 	.emit_reg_wait = vcn_v2_0_dec_ring_emit_reg_wait,
 	.emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
+	.reset = amdgpu_vcn_ring_reset,
 };
 
 /**
@@ -1914,6 +1917,7 @@ static const struct amdgpu_ring_funcs vcn_v2_5_enc_ring_vm_funcs = {
 	.emit_wreg = vcn_v2_0_enc_ring_emit_wreg,
 	.emit_reg_wait = vcn_v2_0_enc_ring_emit_reg_wait,
 	.emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
+	.reset = amdgpu_vcn_ring_reset,
 };
 
 static void vcn_v2_5_set_dec_ring_funcs(struct amdgpu_device *adev)
@@ -1942,6 +1946,13 @@ static void vcn_v2_5_set_enc_ring_funcs(struct amdgpu_device *adev)
 	}
 }
 
+static int vcn_v2_5_reset(struct amdgpu_vcn_inst *vinst)
+{
+	vcn_v2_5_stop(vinst);
+	vcn_v2_5_start(vinst);
+	return 0;
+}
+
 static bool vcn_v2_5_is_idle(struct amdgpu_ip_block *ip_block)
 {
 	struct amdgpu_device *adev = ip_block->adev;
-- 
2.50.0


  parent reply	other threads:[~2025-06-27  3:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-27  3:39 [PATCH V12 00/33] Reset improvements Alex Deucher
2025-06-27  3:39 ` [PATCH 01/33] drm/amdgpu/gfx10: fix KGQ reset sequence Alex Deucher
2025-06-30  8:37   ` Christian König
2025-06-27  3:39 ` [PATCH 02/33] drm/amdgpu/sdma: consolidate engine reset handling Alex Deucher
2025-06-30  8:40   ` Christian König
2025-06-30 13:47     ` Alex Deucher
2025-06-27  3:39 ` [PATCH 03/33] drm/amdgpu/sdma: allow caller to handle kernel rings in engine reset Alex Deucher
2025-06-27  3:39 ` [PATCH 04/33] drm/amdgpu/sdma5: clean up resume code Alex Deucher
2025-06-30  8:52   ` Christian König
2025-06-27  3:39 ` [PATCH 05/33] drm/amdgpu/sdma5.2: " Alex Deucher
2025-06-30  8:53   ` Christian König
2025-06-27  3:39 ` [PATCH 06/33] drm/amdgpu/sdma6: " Alex Deucher
2025-06-30  8:55   ` Christian König
2025-06-27  3:39 ` [PATCH 07/33] drm/amdgpu/sdma7: " Alex Deucher
2025-06-30  8:56   ` Christian König
2025-06-27  3:39 ` [PATCH 08/33] drm/amdgpu: track ring state associated with a fence Alex Deucher
2025-06-27  3:39 ` [PATCH 09/33] drm/amdgpu/gfx9: re-emit unprocessed state on kcq reset Alex Deucher
2025-06-27  3:39 ` [PATCH 10/33] drm/amdgpu/gfx9.4.3: " Alex Deucher
2025-06-27  3:39 ` [PATCH 11/33] drm/amdgpu/gfx10: re-emit unprocessed state on ring reset Alex Deucher
2025-06-27  3:39 ` [PATCH 12/33] drm/amdgpu/gfx11: " Alex Deucher
2025-06-27  3:39 ` [PATCH 13/33] drm/amdgpu/gfx12: " Alex Deucher
2025-06-27  3:39 ` [PATCH 14/33] drm/amdgpu/sdma5: " Alex Deucher
2025-06-27  3:39 ` [PATCH 15/33] drm/amdgpu/sdma5.2: " Alex Deucher
2025-06-27  3:39 ` [PATCH 16/33] drm/amdgpu/sdma6: " Alex Deucher
2025-06-27  3:39 ` [PATCH 17/33] drm/amdgpu/sdma7: " Alex Deucher
2025-06-27  3:39 ` [PATCH 18/33] drm/amdgpu/jpeg2: " Alex Deucher
2025-06-27  3:39 ` [PATCH 19/33] drm/amdgpu/jpeg2.5: " Alex Deucher
2025-06-27  3:39 ` [PATCH 20/33] drm/amdgpu/jpeg3: " Alex Deucher
2025-06-27  3:39 ` [PATCH 21/33] drm/amdgpu/jpeg4: " Alex Deucher
2025-06-27  3:39 ` [PATCH 22/33] drm/amdgpu/jpeg4.0.3: " Alex Deucher
2025-06-27  3:39 ` [PATCH 23/33] drm/amdgpu/jpeg4.0.5: add queue reset Alex Deucher
2025-06-27  3:39 ` [PATCH 24/33] drm/amdgpu/jpeg5: " Alex Deucher
2025-06-27  3:39 ` [PATCH 25/33] drm/amdgpu/jpeg5.0.1: re-emit unprocessed state on ring reset Alex Deucher
2025-06-27  3:39 ` [PATCH 26/33] drm/amdgpu/vcn4: " Alex Deucher
2025-06-27  3:39 ` [PATCH 27/33] drm/amdgpu/vcn4.0.3: " Alex Deucher
2025-06-27  3:39 ` [PATCH 28/33] drm/amdgpu/vcn4.0.5: " Alex Deucher
2025-06-27  3:39 ` [PATCH 29/33] drm/amdgpu/vcn5: " Alex Deucher
2025-06-27  3:39 ` [PATCH 30/33] drm/amdgpu/vcn: add a helper framework for engine resets Alex Deucher
2025-06-27  3:40 ` [PATCH 31/33] drm/amdgpu/vcn2: implement ring reset Alex Deucher
2025-06-27  3:40 ` Alex Deucher [this message]
2025-06-27  3:40 ` [PATCH 33/33] drm/amdgpu/vcn3: " Alex Deucher
2025-07-01 15:25 ` [PATCH V12 00/33] Reset improvements Krzysztof Łopatowski
2025-07-01 15:30   ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2025-07-11 22:39 [PATCH V15 " Alex Deucher
2025-07-11 22:40 ` [PATCH 32/33] drm/amdgpu/vcn2.5: implement ring reset Alex Deucher

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=20250627034002.5590-33-alexander.deucher@amd.com \
    --to=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=sasundar@amd.com \
    --cc=sathishkumar.sundararaju@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.