mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
freedreno/drm: pipe should hold reference to device
A more direct solution would be for bo's to have a reference to the device. But bo's are ref/unrefd more frequently. This avoids async submits unrefing a bo after the device handle- table is freed. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>
This commit is contained in:
parent
ad9654a4c1
commit
2c9e8db28d
1 changed files with 2 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ fd_pipe_new2(struct fd_device *dev, enum fd_pipe_id id, uint32_t prio)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
pipe->dev = dev;
|
||||
pipe->dev = fd_device_ref(dev);
|
||||
pipe->id = id;
|
||||
p_atomic_set(&pipe->refcnt, 1);
|
||||
|
||||
|
|
@ -114,6 +114,7 @@ fd_pipe_del_locked(struct fd_pipe *pipe)
|
|||
if (!p_atomic_dec_zero(&pipe->refcnt))
|
||||
return;
|
||||
fd_bo_del_locked(pipe->control_mem);
|
||||
fd_device_del_locked(pipe->dev);
|
||||
pipe->funcs->destroy(pipe);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue