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 18:47 Ashutosh Dixit
  2021-09-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for Return allocated size in gem_create_in_memory_regions() and friends (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 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

* [igt-dev] ✓ Fi.CI.BAT: success for Return allocated size in gem_create_in_memory_regions() and friends (rev2)
  2021-09-28 18:47 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
@ 2021-09-28 19:34 ` Patchwork
  2021-09-28 21:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2021-09-29  5:05 ` [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Zbigniew Kempczyński
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-09-28 19:34 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

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

== Series Details ==

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

== Summary ==

CI Bug Log - changes from IGT_6227 -> IGTPW_6268
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s0:
    - fi-bsw-kefka:       [PASS][1] -> [INCOMPLETE][2] ([i915#2539])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/fi-bsw-kefka/igt@gem_exec_suspend@basic-s0.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/fi-bsw-kefka/igt@gem_exec_suspend@basic-s0.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s0:
    - fi-tgl-u2:          [FAIL][3] ([i915#1888]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/fi-tgl-u2/igt@gem_exec_suspend@basic-s0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/fi-tgl-u2/igt@gem_exec_suspend@basic-s0.html

  * igt@i915_selftest@live@gt_lrc:
    - fi-bsw-n3050:       [DMESG-FAIL][5] ([i915#2373]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/fi-bsw-n3050/igt@i915_selftest@live@gt_lrc.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/fi-bsw-n3050/igt@i915_selftest@live@gt_lrc.html

  
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#2373]: https://gitlab.freedesktop.org/drm/intel/issues/2373
  [i915#2539]: https://gitlab.freedesktop.org/drm/intel/issues/2539


Participating hosts (41 -> 37)
------------------------------

  Missing    (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_6227 -> IGTPW_6268

  CI-20190529: 20190529
  CI_DRM_10655: 88d6ecae86a7bb32e8bf2bd233f7f9f9c8bd7abc @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6268: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/index.html
  IGT_6227: 6ac2da7fd6b13f04f9aa0ec10f86b831d2756946 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

^ 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 (rev2)
  2021-09-28 18:47 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
  2021-09-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for Return allocated size in gem_create_in_memory_regions() and friends (rev2) Patchwork
@ 2021-09-28 21:42 ` Patchwork
  2021-09-29  5:05 ` [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Zbigniew Kempczyński
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-09-28 21:42 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

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

== Series Details ==

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

== Summary ==

CI Bug Log - changes from IGT_6227_full -> IGTPW_6268_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@legacy-engines-hostile@render:
    - shard-tglb:         [PASS][1] -> [FAIL][2] ([i915#2410])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-tglb3/igt@gem_ctx_persistence@legacy-engines-hostile@render.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@gem_ctx_persistence@legacy-engines-hostile@render.html

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

  * igt@gem_ctx_sseu@mmap-args:
    - shard-tglb:         NOTRUN -> [SKIP][4] ([i915#280])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb1/igt@gem_ctx_sseu@mmap-args.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [PASS][5] -> [TIMEOUT][6] ([i915#2369] / [i915#3063] / [i915#3648])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-tglb6/igt@gem_eio@unwedge-stress.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb3/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-kbl:          [PASS][7] -> [FAIL][8] ([i915#2846])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-kbl6/igt@gem_exec_fair@basic-deadline.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl6/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][9] ([i915#2842])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl7/igt@gem_exec_fair@basic-none-solo@rcs0.html
    - shard-glk:          NOTRUN -> [FAIL][10] ([i915#2842])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk6/igt@gem_exec_fair@basic-none-solo@rcs0.html
    - shard-iclb:         NOTRUN -> [FAIL][11] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb3/igt@gem_exec_fair@basic-none-solo@rcs0.html
    - shard-tglb:         NOTRUN -> [FAIL][12] ([i915#2842])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb1/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none@rcs0:
    - shard-glk:          [PASS][13] -> [FAIL][14] ([i915#2842]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-glk5/igt@gem_exec_fair@basic-none@rcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk8/igt@gem_exec_fair@basic-none@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-tglb:         [PASS][15] -> [FAIL][16] ([i915#2842])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-tglb6/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb5/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-kbl:          [PASS][17] -> [FAIL][18] ([i915#2842]) +2 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-kbl7/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl2/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_params@no-blt:
    - shard-tglb:         NOTRUN -> [SKIP][19] ([fdo#109283]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb3/igt@gem_exec_params@no-blt.html

  * igt@gem_exec_params@secure-non-master:
    - shard-tglb:         NOTRUN -> [SKIP][20] ([fdo#112283])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@gem_exec_params@secure-non-master.html

  * igt@gem_fenced_exec_thrash@2-spare-fences:
    - shard-snb:          NOTRUN -> [INCOMPLETE][21] ([i915#2055])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-snb6/igt@gem_fenced_exec_thrash@2-spare-fences.html

  * igt@gem_mmap_gtt@coherency:
    - shard-tglb:         NOTRUN -> [SKIP][22] ([fdo#111656])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb2/igt@gem_mmap_gtt@coherency.html
    - shard-iclb:         NOTRUN -> [SKIP][23] ([fdo#109292])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb6/igt@gem_mmap_gtt@coherency.html

  * igt@gem_pread@exhaustion:
    - shard-tglb:         NOTRUN -> [WARN][24] ([i915#2658]) +1 similar issue
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb8/igt@gem_pread@exhaustion.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][25] ([i915#2658])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-snb6/igt@gem_pwrite@basic-exhaustion.html
    - shard-iclb:         NOTRUN -> [WARN][26] ([i915#2658])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb4/igt@gem_pwrite@basic-exhaustion.html
    - shard-kbl:          NOTRUN -> [WARN][27] ([i915#2658])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl2/igt@gem_pwrite@basic-exhaustion.html
    - shard-apl:          NOTRUN -> [WARN][28] ([i915#2658])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl6/igt@gem_pwrite@basic-exhaustion.html
    - shard-glk:          NOTRUN -> [WARN][29] ([i915#2658])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk4/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled:
    - shard-glk:          NOTRUN -> [SKIP][30] ([fdo#109271]) +50 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk5/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled.html
    - shard-iclb:         NOTRUN -> [SKIP][31] ([i915#768])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb7/igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled.html

  * igt@gem_softpin@evict-snoop:
    - shard-iclb:         NOTRUN -> [SKIP][32] ([fdo#109312])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb1/igt@gem_softpin@evict-snoop.html

  * igt@gem_userptr_blits@input-checking:
    - shard-apl:          NOTRUN -> [DMESG-WARN][33] ([i915#3002])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl6/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_6268/shard-glk8/igt@gem_userptr_blits@input-checking.html

  * igt@gem_userptr_blits@unsync-unmap-after-close:
    - shard-tglb:         NOTRUN -> [SKIP][35] ([i915#3297])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb1/igt@gem_userptr_blits@unsync-unmap-after-close.html
    - shard-iclb:         NOTRUN -> [SKIP][36] ([i915#3297])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb3/igt@gem_userptr_blits@unsync-unmap-after-close.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-apl:          NOTRUN -> [FAIL][37] ([i915#3318])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl6/igt@gem_userptr_blits@vma-merge.html
    - shard-kbl:          NOTRUN -> [FAIL][38] ([i915#3318])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl3/igt@gem_userptr_blits@vma-merge.html

  * igt@gen9_exec_parse@batch-invalid-length:
    - shard-snb:          NOTRUN -> [SKIP][39] ([fdo#109271]) +391 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-snb6/igt@gen9_exec_parse@batch-invalid-length.html

  * igt@gen9_exec_parse@bb-start-param:
    - shard-tglb:         NOTRUN -> [SKIP][40] ([i915#2856]) +4 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@gen9_exec_parse@bb-start-param.html

  * igt@gen9_exec_parse@valid-registers:
    - shard-iclb:         NOTRUN -> [SKIP][41] ([i915#2856]) +2 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb2/igt@gen9_exec_parse@valid-registers.html

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

  * igt@i915_pm_dc@dc6-dpms:
    - shard-kbl:          NOTRUN -> [FAIL][43] ([i915#454])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl1/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_pm_rc6_residency@media-rc6-accuracy:
    - shard-tglb:         NOTRUN -> [SKIP][44] ([fdo#109289] / [fdo#111719])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@i915_pm_rc6_residency@media-rc6-accuracy.html

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-tglb:         NOTRUN -> [WARN][45] ([i915#2681] / [i915#2684])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb8/igt@i915_pm_rc6_residency@rc6-idle.html
    - shard-iclb:         NOTRUN -> [WARN][46] ([i915#2684])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb2/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@i915_pm_rpm@dpms-non-lpsp:
    - shard-tglb:         NOTRUN -> [SKIP][47] ([fdo#111644] / [i915#1397] / [i915#2411])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb2/igt@i915_pm_rpm@dpms-non-lpsp.html

  * igt@i915_selftest@live@gt_lrc:
    - shard-tglb:         NOTRUN -> [DMESG-FAIL][48] ([i915#2373])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@gt_pm:
    - shard-tglb:         NOTRUN -> [DMESG-FAIL][49] ([i915#1759] / [i915#2291])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@i915_selftest@live@gt_pm.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [PASS][50] -> [INCOMPLETE][51] ([i915#3921])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-snb6/igt@i915_selftest@live@hangcheck.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-snb5/igt@i915_selftest@live@hangcheck.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][52] ([i915#180])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl6/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_atomic@plane-primary-overlay-mutable-zpos:
    - shard-tglb:         NOTRUN -> [SKIP][53] ([i915#404])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb8/igt@kms_atomic@plane-primary-overlay-mutable-zpos.html

  * igt@kms_big_fb@linear-32bpp-rotate-180:
    - shard-glk:          [PASS][54] -> [DMESG-WARN][55] ([i915#118] / [i915#95])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-glk2/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk3/igt@kms_big_fb@linear-32bpp-rotate-180.html

  * igt@kms_big_fb@linear-8bpp-rotate-90:
    - shard-tglb:         NOTRUN -> [SKIP][56] ([fdo#111614]) +2 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@kms_big_fb@linear-8bpp-rotate-90.html

  * igt@kms_big_fb@x-tiled-32bpp-rotate-270:
    - shard-iclb:         NOTRUN -> [SKIP][57] ([fdo#110725] / [fdo#111614]) +1 similar issue
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb1/igt@kms_big_fb@x-tiled-32bpp-rotate-270.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip:
    - shard-apl:          NOTRUN -> [SKIP][58] ([fdo#109271] / [i915#3777]) +1 similar issue
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip.html

  * igt@kms_big_fb@yf-tiled-8bpp-rotate-90:
    - shard-tglb:         NOTRUN -> [SKIP][59] ([fdo#111615]) +4 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb1/igt@kms_big_fb@yf-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip:
    - shard-kbl:          NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#3777])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl3/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0:
    - shard-apl:          NOTRUN -> [SKIP][61] ([fdo#109271]) +293 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl8/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
    - shard-iclb:         NOTRUN -> [SKIP][62] ([fdo#110723]) +1 similar issue
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb1/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

  * igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][63] ([i915#3689]) +14 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_ccs.html

  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][64] ([fdo#109271] / [i915#3886]) +18 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl3/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
    - shard-glk:          NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#3886]) +4 similar issues
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk2/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html
    - shard-iclb:         NOTRUN -> [SKIP][66] ([fdo#109278] / [i915#3886]) +5 similar issues
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb5/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][67] ([i915#3689] / [i915#3886]) +5 similar issues
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs.html

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

  * igt@kms_ccs@pipe-d-bad-rotation-90-y_tiled_gen12_rc_ccs_cc:
    - shard-iclb:         NOTRUN -> [SKIP][69] ([fdo#109278]) +15 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb6/igt@kms_ccs@pipe-d-bad-rotation-90-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_chamelium@dp-mode-timings:
    - shard-apl:          NOTRUN -> [SKIP][70] ([fdo#109271] / [fdo#111827]) +24 similar issues
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl8/igt@kms_chamelium@dp-mode-timings.html

  * igt@kms_chamelium@hdmi-audio-edid:
    - shard-kbl:          NOTRUN -> [SKIP][71] ([fdo#109271] / [fdo#111827]) +16 similar issues
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl2/igt@kms_chamelium@hdmi-audio-edid.html

  * igt@kms_chamelium@hdmi-mode-timings:
    - shard-snb:          NOTRUN -> [SKIP][72] ([fdo#109271] / [fdo#111827]) +17 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-snb6/igt@kms_chamelium@hdmi-mode-timings.html

  * igt@kms_color_chamelium@pipe-c-ctm-0-5:
    - shard-iclb:         NOTRUN -> [SKIP][73] ([fdo#109284] / [fdo#111827]) +4 similar issues
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb3/igt@kms_color_chamelium@pipe-c-ctm-0-5.html
    - shard-glk:          NOTRUN -> [SKIP][74] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk6/igt@kms_color_chamelium@pipe-c-ctm-0-5.html

  * igt@kms_color_chamelium@pipe-d-ctm-limited-range:
    - shard-tglb:         NOTRUN -> [SKIP][75] ([fdo#109284] / [fdo#111827]) +8 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb3/igt@kms_color_chamelium@pipe-d-ctm-limited-range.html

  * igt@kms_content_protection@atomic:
    - shard-kbl:          NOTRUN -> [TIMEOUT][76] ([i915#1319])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl4/igt@kms_content_protection@atomic.html

  * igt@kms_content_protection@dp-mst-type-0:
    - shard-tglb:         NOTRUN -> [SKIP][77] ([i915#3116]) +1 similar issue
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@kms_content_protection@dp-mst-type-0.html

  * igt@kms_content_protection@legacy:
    - shard-apl:          NOTRUN -> [TIMEOUT][78] ([i915#1319])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl3/igt@kms_content_protection@legacy.html

  * igt@kms_cursor_crc@pipe-a-cursor-32x10-offscreen:
    - shard-tglb:         NOTRUN -> [SKIP][79] ([i915#3359]) +5 similar issues
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb3/igt@kms_cursor_crc@pipe-a-cursor-32x10-offscreen.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x512-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][80] ([fdo#109278] / [fdo#109279]) +2 similar issues
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb4/igt@kms_cursor_crc@pipe-b-cursor-512x512-sliding.html

  * igt@kms_cursor_crc@pipe-c-cursor-32x32-onscreen:
    - shard-tglb:         NOTRUN -> [SKIP][81] ([i915#3319]) +1 similar issue
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb2/igt@kms_cursor_crc@pipe-c-cursor-32x32-onscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x512-random:
    - shard-tglb:         NOTRUN -> [SKIP][82] ([fdo#109279] / [i915#3359]) +4 similar issues
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb1/igt@kms_cursor_crc@pipe-c-cursor-512x512-random.html

  * igt@kms_cursor_crc@pipe-d-cursor-256x256-onscreen:
    - shard-kbl:          NOTRUN -> [SKIP][83] ([fdo#109271]) +191 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl3/igt@kms_cursor_crc@pipe-d-cursor-256x256-onscreen.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - shard-tglb:         NOTRUN -> [SKIP][84] ([i915#4103])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-kbl:          NOTRUN -> [INCOMPLETE][85] ([i915#155] / [i915#180] / [i915#636])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl6/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible:
    - shard-tglb:         NOTRUN -> [SKIP][86] ([fdo#111825]) +37 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb8/igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible.html

  * igt@kms_flip@2x-flip-vs-panning-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][87] ([fdo#109274]) +1 similar issue
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb4/igt@kms_flip@2x-flip-vs-panning-interruptible.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-edp1:
    - shard-tglb:         [PASS][88] -> [INCOMPLETE][89] ([i915#4173] / [i915#456])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-tglb6/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-apl:          [PASS][90] -> [DMESG-WARN][91] ([i915#180]) +1 similar issue
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-apl3/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl8/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
    - shard-tglb:         NOTRUN -> [SKIP][92] ([i915#2587])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile:
    - shard-glk:          [PASS][93] -> [DMESG-FAIL][94] ([i915#118] / [i915#1888] / [i915#95])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-glk5/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk3/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile.html

  * igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-blt:
    - shard-iclb:         NOTRUN -> [SKIP][95] ([fdo#109280]) +20 similar issues
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb2/igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-blt.html

  * igt@kms_hdr@static-toggle-dpms:
    - shard-tglb:         NOTRUN -> [SKIP][96] ([i915#1187])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@kms_hdr@static-toggle-dpms.html

  * igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes:
    - shard-tglb:         NOTRUN -> [SKIP][97] ([fdo#109289]) +1 similar issue
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes.html

  * igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][98] ([fdo#109271] / [i915#533]) +3 similar issues
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl2/igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d.html

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:
    - shard-glk:          NOTRUN -> [SKIP][99] ([fdo#109271] / [i915#533])
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-glk7/igt@kms_pipe_crc_basic@hang-read-crc-pipe-d.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d-frame-sequence:
    - shard-kbl:          NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#533]) +3 similar issues
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl7/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d-frame-sequence.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - shard-tglb:         [PASS][101] -> [INCOMPLETE][102] ([i915#456])
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-tglb3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-tglb:         [PASS][103] -> [INCOMPLETE][104] ([i915#2828] / [i915#456])
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-tglb5/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html

  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:
    - shard-kbl:          [PASS][105] -> [DMESG-WARN][106] ([i915#180]) +4 similar issues
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-kbl3/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][107] ([i915#265]) +1 similar issue
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl2/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-apl:          NOTRUN -> [FAIL][108] ([fdo#108145] / [i915#265]) +3 similar issues
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl6/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html

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

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

  * igt@kms_plane_lowres@pipe-c-tiling-none:
    - shard-iclb:         NOTRUN -> [SKIP][111] ([i915#3536])
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb4/igt@kms_plane_lowres@pipe-c-tiling-none.html
    - shard-tglb:         NOTRUN -> [SKIP][112] ([i915#3536]) +1 similar issue
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb5/igt@kms_plane_lowres@pipe-c-tiling-none.html

  * igt@kms_plane_multiple@atomic-pipe-d-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][113] ([fdo#112054]) +1 similar issue
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb5/igt@kms_plane_multiple@atomic-pipe-d-tiling-yf.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1:
    - shard-tglb:         NOTRUN -> [SKIP][114] ([i915#2920]) +1 similar issue
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb6/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-1.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5:
    - shard-apl:          NOTRUN -> [SKIP][115] ([fdo#109271] / [i915#658]) +6 similar issues
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl3/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5:
    - shard-kbl:          NOTRUN -> [SKIP][116] ([fdo#109271] / [i915#658]) +3 similar issues
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][117] -> [SKIP][118] ([fdo#109441]) +1 similar issue
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6227/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb3/igt@kms_psr@psr2_cursor_render.html

  * igt@kms_psr@psr2_primary_blt:
    - shard-iclb:         NOTRUN -> [SKIP][119] ([fdo#109441])
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb7/igt@kms_psr@psr2_primary_blt.html

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

  * igt@kms_sysfs_edid_timing:
    - shard-kbl:          NOTRUN -> [FAIL][121] ([IGT#2])
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl4/igt@kms_sysfs_edid_timing.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][122] ([i915#180] / [i915#295])
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@kms_vrr@flip-basic:
    - shard-iclb:         NOTRUN -> [SKIP][123] ([fdo#109502])
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb1/igt@kms_vrr@flip-basic.html

  * igt@kms_vrr@flipline:
    - shard-tglb:         NOTRUN -> [SKIP][124] ([fdo#109502])
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb1/igt@kms_vrr@flipline.html

  * igt@kms_writeback@writeback-check-output:
    - shard-tglb:         NOTRUN -> [SKIP][125] ([i915#2437])
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb5/igt@kms_writeback@writeback-check-output.html

  * igt@nouveau_crc@pipe-d-source-outp-inactive:
    - shard-tglb:         NOTRUN -> [SKIP][126] ([i915#2530]) +1 similar issue
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb5/igt@nouveau_crc@pipe-d-source-outp-inactive.html
    - shard-iclb:         NOTRUN -> [SKIP][127] ([fdo#109278] / [i915#2530])
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb1/igt@nouveau_crc@pipe-d-source-outp-inactive.html

  * igt@perf_pmu@event-wait@rcs0:
    - shard-iclb:         NOTRUN -> [SKIP][128] ([fdo#112283])
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb5/igt@perf_pmu@event-wait@rcs0.html

  * igt@prime_nv_api@i915_nv_import_twice_check_flink_name:
    - shard-iclb:         NOTRUN -> [SKIP][129] ([fdo#109291]) +1 similar issue
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-iclb5/igt@prime_nv_api@i915_nv_import_twice_check_flink_name.html

  * igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
    - shard-tglb:         NOTRUN -> [SKIP][130] ([fdo#109291]) +3 similar issues
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-tglb7/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html

  * igt@sysfs_clients@fair-1:
    - shard-apl:          NOTRUN -> [SKIP][131] ([fdo#109271] / [i915#2994]) +1 similar issue
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-apl6/igt@sysfs_clients@fair-1.html
    - shard-kbl:          NOTRUN -> [SKIP][132] ([fdo#109271] / [i915#2994])
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6268/shard-kbl2/igt@sysfs_clients@fair-1.html

  * igt@sysfs_

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 34026 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 18:47 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
  2021-09-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for Return allocated size in gem_create_in_memory_regions() and friends (rev2) Patchwork
  2021-09-28 21:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2021-09-29  5:05 ` Zbigniew Kempczyński
  2 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

* 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-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-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-09-28  6:52 ` 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-09-28  3:11 Ashutosh Dixit
@ 2021-09-28  6:52 ` Zbigniew Kempczyński
  2021-10-02 20:32   ` Dixit, Ashutosh
  0 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] [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  6:52 ` Zbigniew Kempczyński
  0 siblings, 1 reply; 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

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 18:47 [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Ashutosh Dixit
2021-09-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for Return allocated size in gem_create_in_memory_regions() and friends (rev2) Patchwork
2021-09-28 21:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-09-29  5:05 ` [igt-dev] [PATCH i-g-t] Return allocated size in gem_create_in_memory_regions() and friends Zbigniew Kempczyński
  -- strict thread matches above, loose matches on Subject: below --
2021-09-28  3:11 Ashutosh Dixit
2021-09-28  6:52 ` 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

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.