amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 01/11] drm/amdgpu/gfx11: add FW version check for new CP GFX shadow feature
Date: Mon, 20 Mar 2023 13:38:00 -0400	[thread overview]
Message-ID: <20230320173810.250835-2-alexander.deucher@amd.com> (raw)
In-Reply-To: <20230320173810.250835-1-alexander.deucher@amd.com>

Use this to determine if we support the new SET_Q_PREEMPTION_MODE
packet.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h |  2 ++
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c  | 13 +++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
index de9e7a00bb15..4ad9e225d6e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
@@ -364,6 +364,8 @@ struct amdgpu_gfx {
 
 	struct amdgpu_ring		sw_gfx_ring[AMDGPU_MAX_SW_GFX_RINGS];
 	struct amdgpu_ring_mux          muxer;
+
+	bool				cp_gfx_shadow; /* for gfx11 */
 };
 
 #define amdgpu_gfx_get_gpu_clock_counter(adev) (adev)->gfx.funcs->get_gpu_clock_counter((adev))
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index ecf8ceb53311..a0d830dc0d01 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -463,6 +463,18 @@ static int gfx_v11_0_init_toc_microcode(struct amdgpu_device *adev, const char *
 	return err;
 }
 
+static void gfx_v11_0_check_fw_cp_gfx_shadow(struct amdgpu_device *adev)
+{
+	switch (adev->ip_versions[GC_HWIP][0]) {
+	case IP_VERSION(11, 0, 0):
+	case IP_VERSION(11, 0, 2):
+	case IP_VERSION(11, 0, 3):
+	default:
+		adev->gfx.cp_gfx_shadow = false;
+		break;
+	}
+}
+
 static int gfx_v11_0_init_microcode(struct amdgpu_device *adev)
 {
 	char fw_name[40];
@@ -539,6 +551,7 @@ static int gfx_v11_0_init_microcode(struct amdgpu_device *adev)
 	/* only one MEC for gfx 11.0.0. */
 	adev->gfx.mec2_fw = NULL;
 
+	gfx_v11_0_check_fw_cp_gfx_shadow(adev);
 out:
 	if (err) {
 		amdgpu_ucode_release(&adev->gfx.pfp_fw);
-- 
2.39.2


  reply	other threads:[~2023-03-20 17:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 17:37 [PATCH V2 00/11] Enable FW assisted shadowing for GFX11 Alex Deucher
2023-03-20 17:38 ` Alex Deucher [this message]
2023-03-20 17:38 ` [PATCH 02/11] drm/amdgpu/gfx11: check the CP FW version CP GFX shadow support Alex Deucher
2023-03-21 15:36   ` Christian König
2023-03-20 17:38 ` [PATCH 03/11] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers Alex Deucher
2023-03-20 17:38 ` [PATCH 04/11] drm/amdgpu: add gfx shadow CS IOCTL support Alex Deucher
2023-03-20 17:38 ` [PATCH 05/11] drm/amdgpu: add gfx11 emit shadow callback Alex Deucher
2023-03-20 17:38 ` [PATCH 06/11] drm/amdgpu: don't require a job for cond_exec and shadow Alex Deucher
2023-03-20 17:38 ` [PATCH 07/11] drm/amdgpu: add UAPI to query GFX shadow sizes Alex Deucher
2023-03-21  0:29   ` Marek Olšák
2023-03-21 19:51     ` Alex Deucher
2023-03-22 14:11       ` Marek Olšák
2023-03-22 14:34         ` Alex Deucher
2023-03-21  0:31   ` Marek Olšák
2023-03-21 19:53     ` Alex Deucher
2023-03-22  8:50       ` Christian König
2023-03-22 14:07       ` Marek Olšák
2023-03-20 17:38 ` [PATCH 08/11] drm/amdgpu: add gfx shadow callback Alex Deucher
2023-03-20 17:38 ` [PATCH 09/11] drm/amdgpu: add get_gfx_shadow_info callback for gfx11 Alex Deucher
2023-03-20 17:38 ` [PATCH 10/11] drm/amdgpu: add support for new GFX shadow size query Alex Deucher
2023-03-20 17:38 ` [PATCH 11/11] drm/amdgpu: bump driver version number for CP GFX shadow 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=20230320173810.250835-2-alexander.deucher@amd.com \
    --to=alexander.deucher@amd.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;
as well as URLs for NNTP newsgroup(s).