<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - weston dmabuf fd leak"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100298">100298</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>weston dmabuf fd leak
</td>
</tr>
<tr>
<th>Product</th>
<td>Wayland
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>weston
</td>
</tr>
<tr>
<th>Assignee</th>
<td>wayland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lby@rock-chips.com
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>