From: Jesse Zhang <jesse.zhang@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Tim Huang <tim.huang@amd.com>,
Luben Tuikov <luben.tuikov@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Christian Koenig <christian.koenig@amd.com>
Subject: [igt-dev] [PATCH i-g-t 2/2] lib/amdgpu: add apu check for pciplug test
Date: Mon, 6 Nov 2023 13:52:27 +0800 [thread overview]
Message-ID: <20231106055227.2740582-1-jesse.zhang@amd.com> (raw)
For apu, it is integrated with cpu.
So hotplug test should be unnecessary for it.
Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Tim Huang <tim.huang@amd.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
---
lib/amdgpu/amd_pci_unplug.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/amdgpu/amd_pci_unplug.c b/lib/amdgpu/amd_pci_unplug.c
index 9811e0cc2..6a4711de7 100644
--- a/lib/amdgpu/amd_pci_unplug.c
+++ b/lib/amdgpu/amd_pci_unplug.c
@@ -92,6 +92,7 @@ amdgpu_hotunplug_setup_test(bool render_mode, const struct amd_pci_unplug_setup
bool ret = false;
int r;
uint32_t major_version, minor_version;
+ struct amdgpu_gpu_info gpu_info = {0};
unplug->num_devices = amdgpu_open_devices(render_mode, MAX_CARDS_SUPPORTED,
unplug->drm_amdgpu_fds);
@@ -118,6 +119,12 @@ amdgpu_hotunplug_setup_test(bool render_mode, const struct amd_pci_unplug_setup
if (minor_version < setup->minor_version_req)
goto release;
+ /* skip hotplug test on APUs */
+ r = amdgpu_query_gpu_info(unplug->device_handle, &gpu_info);
+ igt_assert_eq(r, 0);
+ if (gpu_info.ids_flags & AMDGPU_IDS_FLAGS_FUSION)
+ goto release;
+
if (!setup->open_device) {
/* device handle is not always required for test */
/* but for drm version is required always */
@@ -132,6 +139,12 @@ amdgpu_hotunplug_setup_test(bool render_mode, const struct amd_pci_unplug_setup
goto release;
if (minor_version < setup->minor_version_req)
goto release;
+
+ /* skip hotplug test on APUs */
+ r = amdgpu_query_gpu_info(unplug->device_handle2, &gpu_info);
+ igt_assert_eq(r, 0);
+ if (gpu_info.ids_flags & AMDGPU_IDS_FLAGS_FUSION)
+ goto release;
}
ret = true;
release:
--
2.25.1
reply other threads:[~2023-11-06 5:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231106055227.2740582-1-jesse.zhang@amd.com \
--to=jesse.zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=luben.tuikov@amd.com \
--cc=tim.huang@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