Skip to content

Commit 22f5200

Browse files
committed
cros_gralloc: Add name to reserved buffer
Change-Id: If76a87d50cf430d5480ddc92925613daa5ac36ea Signed-off-by: Roman Stratiienko <[email protected]> For reviews, comments, suggestions and questions visit: #10
1 parent d4d0649 commit 22f5200

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cros_gralloc/cros_gralloc_driver.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,10 @@ int cros_gralloc_driver::create_reserved_region(const std::string &buffer_name,
249249

250250
#if ANDROID_API_LEVEL >= 31 && defined(HAS_DMABUF_SYSTEM_HEAP)
251251
ret = allocator_.Alloc(kDmabufSystemHeapName, reserved_region_size);
252-
if (ret >= 0)
252+
if (ret >= 0) {
253+
ioctl(ret, DMA_BUF_SET_NAME, "gralloc-meta");
253254
return ret;
255+
}
254256
#endif
255257

256258
ret = memfd_create_reserved_region(buffer_name, reserved_region_size);

0 commit comments

Comments
 (0)