From: James Zhu <James.Zhu@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <alexander.deucher@amd.com>,
<Bing.Ma@amd.com>, <benjamin.welton@amd.com>
Cc: <Jesse.Zhang@amd.com>, <Jenny-Jing.Liu@amd.com>, <jamesz@amd.com>
Subject: [RFC PATCH 1/5] drm/amdgpu: add MQD update on cu_flags
Date: Wed, 4 Mar 2026 17:28:25 -0500 [thread overview]
Message-ID: <20260304222829.3688601-2-James.Zhu@amd.com> (raw)
In-Reply-To: <20260304222829.3688601-1-James.Zhu@amd.com>
pass queue properties flags at runtime, add new
MQD update flag to control performance count enable.
Signed-off-by: James Zhu <James.Zhu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 116e509e7bed..4e9513cbe7f6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -796,6 +796,8 @@ enum amdgpu_mqd_update_flag {
AMDGPU_UPDATE_FLAG_DBG_WA_ENABLE = 1,
AMDGPU_UPDATE_FLAG_DBG_WA_DISABLE = 2,
AMDGPU_UPDATE_FLAG_IS_GWS = 4, /* quirk for gfx9 IP */
+ AMDGPU_UPDATE_FLAG_PERFCOUNT_ENABLE = 5,
+ AMDGPU_UPDATE_FLAG_PERFCOUNT_DISABLE = 6,
};
struct amdgpu_mqd_prop {
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
index 412c00ecd97f..173fd09b5650 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
@@ -389,6 +389,7 @@ static int amdgpu_userq_set_compute_mqd(struct amdgpu_usermode_queue *queue,
props->cu_mask = cu_mask;
props->cu_mask_count = count;
props->is_user_cu_masked = (cu_mask != NULL);
+
}
/* Parse HQD priority and other compute properties */
@@ -623,6 +624,7 @@ static int mes_userq_mqd_update(struct amdgpu_usermode_queue *queue, struct drm_
userq_props->queue_size = args_in->queue_size;
userq_props->hqd_base_gpu_addr = args_in->queue_va;
+ userq_props->cu_flags = args_in->flags;
retval = mqd_hw_default->init_mqd(adev, (void *)queue->mqd.cpu_ptr, userq_props);
--
2.34.1
next prev parent reply other threads:[~2026-03-04 22:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 22:28 [RFC PATCH 0/5] add compute performance count control James Zhu
2026-03-04 22:28 ` James Zhu [this message]
2026-03-04 22:28 ` [RFC PATCH 2/5] drm/amdgpu/gfx10: " James Zhu
2026-03-04 22:28 ` [RFC PATCH 3/5] drm/amdgpu/gfx11: " James Zhu
2026-03-04 22:28 ` [RFC PATCH 4/5] drm/amdgpu/gfx12: " James Zhu
2026-03-04 22:28 ` [RFC PATCH 5/5] drm/amdgpu/gfx12.1: " James Zhu
2026-03-09 18:34 ` [RFC PATCH 0/5] " James Zhu
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=20260304222829.3688601-2-James.Zhu@amd.com \
--to=james.zhu@amd.com \
--cc=Bing.Ma@amd.com \
--cc=Jenny-Jing.Liu@amd.com \
--cc=Jesse.Zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=benjamin.welton@amd.com \
--cc=jamesz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox