[Wayland-bugs] [Bug 100298] weston dmabuf fd leak
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Mar 21 09:35:35 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=100298
Bug ID: 100298
Summary: weston dmabuf fd leak
Product: Wayland
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: weston
Assignee: wayland-bugs at lists.freedesktop.org
Reporter: lby at rock-chips.com
I add a gstwaylandsink use dmabuf, weston come up dmabuf fd leak.
lr-x------ 1 root root 64 Jan 18 09:08 340 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 341 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 342 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 343 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 344 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 345 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 346 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 347 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 348 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 349 ->
anon_inode:dmabuf
lrwx------ 1 root root 64 Jan 18 09:08 35 -> socket:[2817]
lr-x------ 1 root root 64 Jan 18 09:08 350 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 351 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 352 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 353 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 354 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 355 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 356 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 357 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 358 ->
anon_inode:dmabuf
lr-x------ 1 root root 64 Jan 18 09:08 359 ->
anon_inode:dmabuf
.......
static void
create_dmabuf_buffer(struct display *display, struct buffer *buffer)
{
struct zwp_linux_buffer_params_v1 *params;
uint64_t modifier;
uint32_t flags;
unsigned i;
modifier = 0;
flags = 0;
/* XXX: apparently some webcams may actually provide y-inverted images,
* in which case we should set
* flags = ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT
*/
params = zwp_linux_dmabuf_v1_create_params(display->dmabuf);
for (i = 0; i < display->format.num_planes; ++i)
zwp_linux_buffer_params_v1_add(params,
buffer->dmabuf_fds[i],
i, /* plane_idx */
buffer->data_offsets[i], /*
offset */
display->format.strides[i],
modifier >> 32,
modifier & 0xffffffff);
zwp_linux_buffer_params_v1_add_listener(params, ¶ms_listener,
buffer);
zwp_linux_buffer_params_v1_create(params,
display->format.width,
display->format.height,
display->drm_format,
flags);
}
static void
create_succeeded(void *data,
struct zwp_linux_buffer_params_v1 *params,
struct wl_buffer *new_buffer)
{
struct buffer *buffer = data;
unsigned i;
buffer->buffer = new_buffer;
wl_buffer_add_listener(buffer->buffer, &buffer_listener, buffer);
zwp_linux_buffer_params_v1_destroy(params);
}
Beacause buffer->dmabuf_fds[i](variational) get form vpudec,I need call
"create_dmabuf_buffer" constantly when show frames.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20170321/fd48cbaf/attachment.html>
More information about the wayland-bugs
mailing list