All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
@ 2021-09-28  3:11 Ashutosh Dixit
  2021-09-28  5:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ashutosh Dixit @ 2021-09-28  3:11 UTC (permalink / raw)
  To: igt-dev; +Cc: Andrzej Turko, Zbigniew Kempczynski, John Harrison

Often the allocated size is of interest and is different from the
requested size. Therefore return allocated size for the object (by
__gem_create_ext()) in gem_create_in_memory_regions() and friends.

Cc: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/i915/intel_memory_region.c | 6 +++---
 lib/i915/intel_memory_region.h | 4 ++--
 lib/intel_bufops.c             | 2 +-
 lib/ioctl_wrappers.c           | 2 +-
 tests/i915/gem_exec_basic.c    | 6 +++---
 tests/i915/gem_gpgpu_fill.c    | 3 ++-
 tests/i915/gem_media_fill.c    | 3 ++-
 tests/kms_addfb_basic.c        | 2 +-
 tests/kms_prime.c              | 4 ++--
 9 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
index 3de40549319..e59801a4cab 100644
--- a/lib/i915/intel_memory_region.c
+++ b/lib/i915/intel_memory_region.c
@@ -183,7 +183,7 @@ bool gem_has_lmem(int fd)
 
 /* A version of gem_create_in_memory_region_list which can be allowed to
    fail so that the object creation can be retried */
-int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
+int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
 				       struct drm_i915_gem_memory_class_instance *mem_regions,
 				       int num_regions)
 {
@@ -193,7 +193,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
 		.regions = to_user_pointer(mem_regions),
 	};
 
-	return __gem_create_ext(fd, &size, handle, &ext_regions.base);
+	return __gem_create_ext(fd, size, handle, &ext_regions.base);
 }
 
 /* gem_create_in_memory_region_list:
@@ -202,7 +202,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
  * @mem_regions: memory regions array (priority list)
  * @num_regions: @mem_regions length
  */
-uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
+uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
 					  struct drm_i915_gem_memory_class_instance *mem_regions,
 					  int num_regions)
 {
diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
index 70b74944b51..bf75831ccba 100644
--- a/lib/i915/intel_memory_region.h
+++ b/lib/i915/intel_memory_region.h
@@ -64,11 +64,11 @@ bool gem_has_lmem(int fd);
 
 struct drm_i915_gem_memory_class_instance;
 
-int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
+int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
 				       struct drm_i915_gem_memory_class_instance *mem_regions,
 				       int num_regions);
 
-uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
+uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
 					  struct drm_i915_gem_memory_class_instance *mem_regions,
 					  int num_regions);
 
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index d1395c1605d..52794c1ac10 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -819,7 +819,7 @@ static void __intel_buf_init(struct buf_ops *bops,
 	if (handle)
 		buf->handle = handle;
 	else {
-		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
+		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
 			buf->handle = handle;
 		else
 			buf->handle = gem_create(bops->fd, size);
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 09eb3ce7b57..4d628e50aca 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -635,7 +635,7 @@ uint32_t gem_buffer_create_fb_obj(int fd, uint64_t size)
 	uint32_t handle;
 
 	if (gem_has_lmem(fd))
-		handle = gem_create_in_memory_regions(fd, size, REGION_LMEM(0));
+		handle = gem_create_in_memory_regions(fd, &size, REGION_LMEM(0));
 	else
 		handle = gem_create(fd, size);
 
diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
index 008a35d0ae9..04e2209cab4 100644
--- a/tests/i915/gem_exec_basic.c
+++ b/tests/i915/gem_exec_basic.c
@@ -28,12 +28,12 @@
 
 IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl rings.");
 
-static uint32_t batch_create(int fd, uint32_t batch_size, uint32_t region)
+static uint32_t batch_create(int fd, uint64_t batch_size, uint32_t region)
 {
 	const uint32_t bbe = MI_BATCH_BUFFER_END;
 	uint32_t handle;
 
-	handle = gem_create_in_memory_regions(fd, batch_size, region);
+	handle = gem_create_in_memory_regions(fd, &batch_size, region);
 	gem_write(fd, handle, 0, &bbe, sizeof(bbe));
 
 	return handle;
@@ -44,7 +44,7 @@ igt_main
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_query_memory_regions *query_info;
 	struct igt_collection *regions, *set;
-	uint32_t batch_size;
+	uint64_t batch_size;
 	const intel_ctx_t *ctx;
 	int fd = -1;
 
diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c
index 74a227f678e..76f4d7c61c8 100644
--- a/tests/i915/gem_gpgpu_fill.c
+++ b/tests/i915/gem_gpgpu_fill.c
@@ -68,6 +68,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
 	struct intel_buf *buf;
 	uint8_t *ptr;
 	uint32_t handle;
+	uint64_t size = SIZE;
 	int i;
 
 	buf = calloc(1, sizeof(*buf));
@@ -77,7 +78,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
 	 * Legacy code uses 32 bpp after buffer creation.
 	 * Let's do the same due to keep shader intact.
 	 */
-	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
+	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
 	intel_buf_init_using_handle(data->bops, handle, buf,
 				    width/4, height, 32, 0,
 				    I915_TILING_NONE, 0);
diff --git a/tests/i915/gem_media_fill.c b/tests/i915/gem_media_fill.c
index 1d08df2473d..3d7d6fa2b0f 100644
--- a/tests/i915/gem_media_fill.c
+++ b/tests/i915/gem_media_fill.c
@@ -69,12 +69,13 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
 	struct intel_buf *buf;
 	uint32_t handle;
 	uint8_t *ptr;
+	uint64_t size = SIZE;
 	int i;
 
 	buf = calloc(1, sizeof(*buf));
 	igt_assert(buf);
 
-	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
+	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
 
 	/*
 	 * Legacy code uses 32 bpp after buffer creation.
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 55f4852da16..62fa78a5da9 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -158,7 +158,7 @@ static void invalid_tests(int fd)
 		igt_require(gem_has_lmem(fd));
 		igt_calc_fb_size(fd, f.width, f.height,
 				DRM_FORMAT_XRGB8888, 0, &size, &stride);
-		handle = gem_create_in_memory_regions(fd, size, REGION_SMEM);
+		handle = gem_create_in_memory_regions(fd, &size, REGION_SMEM);
 		f.handles[0] = handle;
 		do_ioctl_err(fd, DRM_IOCTL_MODE_ADDFB2, &f, EREMOTE);
 	}
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 5cdb559778b..ea459414901 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -112,10 +112,10 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
 		igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
 				 DRM_FORMAT_MOD_NONE, &scratch->size, &scratch->pitch);
 		if (gem_has_lmem(exporter_fd))
-			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
 								       REGION_LMEM(0), REGION_SMEM);
 		else
-			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
 								       REGION_SMEM);
 
 		ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
-- 
2.33.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for Return allocated size in gem_create_in_memory_regions() and friends
  2021-09-28  3:11 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
@ 2021-09-28  5:40 ` Patchwork
  2021-09-28  6:52 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
  2021-09-28  8:40 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-09-28  5:40 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 3814 bytes --]

== Series Details ==

Series: Return allocated size in gem_create_in_memory_regions() and friends
URL   : https://patchwork.freedesktop.org/series/95137/
State : success

== Summary ==

CI Bug Log - changes from IGT_6224 -> IGTPW_6267
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/index.html

Known issues
------------

  Here are the changes found in IGTPW_6267 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
    - fi-snb-2600:        NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/fi-snb-2600/igt@amdgpu/amd_cs_nop@sync-fork-compute0.html

  * igt@debugfs_test@read_all_entries:
    - fi-kbl-soraka:      [PASS][2] -> [DMESG-WARN][3] ([i915#1982] / [i915#262])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@basic-rte:
    - fi-rkl-11600:       [SKIP][4] ([fdo#109308]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/fi-rkl-11600/igt@i915_pm_rpm@basic-rte.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/fi-rkl-11600/igt@i915_pm_rpm@basic-rte.html

  * igt@i915_selftest@live@hangcheck:
    - {fi-jsl-1}:         [INCOMPLETE][6] -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/fi-jsl-1/igt@i915_selftest@live@hangcheck.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/fi-jsl-1/igt@i915_selftest@live@hangcheck.html
    - fi-snb-2600:        [INCOMPLETE][8] ([i915#3921]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
    - fi-cfl-8109u:       [DMESG-WARN][10] ([i915#295]) -> [PASS][11] +12 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921


Participating hosts (36 -> 33)
------------------------------

  Missing    (3): fi-tgl-1115g4 fi-bsw-cyan fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6224 -> IGTPW_6267

  CI-20190529: 20190529
  CI_DRM_10650: f08f69e3c959e13a418965e33e4327d9ca3ca69a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6267: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/index.html
  IGT_6224: 2f4e6430a97f04284d1cafb1479e7c1b0b2d596a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/index.html

[-- Attachment #2: Type: text/html, Size: 4421 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
  2021-09-28  3:11 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
  2021-09-28  5:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2021-09-28  6:52 ` Zbigniew Kempczyński
  2021-10-02 20:32   ` Dixit, Ashutosh
  2021-09-28  8:40 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 1 reply; 10+ messages in thread
From: Zbigniew Kempczyński @ 2021-09-28  6:52 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev, Andrzej Turko, John Harrison

On Mon, Sep 27, 2021 at 08:11:00PM -0700, Ashutosh Dixit wrote:
> Often the allocated size is of interest and is different from the
> requested size. Therefore return allocated size for the object (by
> __gem_create_ext()) in gem_create_in_memory_regions() and friends.
> 
> Cc: Andrzej Turko <andrzej.turko@linux.intel.com>
> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
> Cc: John Harrison <John.C.Harrison@intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/i915/intel_memory_region.c | 6 +++---
>  lib/i915/intel_memory_region.h | 4 ++--
>  lib/intel_bufops.c             | 2 +-
>  lib/ioctl_wrappers.c           | 2 +-
>  tests/i915/gem_exec_basic.c    | 6 +++---
>  tests/i915/gem_gpgpu_fill.c    | 3 ++-
>  tests/i915/gem_media_fill.c    | 3 ++-
>  tests/kms_addfb_basic.c        | 2 +-
>  tests/kms_prime.c              | 4 ++--
>  9 files changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
> index 3de40549319..e59801a4cab 100644
> --- a/lib/i915/intel_memory_region.c
> +++ b/lib/i915/intel_memory_region.c
> @@ -183,7 +183,7 @@ bool gem_has_lmem(int fd)
>  
>  /* A version of gem_create_in_memory_region_list which can be allowed to
>     fail so that the object creation can be retried */
> -int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
> +int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
>  				       struct drm_i915_gem_memory_class_instance *mem_regions,
>  				       int num_regions)
>  {
> @@ -193,7 +193,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
>  		.regions = to_user_pointer(mem_regions),
>  	};
>  
> -	return __gem_create_ext(fd, &size, handle, &ext_regions.base);
> +	return __gem_create_ext(fd, size, handle, &ext_regions.base);
>  }
>  
>  /* gem_create_in_memory_region_list:
> @@ -202,7 +202,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
>   * @mem_regions: memory regions array (priority list)
>   * @num_regions: @mem_regions length
>   */
> -uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
> +uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
>  					  struct drm_i915_gem_memory_class_instance *mem_regions,
>  					  int num_regions)
>  {
> diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
> index 70b74944b51..bf75831ccba 100644
> --- a/lib/i915/intel_memory_region.h
> +++ b/lib/i915/intel_memory_region.h
> @@ -64,11 +64,11 @@ bool gem_has_lmem(int fd);
>  
>  struct drm_i915_gem_memory_class_instance;
>  
> -int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
> +int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
>  				       struct drm_i915_gem_memory_class_instance *mem_regions,
>  				       int num_regions);
>  
> -uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
> +uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
>  					  struct drm_i915_gem_memory_class_instance *mem_regions,
>  					  int num_regions);
>  
> diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
> index d1395c1605d..52794c1ac10 100644
> --- a/lib/intel_bufops.c
> +++ b/lib/intel_bufops.c
> @@ -819,7 +819,7 @@ static void __intel_buf_init(struct buf_ops *bops,
>  	if (handle)
>  		buf->handle = handle;
>  	else {
> -		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
> +		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
>  			buf->handle = handle;
>  		else
>  			buf->handle = gem_create(bops->fd, size);

As size can be different we pass we should update buf->size accordingly.
Look at few lines above:

	/* Store real bo size to avoid mistakes in calculating it again */
	buf->size = size;

I think these lines can be moved at the bottom of the condition.

buf->size is returned as a call to intel_buf_bo_size() and used in
intel_bb_add_object(). This can be important for no-reloc mode to avoid
overlapping object on softpin and hitting -ENOSPC.

--
Zbigniew 

> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 09eb3ce7b57..4d628e50aca 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -635,7 +635,7 @@ uint32_t gem_buffer_create_fb_obj(int fd, uint64_t size)
>  	uint32_t handle;
>  
>  	if (gem_has_lmem(fd))
> -		handle = gem_create_in_memory_regions(fd, size, REGION_LMEM(0));
> +		handle = gem_create_in_memory_regions(fd, &size, REGION_LMEM(0));
>  	else
>  		handle = gem_create(fd, size);
>  
> diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
> index 008a35d0ae9..04e2209cab4 100644
> --- a/tests/i915/gem_exec_basic.c
> +++ b/tests/i915/gem_exec_basic.c
> @@ -28,12 +28,12 @@
>  
>  IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl rings.");
>  
> -static uint32_t batch_create(int fd, uint32_t batch_size, uint32_t region)
> +static uint32_t batch_create(int fd, uint64_t batch_size, uint32_t region)
>  {
>  	const uint32_t bbe = MI_BATCH_BUFFER_END;
>  	uint32_t handle;
>  
> -	handle = gem_create_in_memory_regions(fd, batch_size, region);
> +	handle = gem_create_in_memory_regions(fd, &batch_size, region);
>  	gem_write(fd, handle, 0, &bbe, sizeof(bbe));
>  
>  	return handle;
> @@ -44,7 +44,7 @@ igt_main
>  	const struct intel_execution_engine2 *e;
>  	struct drm_i915_query_memory_regions *query_info;
>  	struct igt_collection *regions, *set;
> -	uint32_t batch_size;
> +	uint64_t batch_size;
>  	const intel_ctx_t *ctx;
>  	int fd = -1;
>  
> diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c
> index 74a227f678e..76f4d7c61c8 100644
> --- a/tests/i915/gem_gpgpu_fill.c
> +++ b/tests/i915/gem_gpgpu_fill.c
> @@ -68,6 +68,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
>  	struct intel_buf *buf;
>  	uint8_t *ptr;
>  	uint32_t handle;
> +	uint64_t size = SIZE;
>  	int i;
>  
>  	buf = calloc(1, sizeof(*buf));
> @@ -77,7 +78,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
>  	 * Legacy code uses 32 bpp after buffer creation.
>  	 * Let's do the same due to keep shader intact.
>  	 */
> -	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
> +	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
>  	intel_buf_init_using_handle(data->bops, handle, buf,
>  				    width/4, height, 32, 0,
>  				    I915_TILING_NONE, 0);
> diff --git a/tests/i915/gem_media_fill.c b/tests/i915/gem_media_fill.c
> index 1d08df2473d..3d7d6fa2b0f 100644
> --- a/tests/i915/gem_media_fill.c
> +++ b/tests/i915/gem_media_fill.c
> @@ -69,12 +69,13 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
>  	struct intel_buf *buf;
>  	uint32_t handle;
>  	uint8_t *ptr;
> +	uint64_t size = SIZE;
>  	int i;
>  
>  	buf = calloc(1, sizeof(*buf));
>  	igt_assert(buf);
>  
> -	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
> +	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
>  
>  	/*
>  	 * Legacy code uses 32 bpp after buffer creation.
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index 55f4852da16..62fa78a5da9 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -158,7 +158,7 @@ static void invalid_tests(int fd)
>  		igt_require(gem_has_lmem(fd));
>  		igt_calc_fb_size(fd, f.width, f.height,
>  				DRM_FORMAT_XRGB8888, 0, &size, &stride);
> -		handle = gem_create_in_memory_regions(fd, size, REGION_SMEM);
> +		handle = gem_create_in_memory_regions(fd, &size, REGION_SMEM);
>  		f.handles[0] = handle;
>  		do_ioctl_err(fd, DRM_IOCTL_MODE_ADDFB2, &f, EREMOTE);
>  	}
> diff --git a/tests/kms_prime.c b/tests/kms_prime.c
> index 5cdb559778b..ea459414901 100644
> --- a/tests/kms_prime.c
> +++ b/tests/kms_prime.c
> @@ -112,10 +112,10 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
>  		igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
>  				 DRM_FORMAT_MOD_NONE, &scratch->size, &scratch->pitch);
>  		if (gem_has_lmem(exporter_fd))
> -			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> +			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
>  								       REGION_LMEM(0), REGION_SMEM);
>  		else
> -			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> +			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
>  								       REGION_SMEM);
>  
>  		ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
> -- 
> 2.33.0
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for Return allocated size in gem_create_in_memory_regions() and friends
  2021-09-28  3:11 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
  2021-09-28  5:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2021-09-28  6:52 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
@ 2021-09-28  8:40 ` Patchwork
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-09-28  8:40 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 30285 bytes --]

== Series Details ==

Series: Return allocated size in gem_create_in_memory_regions() and friends
URL   : https://patchwork.freedesktop.org/series/95137/
State : success

== Summary ==

CI Bug Log - changes from IGT_6224_full -> IGTPW_6267_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/index.html

Known issues
------------

  Here are the changes found in IGTPW_6267_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@display-3x:
    - shard-tglb:         NOTRUN -> [SKIP][1] ([i915#1839])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb2/igt@feature_discovery@display-3x.html

  * igt@feature_discovery@psr2:
    - shard-iclb:         [PASS][2] -> [SKIP][3] ([i915#658])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-iclb2/igt@feature_discovery@psr2.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb5/igt@feature_discovery@psr2.html

  * igt@gem_create@create-massive:
    - shard-snb:          NOTRUN -> [DMESG-WARN][4] ([i915#3002])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb5/igt@gem_create@create-massive.html
    - shard-kbl:          NOTRUN -> [DMESG-WARN][5] ([i915#3002]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl6/igt@gem_create@create-massive.html

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
    - shard-apl:          [PASS][6] -> [DMESG-WARN][7] ([i915#180]) +4 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-apl7/igt@gem_ctx_isolation@preservation-s3@rcs0.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl7/igt@gem_ctx_isolation@preservation-s3@rcs0.html
    - shard-tglb:         [PASS][8] -> [INCOMPLETE][9] ([i915#1373])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb5/igt@gem_ctx_isolation@preservation-s3@rcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@gem_ctx_isolation@preservation-s3@rcs0.html

  * igt@gem_ctx_persistence@legacy-engines-mixed:
    - shard-snb:          NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#1099]) +7 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb5/igt@gem_ctx_persistence@legacy-engines-mixed.html

  * igt@gem_ctx_persistence@many-contexts:
    - shard-tglb:         [PASS][11] -> [FAIL][12] ([i915#2410])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb1/igt@gem_ctx_persistence@many-contexts.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb5/igt@gem_ctx_persistence@many-contexts.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         NOTRUN -> [TIMEOUT][13] ([i915#2369] / [i915#3063] / [i915#3648])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb6/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][14] ([i915#2842])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl4/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-kbl:          [PASS][15] -> [FAIL][16] ([i915#2842]) +3 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-kbl6/igt@gem_exec_fair@basic-none@vcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl3/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-tglb:         NOTRUN -> [FAIL][17] ([i915#2842])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-kbl:          [PASS][18] -> [SKIP][19] ([fdo#109271])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-kbl1/igt@gem_exec_fair@basic-pace@rcs0.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl1/igt@gem_exec_fair@basic-pace@rcs0.html
    - shard-tglb:         [PASS][20] -> [FAIL][21] ([i915#2842])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb5/igt@gem_exec_fair@basic-pace@rcs0.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb2/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][22] -> [FAIL][23] ([i915#2842])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk7/igt@gem_exec_fair@basic-throttle@rcs0.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk2/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [PASS][24] -> [SKIP][25] ([i915#2190])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb5/igt@gem_huc_copy@huc-copy.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@gem_huc_copy@huc-copy.html
    - shard-kbl:          NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#2190])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl2/igt@gem_huc_copy@huc-copy.html

  * igt@gem_pread@exhaustion:
    - shard-apl:          NOTRUN -> [WARN][27] ([i915#2658])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl6/igt@gem_pread@exhaustion.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][28] ([i915#2658])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb5/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled:
    - shard-glk:          NOTRUN -> [SKIP][29] ([fdo#109271]) +66 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk1/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-tglb:         NOTRUN -> [SKIP][30] ([i915#3323])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb1/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-tglb:         NOTRUN -> [SKIP][31] ([i915#3297])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@gem_userptr_blits@dmabuf-unsync.html

  * igt@gem_userptr_blits@input-checking:
    - shard-tglb:         NOTRUN -> [DMESG-WARN][32] ([i915#3002])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb3/igt@gem_userptr_blits@input-checking.html
    - shard-apl:          NOTRUN -> [DMESG-WARN][33] ([i915#3002])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl3/igt@gem_userptr_blits@input-checking.html
    - shard-glk:          NOTRUN -> [DMESG-WARN][34] ([i915#3002])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk1/igt@gem_userptr_blits@input-checking.html
    - shard-iclb:         NOTRUN -> [DMESG-WARN][35] ([i915#3002])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb3/igt@gem_userptr_blits@input-checking.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-snb:          NOTRUN -> [FAIL][36] ([i915#2724])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb5/igt@gem_userptr_blits@vma-merge.html

  * igt@gen7_exec_parse@cmd-crossing-page:
    - shard-tglb:         NOTRUN -> [SKIP][37] ([fdo#109289]) +7 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@gen7_exec_parse@cmd-crossing-page.html

  * igt@gen7_exec_parse@oacontrol-tracking:
    - shard-iclb:         NOTRUN -> [SKIP][38] ([fdo#109289]) +1 similar issue
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb3/igt@gen7_exec_parse@oacontrol-tracking.html

  * igt@gen9_exec_parse@bb-start-cmd:
    - shard-tglb:         NOTRUN -> [SKIP][39] ([i915#2856]) +1 similar issue
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@gen9_exec_parse@bb-start-cmd.html

  * igt@gen9_exec_parse@unaligned-access:
    - shard-iclb:         NOTRUN -> [SKIP][40] ([i915#2856])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb2/igt@gen9_exec_parse@unaligned-access.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-tglb:         NOTRUN -> [SKIP][41] ([i915#1904])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb5/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - shard-apl:          NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#1937])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl2/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html

  * igt@i915_pm_rpm@pc8-residency:
    - shard-tglb:         NOTRUN -> [SKIP][43] ([fdo#109506] / [i915#2411])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb3/igt@i915_pm_rpm@pc8-residency.html

  * igt@i915_suspend@forcewake:
    - shard-tglb:         NOTRUN -> [INCOMPLETE][44] ([i915#456])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@i915_suspend@forcewake.html

  * igt@i915_suspend@sysfs-reader:
    - shard-tglb:         [PASS][45] -> [INCOMPLETE][46] ([i915#456])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb5/igt@i915_suspend@sysfs-reader.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@i915_suspend@sysfs-reader.html

  * igt@kms_big_fb@linear-32bpp-rotate-0:
    - shard-glk:          [PASS][47] -> [DMESG-WARN][48] ([i915#118] / [i915#95]) +2 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk6/igt@kms_big_fb@linear-32bpp-rotate-0.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk7/igt@kms_big_fb@linear-32bpp-rotate-0.html

  * igt@kms_big_fb@x-tiled-16bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][49] ([fdo#111614]) +1 similar issue
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb7/igt@kms_big_fb@x-tiled-16bpp-rotate-270.html

  * igt@kms_big_fb@yf-tiled-addfb-size-overflow:
    - shard-tglb:         NOTRUN -> [SKIP][50] ([fdo#111615]) +2 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@kms_big_fb@yf-tiled-addfb-size-overflow.html

  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
    - shard-glk:          NOTRUN -> [SKIP][51] ([fdo#109271] / [i915#3886]) +1 similar issue
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk2/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][52] ([i915#3689] / [i915#3886])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb3/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-a-random-ccs-data-yf_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][53] ([i915#3689]) +6 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb5/igt@kms_ccs@pipe-a-random-ccs-data-yf_tiled_ccs.html

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][54] ([fdo#109271] / [i915#3886]) +10 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl2/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109278] / [i915#3886]) +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb4/igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs:
    - shard-kbl:          NOTRUN -> [SKIP][56] ([fdo#109271] / [i915#3886]) +7 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl4/igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@vga-hpd:
    - shard-apl:          NOTRUN -> [SKIP][57] ([fdo#109271] / [fdo#111827]) +17 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl2/igt@kms_chamelium@vga-hpd.html

  * igt@kms_color_chamelium@pipe-c-ctm-limited-range:
    - shard-kbl:          NOTRUN -> [SKIP][58] ([fdo#109271] / [fdo#111827]) +14 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl1/igt@kms_color_chamelium@pipe-c-ctm-limited-range.html

  * igt@kms_color_chamelium@pipe-c-ctm-red-to-blue:
    - shard-snb:          NOTRUN -> [SKIP][59] ([fdo#109271] / [fdo#111827]) +14 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb2/igt@kms_color_chamelium@pipe-c-ctm-red-to-blue.html

  * igt@kms_color_chamelium@pipe-c-gamma:
    - shard-glk:          NOTRUN -> [SKIP][60] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk2/igt@kms_color_chamelium@pipe-c-gamma.html

  * igt@kms_color_chamelium@pipe-d-ctm-blue-to-red:
    - shard-tglb:         NOTRUN -> [SKIP][61] ([fdo#109284] / [fdo#111827]) +3 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@kms_color_chamelium@pipe-d-ctm-blue-to-red.html

  * igt@kms_content_protection@content_type_change:
    - shard-tglb:         NOTRUN -> [SKIP][62] ([fdo#111828])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb5/igt@kms_content_protection@content_type_change.html

  * igt@kms_content_protection@lic:
    - shard-apl:          NOTRUN -> [TIMEOUT][63] ([i915#1319]) +1 similar issue
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl7/igt@kms_content_protection@lic.html

  * igt@kms_content_protection@uevent:
    - shard-kbl:          NOTRUN -> [FAIL][64] ([i915#2105])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl6/igt@kms_content_protection@uevent.html

  * igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque:
    - shard-glk:          [PASS][65] -> [FAIL][66] ([i915#3444])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk7/igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk9/igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque.html

  * igt@kms_cursor_crc@pipe-b-cursor-max-size-offscreen:
    - shard-tglb:         NOTRUN -> [SKIP][67] ([i915#3359]) +3 similar issues
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb6/igt@kms_cursor_crc@pipe-b-cursor-max-size-offscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-512x170-random:
    - shard-tglb:         NOTRUN -> [SKIP][68] ([fdo#109279] / [i915#3359]) +2 similar issues
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb2/igt@kms_cursor_crc@pipe-d-cursor-512x170-random.html

  * igt@kms_dsc@basic-dsc-enable:
    - shard-iclb:         NOTRUN -> [SKIP][69] ([i915#3840])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb2/igt@kms_dsc@basic-dsc-enable.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [PASS][70] -> [INCOMPLETE][71] ([i915#180] / [i915#1982])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-apl2/igt@kms_fbcon_fbt@fbc-suspend.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl2/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][72] ([fdo#109274])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb6/igt@kms_flip@2x-modeset-vs-vblank-race-interruptible.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1:
    - shard-kbl:          NOTRUN -> [FAIL][73] ([i915#79])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl1/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1.html

  * igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2:
    - shard-glk:          [PASS][74] -> [FAIL][75] ([i915#79])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk9/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk5/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [PASS][76] -> [DMESG-WARN][77] ([i915#180]) +5 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-kbl7/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl3/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile:
    - shard-snb:          NOTRUN -> [SKIP][78] ([fdo#109271]) +448 similar issues
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb6/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff:
    - shard-tglb:         NOTRUN -> [SKIP][79] ([fdo#111825]) +25 similar issues
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-pgflip-blt:
    - shard-iclb:         NOTRUN -> [SKIP][80] ([fdo#109280]) +4 similar issues
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-pgflip-blt.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][81] ([fdo#109271] / [i915#533]) +1 similar issue
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl3/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#533])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-apl:          NOTRUN -> [FAIL][83] ([fdo#108145] / [i915#265]) +2 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl7/igt@kms_plane_alpha_blend@pipe-b-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
    - shard-kbl:          NOTRUN -> [FAIL][84] ([fdo#108145] / [i915#265]) +2 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl6/igt@kms_plane_alpha_blend@pipe-c-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb:
    - shard-glk:          NOTRUN -> [FAIL][85] ([i915#265])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk6/igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb.html

  * igt@kms_plane_cursor@pipe-d-overlay-size-256:
    - shard-iclb:         NOTRUN -> [SKIP][86] ([fdo#109278]) +3 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb4/igt@kms_plane_cursor@pipe-d-overlay-size-256.html

  * igt@kms_plane_lowres@pipe-c-tiling-none:
    - shard-iclb:         NOTRUN -> [SKIP][87] ([i915#3536])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb7/igt@kms_plane_lowres@pipe-c-tiling-none.html
    - shard-tglb:         NOTRUN -> [SKIP][88] ([i915#3536])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb5/igt@kms_plane_lowres@pipe-c-tiling-none.html

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][89] ([fdo#112054])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@kms_plane_multiple@atomic-pipe-c-tiling-yf.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
    - shard-kbl:          NOTRUN -> [SKIP][90] ([fdo#109271] / [i915#658]) +4 similar issues
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl1/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html
    - shard-tglb:         NOTRUN -> [SKIP][91] ([i915#2920]) +2 similar issues
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
    - shard-apl:          NOTRUN -> [SKIP][92] ([fdo#109271] / [i915#658]) +4 similar issues
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl8/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5:
    - shard-glk:          NOTRUN -> [SKIP][93] ([fdo#109271] / [i915#658]) +2 similar issues
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk1/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html
    - shard-iclb:         NOTRUN -> [SKIP][94] ([i915#658]) +1 similar issue
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb7/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [PASS][95] -> [SKIP][96] ([fdo#109441]) +1 similar issue
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb3/igt@kms_psr@psr2_cursor_blt.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-tglb:         NOTRUN -> [FAIL][97] ([i915#132] / [i915#3467]) +2 similar issues
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb1/igt@kms_psr@psr2_cursor_render.html

  * igt@kms_sysfs_edid_timing:
    - shard-apl:          NOTRUN -> [FAIL][98] ([IGT#2])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl7/igt@kms_sysfs_edid_timing.html

  * igt@kms_vblank@pipe-d-ts-continuation-idle:
    - shard-apl:          NOTRUN -> [SKIP][99] ([fdo#109271]) +207 similar issues
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl6/igt@kms_vblank@pipe-d-ts-continuation-idle.html

  * igt@kms_writeback@writeback-check-output:
    - shard-kbl:          NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#2437])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl2/igt@kms_writeback@writeback-check-output.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-apl:          NOTRUN -> [SKIP][101] ([fdo#109271] / [i915#2437]) +1 similar issue
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl3/igt@kms_writeback@writeback-fb-id.html

  * igt@nouveau_crc@pipe-c-ctx-flip-skip-current-frame:
    - shard-tglb:         NOTRUN -> [SKIP][102] ([i915#2530]) +1 similar issue
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb5/igt@nouveau_crc@pipe-c-ctx-flip-skip-current-frame.html

  * igt@prime_nv_pcopy@test2:
    - shard-kbl:          NOTRUN -> [SKIP][103] ([fdo#109271]) +168 similar issues
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl2/igt@prime_nv_pcopy@test2.html

  * igt@prime_nv_test@i915_import_gtt_mmap:
    - shard-iclb:         NOTRUN -> [SKIP][104] ([fdo#109291])
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb6/igt@prime_nv_test@i915_import_gtt_mmap.html

  * igt@prime_nv_test@nv_write_i915_gtt_mmap_read:
    - shard-tglb:         NOTRUN -> [SKIP][105] ([fdo#109291]) +2 similar issues
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@prime_nv_test@nv_write_i915_gtt_mmap_read.html

  * igt@prime_vgem@coherency-gtt:
    - shard-tglb:         NOTRUN -> [SKIP][106] ([fdo#111656])
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb2/igt@prime_vgem@coherency-gtt.html

  * igt@runner@aborted:
    - shard-snb:          NOTRUN -> [FAIL][107] ([i915#3002])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-snb5/igt@runner@aborted.html

  * igt@sysfs_clients@fair-3:
    - shard-kbl:          NOTRUN -> [SKIP][108] ([fdo#109271] / [i915#2994]) +2 similar issues
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl6/igt@sysfs_clients@fair-3.html

  * igt@sysfs_clients@sema-50:
    - shard-apl:          NOTRUN -> [SKIP][109] ([fdo#109271] / [i915#2994]) +1 similar issue
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl2/igt@sysfs_clients@sema-50.html
    - shard-tglb:         NOTRUN -> [SKIP][110] ([i915#2994])
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb8/igt@sysfs_clients@sema-50.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@preservation-s3@bcs0:
    - shard-apl:          [DMESG-WARN][111] ([i915#180]) -> [PASS][112]
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-apl7/igt@gem_ctx_isolation@preservation-s3@bcs0.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-apl7/igt@gem_ctx_isolation@preservation-s3@bcs0.html

  * igt@gem_exec_create@forked:
    - shard-glk:          [DMESG-WARN][113] ([i915#118] / [i915#95]) -> [PASS][114]
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk5/igt@gem_exec_create@forked.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk9/igt@gem_exec_create@forked.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [FAIL][115] ([i915#2846]) -> [PASS][116]
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk6/igt@gem_exec_fair@basic-deadline.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk2/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-tglb:         [FAIL][117] ([i915#2842]) -> [PASS][118] +2 similar issues
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb5/igt@gem_exec_fair@basic-flow@rcs0.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb1/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-glk:          [FAIL][119] ([i915#2842]) -> [PASS][120] +1 similar issue
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk1/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [SKIP][121] ([fdo#109271]) -> [PASS][122]
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-kbl1/igt@gem_exec_fair@basic-pace@vecs0.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl1/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_workarounds@suspend-resume-fd:
    - shard-kbl:          [DMESG-WARN][123] ([i915#180]) -> [PASS][124] +3 similar issues
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-kbl7/igt@gem_workarounds@suspend-resume-fd.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl6/igt@gem_workarounds@suspend-resume-fd.html

  * igt@kms_cursor_crc@pipe-a-cursor-size-change:
    - shard-iclb:         [FAIL][125] ([i915#3444]) -> [PASS][126]
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-iclb4/igt@kms_cursor_crc@pipe-a-cursor-size-change.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb6/igt@kms_cursor_crc@pipe-a-cursor-size-change.html
    - shard-kbl:          [FAIL][127] ([i915#3444]) -> [PASS][128]
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-size-change.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-size-change.html
    - shard-tglb:         [FAIL][129] ([i915#2124] / [i915#4024]) -> [PASS][130]
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb8/igt@kms_cursor_crc@pipe-a-cursor-size-change.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb3/igt@kms_cursor_crc@pipe-a-cursor-size-change.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-tglb:         [INCOMPLETE][131] ([i915#2828] / [i915#456]) -> [PASS][132]
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb1/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-tglb:         [INCOMPLETE][133] ([i915#2411] / [i915#456]) -> [PASS][134]
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-tglb7/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-tglb3/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
    - shard-glk:          [FAIL][135] ([i915#79]) -> [PASS][136]
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk9/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk5/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html

  * igt@kms_frontbuffer_tracking@fbc-modesetfrombusy:
    - shard-glk:          [FAIL][137] ([i915#2546]) -> [PASS][138]
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-glk1/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-glk2/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html

  
#### Warnings ####

  * igt@i915_pm_rc6_residency@rc6-fence:
    - shard-iclb:         [WARN][139] ([i915#1804] / [i915#2684]) -> [WARN][140] ([i915#2684]) +1 similar issue
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-iclb4/igt@i915_pm_rc6_residency@rc6-fence.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb5/igt@i915_pm_rc6_residency@rc6-fence.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
    - shard-iclb:         [SKIP][141] ([i915#658]) -> [SKIP][142] ([i915#2920]) +2 similar issues
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6224/shard-iclb6/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/shard-iclb2/igt@kms_psr2_sf@overlay-p

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6267/index.html

[-- Attachment #2: Type: text/html, Size: 33826 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
  2021-09-28  6:52 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
@ 2021-10-02 20:32   ` Dixit, Ashutosh
  2021-10-04  3:40     ` Zbigniew Kempczyński
  2021-10-07 19:26     ` John Harrison
  0 siblings, 2 replies; 10+ messages in thread
From: Dixit, Ashutosh @ 2021-10-02 20:32 UTC (permalink / raw)
  To: Zbigniew Kempczyński; +Cc: igt-dev, Andrzej Turko, John Harrison

On Mon, 27 Sep 2021 23:52:41 -0700, Zbigniew Kempczyński wrote:
>
> > diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
> > index d1395c1605d..52794c1ac10 100644
> > --- a/lib/intel_bufops.c
> > +++ b/lib/intel_bufops.c
> > @@ -819,7 +819,7 @@ static void __intel_buf_init(struct buf_ops *bops,
> >	if (handle)
> >		buf->handle = handle;
> >	else {
> > -		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
> > +		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
> >			buf->handle = handle;
> >		else
> >			buf->handle = gem_create(bops->fd, size);
>
> As size can be different we pass we should update buf->size accordingly.
> Look at few lines above:
>
>	/* Store real bo size to avoid mistakes in calculating it again */
>	buf->size = size;
>
> I think these lines can be moved at the bottom of the condition.
>
> buf->size is returned as a call to intel_buf_bo_size() and used in
> intel_bb_add_object(). This can be important for no-reloc mode to avoid
> overlapping object on softpin and hitting -ENOSPC.

I have a new patch reverting part of the changes done in 22643ce4014a:

https://patchwork.freedesktop.org/series/95376/

In this context I want to check regarding the above change again: should we
be setting buf->size above to the allocated size or to the requested size,
in case the two are different? Currently the code (even after the new
patch) is setting it to the allocated size which might be >= the requested
size. Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
  2021-10-02 20:32   ` Dixit, Ashutosh
@ 2021-10-04  3:40     ` Zbigniew Kempczyński
  2021-10-07 19:26     ` John Harrison
  1 sibling, 0 replies; 10+ messages in thread
From: Zbigniew Kempczyński @ 2021-10-04  3:40 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: igt-dev, John Harrison

On Sat, Oct 02, 2021 at 01:32:08PM -0700, Dixit, Ashutosh wrote:
> On Mon, 27 Sep 2021 23:52:41 -0700, Zbigniew Kempczyński wrote:
> >
> > > diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
> > > index d1395c1605d..52794c1ac10 100644
> > > --- a/lib/intel_bufops.c
> > > +++ b/lib/intel_bufops.c
> > > @@ -819,7 +819,7 @@ static void __intel_buf_init(struct buf_ops *bops,
> > >	if (handle)
> > >		buf->handle = handle;
> > >	else {
> > > -		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
> > > +		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
> > >			buf->handle = handle;
> > >		else
> > >			buf->handle = gem_create(bops->fd, size);
> >
> > As size can be different we pass we should update buf->size accordingly.
> > Look at few lines above:
> >
> >	/* Store real bo size to avoid mistakes in calculating it again */
> >	buf->size = size;
> >
> > I think these lines can be moved at the bottom of the condition.
> >
> > buf->size is returned as a call to intel_buf_bo_size() and used in
> > intel_bb_add_object(). This can be important for no-reloc mode to avoid
> > overlapping object on softpin and hitting -ENOSPC.
> 
> I have a new patch reverting part of the changes done in 22643ce4014a:
> 
> https://patchwork.freedesktop.org/series/95376/
> 
> In this context I want to check regarding the above change again: should we
> be setting buf->size above to the allocated size or to the requested size,
> in case the two are different? Currently the code (even after the new
> patch) is setting it to the allocated size which might be >= the requested
> size. Thanks.

Keep the requested size, not underlying bo size. I'm going to do quick 
rename from intel_buf_bo_size() to intel_buf_size() to avoid confusion we
got gem bo size instead of raw sze.

--
Zbigniew 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
  2021-10-02 20:32   ` Dixit, Ashutosh
  2021-10-04  3:40     ` Zbigniew Kempczyński
@ 2021-10-07 19:26     ` John Harrison
  2021-10-08  5:38       ` Zbigniew Kempczyński
  1 sibling, 1 reply; 10+ messages in thread
From: John Harrison @ 2021-10-07 19:26 UTC (permalink / raw)
  To: Dixit, Ashutosh, Zbigniew Kempczyński; +Cc: igt-dev, Andrzej Turko

On 10/2/2021 13:32, Dixit, Ashutosh wrote:
> On Mon, 27 Sep 2021 23:52:41 -0700, Zbigniew Kempczyński wrote:
>>> diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
>>> index d1395c1605d..52794c1ac10 100644
>>> --- a/lib/intel_bufops.c
>>> +++ b/lib/intel_bufops.c
>>> @@ -819,7 +819,7 @@ static void __intel_buf_init(struct buf_ops *bops,
>>> 	if (handle)
>>> 		buf->handle = handle;
>>> 	else {
>>> -		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
>>> +		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
>>> 			buf->handle = handle;
>>> 		else
>>> 			buf->handle = gem_create(bops->fd, size);
>> As size can be different we pass we should update buf->size accordingly.
>> Look at few lines above:
>>
>> 	/* Store real bo size to avoid mistakes in calculating it again */
>> 	buf->size = size;
>>
>> I think these lines can be moved at the bottom of the condition.
>>
>> buf->size is returned as a call to intel_buf_bo_size() and used in
>> intel_bb_add_object(). This can be important for no-reloc mode to avoid
>> overlapping object on softpin and hitting -ENOSPC.
> I have a new patch reverting part of the changes done in 22643ce4014a:
>
> https://patchwork.freedesktop.org/series/95376/
>
> In this context I want to check regarding the above change again: should we
> be setting buf->size above to the allocated size or to the requested size,
> in case the two are different? Currently the code (even after the new
> patch) is setting it to the allocated size which might be >= the requested
> size. Thanks.
There are valid reasons why the actual allocated size is required by 
some tests. For example, verifying that an error capture has captured a 
buffer object correctly (and not saved too little/much data). If there 
are also valid reasons why a test might fail if given the actual size 
rather than the requested size then maybe we need another mechanism. 
Either return both or provide support for querying one or both later on.

John.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
  2021-10-07 19:26     ` John Harrison
@ 2021-10-08  5:38       ` Zbigniew Kempczyński
  0 siblings, 0 replies; 10+ messages in thread
From: Zbigniew Kempczyński @ 2021-10-08  5:38 UTC (permalink / raw)
  To: John Harrison; +Cc: Dixit, Ashutosh, igt-dev, Andrzej Turko

On Thu, Oct 07, 2021 at 12:26:16PM -0700, John Harrison wrote:
> On 10/2/2021 13:32, Dixit, Ashutosh wrote:
> > On Mon, 27 Sep 2021 23:52:41 -0700, Zbigniew Kempczyński wrote:
> > > > diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
> > > > index d1395c1605d..52794c1ac10 100644
> > > > --- a/lib/intel_bufops.c
> > > > +++ b/lib/intel_bufops.c
> > > > @@ -819,7 +819,7 @@ static void __intel_buf_init(struct buf_ops *bops,
> > > > 	if (handle)
> > > > 		buf->handle = handle;
> > > > 	else {
> > > > -		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
> > > > +		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
> > > > 			buf->handle = handle;
> > > > 		else
> > > > 			buf->handle = gem_create(bops->fd, size);
> > > As size can be different we pass we should update buf->size accordingly.
> > > Look at few lines above:
> > > 
> > > 	/* Store real bo size to avoid mistakes in calculating it again */
> > > 	buf->size = size;
> > > 
> > > I think these lines can be moved at the bottom of the condition.
> > > 
> > > buf->size is returned as a call to intel_buf_bo_size() and used in
> > > intel_bb_add_object(). This can be important for no-reloc mode to avoid
> > > overlapping object on softpin and hitting -ENOSPC.
> > I have a new patch reverting part of the changes done in 22643ce4014a:
> > 
> > https://patchwork.freedesktop.org/series/95376/
> > 
> > In this context I want to check regarding the above change again: should we
> > be setting buf->size above to the allocated size or to the requested size,
> > in case the two are different? Currently the code (even after the new
> > patch) is setting it to the allocated size which might be >= the requested
> > size. Thanks.
> There are valid reasons why the actual allocated size is required by some
> tests. For example, verifying that an error capture has captured a buffer
> object correctly (and not saved too little/much data). If there are also
> valid reasons why a test might fail if given the actual size rather than the
> requested size then maybe we need another mechanism. Either return both or
> provide support for querying one or both later on.

I've diverged requested size and bo size to fulfill your needs:

https://patchwork.freedesktop.org/series/95388/

Calculated buffer size reside in buf->size and is returned by intel_buf_size(),
similar buf->bo_size is returned from intel_buf_bo_size().

One disclaimer - intel_buf is not able to validate bo size if it is passed
from the caller (intel_buf_create_with_handle() family).
When it is used in "create" path what means it creates gem bo it catches
bo size returned from the kernel.

--
Zbigniew

> 
> John.
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
  2021-09-28 18:47 [igt-dev] [PATCH i-g-t] " Ashutosh Dixit
@ 2021-09-29  5:05 ` Zbigniew Kempczyński
  0 siblings, 0 replies; 10+ messages in thread
From: Zbigniew Kempczyński @ 2021-09-29  5:05 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev, John Harrison

On Tue, Sep 28, 2021 at 11:47:05AM -0700, Ashutosh Dixit wrote:
> Often the allocated size is of interest and is different from the
> requested size. Therefore return allocated size for the object (by
> __gem_create_ext()) in gem_create_in_memory_regions() and friends.
> 
> v2: Assign buf->size correctly in __intel_buf_init (Zbigniew)
> 
> Cc: Andrzej Turko <andrzej.turko@linux.intel.com>
> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
> Cc: John Harrison <John.C.Harrison@intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/i915/intel_memory_region.c | 6 +++---
>  lib/i915/intel_memory_region.h | 4 ++--
>  lib/intel_bufops.c             | 8 ++++----
>  lib/ioctl_wrappers.c           | 2 +-
>  tests/i915/gem_exec_basic.c    | 6 +++---
>  tests/i915/gem_gpgpu_fill.c    | 3 ++-
>  tests/i915/gem_media_fill.c    | 3 ++-
>  tests/kms_addfb_basic.c        | 2 +-
>  tests/kms_prime.c              | 4 ++--
>  9 files changed, 20 insertions(+), 18 deletions(-)
> 
> diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
> index 3de40549319..e59801a4cab 100644
> --- a/lib/i915/intel_memory_region.c
> +++ b/lib/i915/intel_memory_region.c
> @@ -183,7 +183,7 @@ bool gem_has_lmem(int fd)
>  
>  /* A version of gem_create_in_memory_region_list which can be allowed to
>     fail so that the object creation can be retried */
> -int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
> +int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
>  				       struct drm_i915_gem_memory_class_instance *mem_regions,
>  				       int num_regions)
>  {
> @@ -193,7 +193,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
>  		.regions = to_user_pointer(mem_regions),
>  	};
>  
> -	return __gem_create_ext(fd, &size, handle, &ext_regions.base);
> +	return __gem_create_ext(fd, size, handle, &ext_regions.base);
>  }
>  
>  /* gem_create_in_memory_region_list:
> @@ -202,7 +202,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
>   * @mem_regions: memory regions array (priority list)
>   * @num_regions: @mem_regions length
>   */
> -uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
> +uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
>  					  struct drm_i915_gem_memory_class_instance *mem_regions,
>  					  int num_regions)
>  {
> diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
> index 70b74944b51..bf75831ccba 100644
> --- a/lib/i915/intel_memory_region.h
> +++ b/lib/i915/intel_memory_region.h
> @@ -64,11 +64,11 @@ bool gem_has_lmem(int fd);
>  
>  struct drm_i915_gem_memory_class_instance;
>  
> -int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
> +int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
>  				       struct drm_i915_gem_memory_class_instance *mem_regions,
>  				       int num_regions);
>  
> -uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
> +uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
>  					  struct drm_i915_gem_memory_class_instance *mem_regions,
>  					  int num_regions);
>  
> diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
> index d1395c1605d..0cb7614234a 100644
> --- a/lib/intel_bufops.c
> +++ b/lib/intel_bufops.c
> @@ -813,18 +813,18 @@ static void __intel_buf_init(struct buf_ops *bops,
>  		size = bo_size;
>  	}
>  
> -	/* Store real bo size to avoid mistakes in calculating it again */
> -	buf->size = size;
> -
>  	if (handle)
>  		buf->handle = handle;
>  	else {
> -		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
> +		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
>  			buf->handle = handle;
>  		else
>  			buf->handle = gem_create(bops->fd, size);
>  	}
>  
> +	/* Store real bo size to avoid mistakes in calculating it again */
> +	buf->size = size;
> +

Looks ok right now:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

--
Zbigniew


>  	set_hw_tiled(bops, buf);
>  }
>  
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 09eb3ce7b57..4d628e50aca 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -635,7 +635,7 @@ uint32_t gem_buffer_create_fb_obj(int fd, uint64_t size)
>  	uint32_t handle;
>  
>  	if (gem_has_lmem(fd))
> -		handle = gem_create_in_memory_regions(fd, size, REGION_LMEM(0));
> +		handle = gem_create_in_memory_regions(fd, &size, REGION_LMEM(0));
>  	else
>  		handle = gem_create(fd, size);
>  
> diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
> index 008a35d0ae9..04e2209cab4 100644
> --- a/tests/i915/gem_exec_basic.c
> +++ b/tests/i915/gem_exec_basic.c
> @@ -28,12 +28,12 @@
>  
>  IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl rings.");
>  
> -static uint32_t batch_create(int fd, uint32_t batch_size, uint32_t region)
> +static uint32_t batch_create(int fd, uint64_t batch_size, uint32_t region)
>  {
>  	const uint32_t bbe = MI_BATCH_BUFFER_END;
>  	uint32_t handle;
>  
> -	handle = gem_create_in_memory_regions(fd, batch_size, region);
> +	handle = gem_create_in_memory_regions(fd, &batch_size, region);
>  	gem_write(fd, handle, 0, &bbe, sizeof(bbe));
>  
>  	return handle;
> @@ -44,7 +44,7 @@ igt_main
>  	const struct intel_execution_engine2 *e;
>  	struct drm_i915_query_memory_regions *query_info;
>  	struct igt_collection *regions, *set;
> -	uint32_t batch_size;
> +	uint64_t batch_size;
>  	const intel_ctx_t *ctx;
>  	int fd = -1;
>  
> diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c
> index 74a227f678e..76f4d7c61c8 100644
> --- a/tests/i915/gem_gpgpu_fill.c
> +++ b/tests/i915/gem_gpgpu_fill.c
> @@ -68,6 +68,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
>  	struct intel_buf *buf;
>  	uint8_t *ptr;
>  	uint32_t handle;
> +	uint64_t size = SIZE;
>  	int i;
>  
>  	buf = calloc(1, sizeof(*buf));
> @@ -77,7 +78,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
>  	 * Legacy code uses 32 bpp after buffer creation.
>  	 * Let's do the same due to keep shader intact.
>  	 */
> -	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
> +	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
>  	intel_buf_init_using_handle(data->bops, handle, buf,
>  				    width/4, height, 32, 0,
>  				    I915_TILING_NONE, 0);
> diff --git a/tests/i915/gem_media_fill.c b/tests/i915/gem_media_fill.c
> index 1d08df2473d..3d7d6fa2b0f 100644
> --- a/tests/i915/gem_media_fill.c
> +++ b/tests/i915/gem_media_fill.c
> @@ -69,12 +69,13 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
>  	struct intel_buf *buf;
>  	uint32_t handle;
>  	uint8_t *ptr;
> +	uint64_t size = SIZE;
>  	int i;
>  
>  	buf = calloc(1, sizeof(*buf));
>  	igt_assert(buf);
>  
> -	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
> +	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
>  
>  	/*
>  	 * Legacy code uses 32 bpp after buffer creation.
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index 55f4852da16..62fa78a5da9 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -158,7 +158,7 @@ static void invalid_tests(int fd)
>  		igt_require(gem_has_lmem(fd));
>  		igt_calc_fb_size(fd, f.width, f.height,
>  				DRM_FORMAT_XRGB8888, 0, &size, &stride);
> -		handle = gem_create_in_memory_regions(fd, size, REGION_SMEM);
> +		handle = gem_create_in_memory_regions(fd, &size, REGION_SMEM);
>  		f.handles[0] = handle;
>  		do_ioctl_err(fd, DRM_IOCTL_MODE_ADDFB2, &f, EREMOTE);
>  	}
> diff --git a/tests/kms_prime.c b/tests/kms_prime.c
> index 5cdb559778b..ea459414901 100644
> --- a/tests/kms_prime.c
> +++ b/tests/kms_prime.c
> @@ -112,10 +112,10 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
>  		igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
>  				 DRM_FORMAT_MOD_NONE, &scratch->size, &scratch->pitch);
>  		if (gem_has_lmem(exporter_fd))
> -			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> +			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
>  								       REGION_LMEM(0), REGION_SMEM);
>  		else
> -			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
> +			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
>  								       REGION_SMEM);
>  
>  		ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
> -- 
> 2.33.0
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends
@ 2021-09-28 18:47 Ashutosh Dixit
  2021-09-29  5:05 ` Zbigniew Kempczyński
  0 siblings, 1 reply; 10+ messages in thread
From: Ashutosh Dixit @ 2021-09-28 18:47 UTC (permalink / raw)
  To: igt-dev; +Cc: Andrzej Turko, Zbigniew Kempczynski, John Harrison

Often the allocated size is of interest and is different from the
requested size. Therefore return allocated size for the object (by
__gem_create_ext()) in gem_create_in_memory_regions() and friends.

v2: Assign buf->size correctly in __intel_buf_init (Zbigniew)

Cc: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/i915/intel_memory_region.c | 6 +++---
 lib/i915/intel_memory_region.h | 4 ++--
 lib/intel_bufops.c             | 8 ++++----
 lib/ioctl_wrappers.c           | 2 +-
 tests/i915/gem_exec_basic.c    | 6 +++---
 tests/i915/gem_gpgpu_fill.c    | 3 ++-
 tests/i915/gem_media_fill.c    | 3 ++-
 tests/kms_addfb_basic.c        | 2 +-
 tests/kms_prime.c              | 4 ++--
 9 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
index 3de40549319..e59801a4cab 100644
--- a/lib/i915/intel_memory_region.c
+++ b/lib/i915/intel_memory_region.c
@@ -183,7 +183,7 @@ bool gem_has_lmem(int fd)
 
 /* A version of gem_create_in_memory_region_list which can be allowed to
    fail so that the object creation can be retried */
-int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
+int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
 				       struct drm_i915_gem_memory_class_instance *mem_regions,
 				       int num_regions)
 {
@@ -193,7 +193,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
 		.regions = to_user_pointer(mem_regions),
 	};
 
-	return __gem_create_ext(fd, &size, handle, &ext_regions.base);
+	return __gem_create_ext(fd, size, handle, &ext_regions.base);
 }
 
 /* gem_create_in_memory_region_list:
@@ -202,7 +202,7 @@ int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
  * @mem_regions: memory regions array (priority list)
  * @num_regions: @mem_regions length
  */
-uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
+uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
 					  struct drm_i915_gem_memory_class_instance *mem_regions,
 					  int num_regions)
 {
diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
index 70b74944b51..bf75831ccba 100644
--- a/lib/i915/intel_memory_region.h
+++ b/lib/i915/intel_memory_region.h
@@ -64,11 +64,11 @@ bool gem_has_lmem(int fd);
 
 struct drm_i915_gem_memory_class_instance;
 
-int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t size,
+int __gem_create_in_memory_region_list(int fd, uint32_t *handle, uint64_t *size,
 				       struct drm_i915_gem_memory_class_instance *mem_regions,
 				       int num_regions);
 
-uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
+uint32_t gem_create_in_memory_region_list(int fd, uint64_t *size,
 					  struct drm_i915_gem_memory_class_instance *mem_regions,
 					  int num_regions);
 
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index d1395c1605d..0cb7614234a 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -813,18 +813,18 @@ static void __intel_buf_init(struct buf_ops *bops,
 		size = bo_size;
 	}
 
-	/* Store real bo size to avoid mistakes in calculating it again */
-	buf->size = size;
-
 	if (handle)
 		buf->handle = handle;
 	else {
-		if (!__gem_create_in_memory_regions(bops->fd, &handle, size, region))
+		if (!__gem_create_in_memory_regions(bops->fd, &handle, &size, region))
 			buf->handle = handle;
 		else
 			buf->handle = gem_create(bops->fd, size);
 	}
 
+	/* Store real bo size to avoid mistakes in calculating it again */
+	buf->size = size;
+
 	set_hw_tiled(bops, buf);
 }
 
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 09eb3ce7b57..4d628e50aca 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -635,7 +635,7 @@ uint32_t gem_buffer_create_fb_obj(int fd, uint64_t size)
 	uint32_t handle;
 
 	if (gem_has_lmem(fd))
-		handle = gem_create_in_memory_regions(fd, size, REGION_LMEM(0));
+		handle = gem_create_in_memory_regions(fd, &size, REGION_LMEM(0));
 	else
 		handle = gem_create(fd, size);
 
diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
index 008a35d0ae9..04e2209cab4 100644
--- a/tests/i915/gem_exec_basic.c
+++ b/tests/i915/gem_exec_basic.c
@@ -28,12 +28,12 @@
 
 IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl rings.");
 
-static uint32_t batch_create(int fd, uint32_t batch_size, uint32_t region)
+static uint32_t batch_create(int fd, uint64_t batch_size, uint32_t region)
 {
 	const uint32_t bbe = MI_BATCH_BUFFER_END;
 	uint32_t handle;
 
-	handle = gem_create_in_memory_regions(fd, batch_size, region);
+	handle = gem_create_in_memory_regions(fd, &batch_size, region);
 	gem_write(fd, handle, 0, &bbe, sizeof(bbe));
 
 	return handle;
@@ -44,7 +44,7 @@ igt_main
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_query_memory_regions *query_info;
 	struct igt_collection *regions, *set;
-	uint32_t batch_size;
+	uint64_t batch_size;
 	const intel_ctx_t *ctx;
 	int fd = -1;
 
diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c
index 74a227f678e..76f4d7c61c8 100644
--- a/tests/i915/gem_gpgpu_fill.c
+++ b/tests/i915/gem_gpgpu_fill.c
@@ -68,6 +68,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
 	struct intel_buf *buf;
 	uint8_t *ptr;
 	uint32_t handle;
+	uint64_t size = SIZE;
 	int i;
 
 	buf = calloc(1, sizeof(*buf));
@@ -77,7 +78,7 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
 	 * Legacy code uses 32 bpp after buffer creation.
 	 * Let's do the same due to keep shader intact.
 	 */
-	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
+	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
 	intel_buf_init_using_handle(data->bops, handle, buf,
 				    width/4, height, 32, 0,
 				    I915_TILING_NONE, 0);
diff --git a/tests/i915/gem_media_fill.c b/tests/i915/gem_media_fill.c
index 1d08df2473d..3d7d6fa2b0f 100644
--- a/tests/i915/gem_media_fill.c
+++ b/tests/i915/gem_media_fill.c
@@ -69,12 +69,13 @@ create_buf(data_t *data, int width, int height, uint8_t color, uint32_t region)
 	struct intel_buf *buf;
 	uint32_t handle;
 	uint8_t *ptr;
+	uint64_t size = SIZE;
 	int i;
 
 	buf = calloc(1, sizeof(*buf));
 	igt_assert(buf);
 
-	handle = gem_create_in_memory_regions(data->drm_fd, SIZE, region);
+	handle = gem_create_in_memory_regions(data->drm_fd, &size, region);
 
 	/*
 	 * Legacy code uses 32 bpp after buffer creation.
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 55f4852da16..62fa78a5da9 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -158,7 +158,7 @@ static void invalid_tests(int fd)
 		igt_require(gem_has_lmem(fd));
 		igt_calc_fb_size(fd, f.width, f.height,
 				DRM_FORMAT_XRGB8888, 0, &size, &stride);
-		handle = gem_create_in_memory_regions(fd, size, REGION_SMEM);
+		handle = gem_create_in_memory_regions(fd, &size, REGION_SMEM);
 		f.handles[0] = handle;
 		do_ioctl_err(fd, DRM_IOCTL_MODE_ADDFB2, &f, EREMOTE);
 	}
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 5cdb559778b..ea459414901 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -112,10 +112,10 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
 		igt_calc_fb_size(exporter_fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888,
 				 DRM_FORMAT_MOD_NONE, &scratch->size, &scratch->pitch);
 		if (gem_has_lmem(exporter_fd))
-			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
 								       REGION_LMEM(0), REGION_SMEM);
 		else
-			scratch->handle = gem_create_in_memory_regions(exporter_fd, scratch->size,
+			scratch->handle = gem_create_in_memory_regions(exporter_fd, &scratch->size,
 								       REGION_SMEM);
 
 		ptr = gem_mmap__device_coherent(exporter_fd, scratch->handle, 0, scratch->size,
-- 
2.33.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-08  5:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  3:11 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
2021-09-28  5:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-09-28  6:52 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
2021-10-02 20:32   ` Dixit, Ashutosh
2021-10-04  3:40     ` Zbigniew Kempczyński
2021-10-07 19:26     ` John Harrison
2021-10-08  5:38       ` Zbigniew Kempczyński
2021-09-28  8:40 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2021-09-28 18:47 [igt-dev] [PATCH i-g-t] " Ashutosh Dixit
2021-09-29  5:05 ` Zbigniew Kempczyński

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.