We need to have same size when intel_buf is initialized over fb
(with compression) because allocator could be called with smaller
size what could lead to relocation.
Use new intel_buf function which allows initialize with handle and size.
Signed-off-by: Zbigniew Kempczyński <redacted>
Cc: Dominik Grzegorzek <redacted>
Cc: Chris Wilson <redacted>
---
lib/igt_fb.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index f0fcd1a7f..259449d60 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2197,11 +2197,11 @@ igt_fb_create_intel_buf(int fd, struct buf_ops *bops,
bo_name = gem_flink(fd, fb->gem_handle);
handle = gem_open(fd, bo_name);
- buf = intel_buf_create_using_handle(bops, handle,
- fb->width, fb->height,
- fb->plane_bpp[0], 0,
- igt_fb_mod_to_tiling(fb->modifier),
- compression);
+ buf = intel_buf_create_using_handle_and_size(bops, handle,
+ fb->width, fb->height,
+ fb->plane_bpp[0], 0,
+ igt_fb_mod_to_tiling(fb->modifier),
+ compression, fb->size);
intel_buf_set_name(buf, name);
/* Make sure we close handle on destroy path */
--
2.26.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev