freedreno/drm: Fix teardown crash harder

We need to unref the device *after* submit cleanup, so that
fd_submit_sp_destory() can still reference the device.

Fixes: d558cb664a ("freedreno/drm: Submit should hold ref to device")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27445>
This commit is contained in:
Rob Clark
2024-02-02 11:28:20 -08:00
committed by Marge Bot
parent 60413e11c2
commit 1d5dbde522

View File

@@ -49,10 +49,13 @@ fd_submit_del(struct fd_submit *submit)
if (submit->primary)
fd_ringbuffer_del(submit->primary);
fd_pipe_del(submit->pipe);
fd_device_del(submit->dev);
struct fd_pipe *pipe = submit->pipe;
struct fd_device *dev = submit->dev;
submit->funcs->destroy(submit);
fd_pipe_del(pipe);
fd_device_del(dev);
}
struct fd_submit *