[PATCH v2 i-g-t 1/1] tests/intel/xe_copy : Add check for memset and memcpy tests.
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Thu Jul 10 11:50:36 UTC 2025
On Thu, Jul 10, 2025 at 04:48:09AM +0000, Sobin Thomas wrote:
> Added checks for platforms with graphics_ver < 20 (e.g., PVC) in xe_memcpy (page copy)
> and memset tests (e.g., xe-memset-linear) using extended parameters.
According to checkpatch this should fit in 75 characters line
width, but this is minor nit.
For the code:
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
>
> Signed-off-by: Sobin Thomas <sobin.thomas at intel.com>
> ---
> tests/intel/xe_copy_basic.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/tests/intel/xe_copy_basic.c b/tests/intel/xe_copy_basic.c
> index 5a050b82c..2996a496b 100644
> --- a/tests/intel/xe_copy_basic.c
> +++ b/tests/intel/xe_copy_basic.c
> @@ -261,6 +261,7 @@ const char *help_str =
> igt_main_args("b", NULL, help_str, opt_handler, NULL)
> {
> int fd;
> + uint16_t dev_id;
> struct igt_collection *set, *regions;
> uint32_t region;
> struct rect linear[] = { { 0, 0xfd, 1, MODE_BYTE },
> @@ -274,6 +275,7 @@ igt_main_args("b", NULL, help_str, opt_handler, NULL)
>
> igt_fixture {
> fd = drm_open_driver(DRIVER_XE);
> + dev_id = intel_get_drm_devid(fd);
> xe_device_get(fd);
> set = xe_get_memory_region_set(fd,
> DRM_XE_MEM_REGION_CLASS_SYSMEM,
> @@ -293,6 +295,7 @@ igt_main_args("b", NULL, help_str, opt_handler, NULL)
> for (int i = 0; i < ARRAY_SIZE(page); i++) {
> igt_subtest_f("mem-page-copy-%u", page[i].width) {
> igt_require(blt_has_mem_copy(fd));
> + igt_require(intel_get_device_info(dev_id)->graphics_ver >= 20);
> for_each_variation_r(regions, 1, set) {
> region = igt_collection_get_value(regions, 0);
> copy_test(fd, &page[i], MEM_COPY, region);
> @@ -312,6 +315,13 @@ igt_main_args("b", NULL, help_str, opt_handler, NULL)
>
> for (int i = 0; i < ARRAY_SIZE(linear); i++) {
> igt_subtest_f("mem-set-linear-0x%x", linear[i].width) {
> + /* Skip mem-set-linear test for values greater than
> + * 0x3FFFF. As hardware with graphics_ver<20 support
> + * till 0x3FFFF.
> + */
> + if ((linear[i].width > 0x3ffff) &&
> + (intel_get_device_info(dev_id)->graphics_ver < 20))
> + igt_skip("Skipping: width exceeds 18-bit limit on gfx_ver < 20.");
> igt_require(blt_has_mem_set(fd));
> for_each_variation_r(regions, 1, set) {
> region = igt_collection_get_value(regions, 0);
> --
> 2.34.1
>
More information about the igt-dev
mailing list