summaryrefslogtreecommitdiff
path: root/tests/kms_prime.c
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2021-09-28 11:47:05 -0700
committerAshutosh Dixit <ashutosh.dixit@intel.com>2021-09-29 08:13:49 -0700
commit22643ce4014a0b2dc52ce7916b2f657e2a7757c3 (patch)
tree18766ccd6af6d4b3d095419d375b01066aec0584 /tests/kms_prime.c
parent6ac2da7fd6b13f04f9aa0ec10f86b831d2756946 (diff)
Return allocated size in gem_create_in_memory_regions() and friends
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> Reviewed-by: Zbigniew KempczyƄski <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/kms_prime.c')
-rw-r--r--tests/kms_prime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 5cdb5597..ea459414 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,