freedreno/drm: Drop pipe ref to device
The context and screen already holds refs to the device. But since fd_bo_fence holds a ref to the pipe, anyone anywhere leaking a single bo with unwaited fences could cause the device to leak indirectly. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
This commit is contained in:
@@ -53,7 +53,7 @@ fd_pipe_new2(struct fd_device *dev, enum fd_pipe_id id, uint32_t prio)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pipe->dev = fd_device_ref(dev);
|
||||
pipe->dev = dev;
|
||||
pipe->id = id;
|
||||
p_atomic_set(&pipe->refcnt, 1);
|
||||
|
||||
@@ -124,7 +124,6 @@ fd_pipe_del_locked(struct fd_pipe *pipe)
|
||||
return;
|
||||
|
||||
fd_bo_del(pipe->control_mem);
|
||||
fd_device_del(pipe->dev);
|
||||
pipe->funcs->destroy(pipe);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user