From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/xe/xe_guc_pc: Skip RC6 tests for PVC
Date: Tue, 28 Mar 2023 08:27:17 +0200 [thread overview]
Message-ID: <20230328082717.110b7984@maurocar-mobl2> (raw)
In-Reply-To: <20230328053303.26627-1-niranjana.vishwanathapura@intel.com>
On Mon, 27 Mar 2023 22:33:03 -0700
Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> wrote:
> The Pontevecchio (PVC) platform doesn't have rc6 support yet.
> Skip rc6_on_idle and rc0_on_exec subtests for PVC.
>
> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
> ---
> tests/xe/xe_guc_pc.c | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/tests/xe/xe_guc_pc.c b/tests/xe/xe_guc_pc.c
> index 60c93288b..9fc2429d8 100644
> --- a/tests/xe/xe_guc_pc.c
> +++ b/tests/xe/xe_guc_pc.c
> @@ -375,6 +375,38 @@ static bool in_rc6(int sysfs, int gt_id)
> return strcmp(rc, "rc6") == 0;
> }
>
> +static bool is_rc6_supported(int fd)
> +{
> + struct drm_xe_query_config *config;
> + struct drm_xe_device_query query = {
> + .query = DRM_XE_DEVICE_QUERY_CONFIG,
> + };
> + uint16_t devid;
> +
> + igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
> +
> + config = malloc(query.size);
> + igt_assert(config);
> +
> + query.data = to_user_pointer(config);
> + igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
> +
> + /* No rc6 support yet on Pontevecchio */
> + devid = config->info[XE_QUERY_CONFIG_REV_AND_DEVICE_ID] & 0xffff;
> + return !(
> + devid == 0x0BD0 ||
> + devid == 0x0BD1 ||
> + devid == 0x0BD2 ||
> + devid == 0x0BD5 ||
> + devid == 0x0BD6 ||
> + devid == 0x0BD7 ||
> + devid == 0x0BD8 ||
> + devid == 0x0BD9 ||
> + devid == 0x0BDA ||
> + devid == 0x0BDB
> + );
> +}
Instead of hardcoding a list of devices, better to check for GPU version.
Something like this (completely untested) patch:
diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index c2c8998dd955..21ddb016960e 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -203,6 +203,7 @@ void intel_check_pch(void);
#define IS_METEORLAKE(devid) (intel_get_device_info(devid)->is_meteorlake)
#define IS_GEN(devid, x) (intel_get_device_info(devid)->graphics_ver == x)
+#define IS_GEN_VER(devid, x, y) (intel_graphics_ver(devid) == IP_VER(x, y))
#define AT_LEAST_GEN(devid, x) (intel_get_device_info(devid)->graphics_ver >= x)
#define IS_GEN2(devid) IS_GEN(devid, 2)
@@ -217,6 +218,8 @@ void intel_check_pch(void);
#define IS_GEN11(devid) IS_GEN(devid, 11)
#define IS_GEN12(devid) IS_GEN(devid, 12)
+#define IS_PONTEVECCHIO(devid) IS_GEN_VER(devid, 12, 60)
+
#define IS_MOBILE(devid) (intel_get_device_info(devid)->is_mobile)
#define IS_965(devid) AT_LEAST_GEN(devid, 4)
diff --git a/tests/xe/xe_guc_pc.c b/tests/xe/xe_guc_pc.c
index 60c93288bfdb..819d415372ae 100644
--- a/tests/xe/xe_guc_pc.c
+++ b/tests/xe/xe_guc_pc.c
@@ -467,6 +467,7 @@ igt_main
}
igt_subtest("rc6_on_idle") {
+ igt_require(IS_PONTEVECCHIO(intel_get_drm_devid(fd)));
xe_for_each_gt(fd, gt) {
assert(igt_wait(in_rc6(sysfs, gt), 1000, 1));
}
next prev parent reply other threads:[~2023-03-28 6:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 5:33 [igt-dev] [PATCH i-g-t] tests/xe/xe_guc_pc: Skip RC6 tests for PVC Niranjana Vishwanathapura
2023-03-28 6:27 ` Mauro Carvalho Chehab [this message]
2023-03-29 5:00 ` Niranjana Vishwanathapura
2023-03-28 7:10 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/xe/xe_guc_pc: Skip RC6 tests for PVC (rev2) Patchwork
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=20230328082717.110b7984@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=niranjana.vishwanathapura@intel.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