All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Min <Frank.Min@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Frank Min <Frank.Min@amd.com>, Kevin Wang <kevin.wang@amd.com>
Subject: [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface
Date: Fri, 4 Dec 2026 22:24:03 +0800	[thread overview]
Message-ID: <20261204142408.988734-4-Frank.Min@amd.com> (raw)
In-Reply-To: <20261204142408.988734-1-Frank.Min@amd.com>

Add lsdma v8 fw query interface.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Kevin Wang <kevin.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 ++++++++++++++
 include/uapi/drm/amdgpu_drm.h           |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 75fc49fb4b319..e6872352e0035 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -332,6 +332,10 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
 		fw_info->ver = adev->sdma.instance[query_fw->index].fw_version;
 		fw_info->feature = adev->sdma.instance[query_fw->index].feature_version;
 		break;
+	case AMDGPU_INFO_FW_LSDMA:
+		fw_info->ver = adev->lsdma.fw_version;
+		fw_info->feature = adev->lsdma.feature_version;
+		break;
 	case AMDGPU_INFO_FW_SOS:
 		fw_info->ver = adev->psp.sos.fw_version;
 		fw_info->feature = adev->psp.sos.feature_version;
@@ -2028,6 +2032,16 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
 			   i, fw_info.feature, fw_info.ver);
 	}
 
+	/* LSDMA */
+	if (adev->lsdma.fw) {
+		query_fw.fw_type = AMDGPU_INFO_FW_LSDMA;
+		ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
+		if (ret)
+			return ret;
+		seq_printf(m, "LSDMA feature version: %u, firmware version: 0x%08x\n",
+			   fw_info.feature, fw_info.ver);
+	}
+
 	/* VCN */
 	query_fw.fw_type = AMDGPU_INFO_FW_VCN;
 	ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index a9aa08c8d3095..37eeef7f43145 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -1228,6 +1228,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
 	#define AMDGPU_INFO_FW_VPE		0x1c
 	/* Subquery id: Query MP5 firmware version */
 	#define AMDGPU_INFO_FW_MP5		0x1d
+	/* Subquery id: Query LSDMA firmware version */
+	#define AMDGPU_INFO_FW_LSDMA		0x1e
 
 /* number of bytes moved for TTM migration */
 #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
-- 
2.43.0


  parent reply	other threads:[~2026-12-04 14:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
2026-12-04 14:55   ` sashiko-bot
2026-12-04 16:05   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
2026-12-04 15:14   ` sashiko-bot
2026-12-04 16:19   ` Alex Deucher
2026-12-04 14:24 ` Frank Min [this message]
2026-12-04 15:25   ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface sashiko-bot
2026-12-04 16:21   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support Frank Min
2026-12-04 15:47   ` sashiko-bot
2026-12-04 14:24 ` [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13 Frank Min
2026-12-04 16:01   ` sashiko-bot
2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
2026-12-04 16:03   ` Alex Deucher
2026-12-04 16:11   ` sashiko-bot
2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
2026-12-04 16:41   ` sashiko-bot
2026-12-04 17:24   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
2026-12-04 16:12   ` Alex Deucher
2026-12-04 16:52   ` sashiko-bot
2026-12-04 14:41 ` [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring sashiko-bot
2026-12-04 16:16 ` 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=20261204142408.988734-4-Frank.Min@amd.com \
    --to=frank.min@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=kevin.wang@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.