diff options
author | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2021-09-28 11:47:05 -0700 |
---|---|---|
committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2021-09-29 08:13:49 -0700 |
commit | 22643ce4014a0b2dc52ce7916b2f657e2a7757c3 (patch) | |
tree | 18766ccd6af6d4b3d095419d375b01066aec0584 /tests/kms_addfb_basic.c | |
parent | 6ac2da7fd6b13f04f9aa0ec10f86b831d2756946 (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_addfb_basic.c')
-rw-r--r-- | tests/kms_addfb_basic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c index 55f4852da..62fa78a5d 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); } |