AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Demers <alexandre.f.demers@gmail.com>
To: amd-gfx@lists.freedesktop.org
Subject: [PATCH 3/5] drm/amdgpu: small cleanup to CIK SDMA
Date: Sat, 22 Mar 2025 14:37:44 -0400	[thread overview]
Message-ID: <20250322183746.86002-4-alexandre.f.demers@gmail.com> (raw)
In-Reply-To: <20250322183746.86002-1-alexandre.f.demers@gmail.com>

Tidy cik_sdma_hw_init() by returning directly cik_sdma_start()'s result.

Keep amdgpu_cik_gpu_check_soft_reset() early declaration with others.

Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index e7c06ce7ffae..4289f437bef6 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -56,6 +56,8 @@ static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev);
 static void cik_sdma_set_vm_pte_funcs(struct amdgpu_device *adev);
 static int cik_sdma_soft_reset(struct amdgpu_ip_block *ip_block);
 
+u32 amdgpu_cik_gpu_check_soft_reset(struct amdgpu_device *adev);
+
 MODULE_FIRMWARE("amdgpu/bonaire_sdma.bin");
 MODULE_FIRMWARE("amdgpu/bonaire_sdma1.bin");
 MODULE_FIRMWARE("amdgpu/hawaii_sdma.bin");
@@ -67,9 +69,6 @@ MODULE_FIRMWARE("amdgpu/kabini_sdma1.bin");
 MODULE_FIRMWARE("amdgpu/mullins_sdma.bin");
 MODULE_FIRMWARE("amdgpu/mullins_sdma1.bin");
 
-u32 amdgpu_cik_gpu_check_soft_reset(struct amdgpu_device *adev);
-
-
 static void cik_sdma_free_microcode(struct amdgpu_device *adev)
 {
 	int i;
@@ -991,14 +990,9 @@ static int cik_sdma_sw_fini(struct amdgpu_ip_block *ip_block)
 
 static int cik_sdma_hw_init(struct amdgpu_ip_block *ip_block)
 {
-	int r;
 	struct amdgpu_device *adev = ip_block->adev;
 
-	r = cik_sdma_start(adev);
-	if (r)
-		return r;
-
-	return r;
+	return cik_sdma_start(adev);
 }
 
 static int cik_sdma_hw_fini(struct amdgpu_ip_block *ip_block)
-- 
2.49.0


  parent reply	other threads:[~2025-03-22 18:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-22 18:37 [PATCH 0/5] Small tidy up of CIK code Alexandre Demers
2025-03-22 18:37 ` [PATCH 1/5] drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 Alexandre Demers
2025-03-24 18:23   ` Alex Deucher
2025-03-22 18:37 ` [PATCH 2/5] drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA Alexandre Demers
2025-03-22 18:37 ` Alexandre Demers [this message]
2025-03-22 18:37 ` [PATCH 4/5] drm/amdgpu: move X_GB_ADDR_CONFIG_GOLDEN in GFX7 Alexandre Demers
2025-03-22 18:37 ` [PATCH 6/5] drm/amdgpu: fix style in dce_v8_0.c and in vi.c Alexandre Demers
2025-03-22 18:46   ` Alexandre Demers
2025-03-24 18:20   ` Alex Deucher
2025-03-27  4:16     ` Alexandre Demers
2025-03-27 15:21       ` 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=20250322183746.86002-4-alexandre.f.demers@gmail.com \
    --to=alexandre.f.demers@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox