[PATCH v3 i-g-t 1/1] tests/intel/xe_copy : Add memset/memcpy

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Jul 14 10:09:34 UTC 2025


On Thu, Jul 10, 2025 at 12:58:52PM +0000, Sobin Thomas wrote:

Subject: [PATCH v3 i-g-t 1/1] tests/intel/xe_copy : Add memset/memcpy

is not correct, please fix. I keep my r-b for the code.

--
Zbigniew


> Added the check for platforms (graphics_ver < 20) like PVC for xe
> memcpy and memset for some tests (like xe-memset-linear) with
> extended parameters.
> 
> 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