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:
Rob Clark
2022-12-10 12:39:40 -08:00
committed by Marge Bot
parent c196e13e1f
commit db0f273cfb
+1 -2
View File
@@ -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);
}