mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
radeonsi/vcn: check fence before destroying decoder
Add a fence_wait before destroying decoder to make sure destory message has been processed by firmware. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20805>
This commit is contained in:
parent
843bdd2262
commit
357340953a
2 changed files with 3 additions and 1 deletions
|
|
@ -2737,7 +2737,8 @@ static void radeon_dec_destroy(struct pipe_video_codec *decoder)
|
|||
map_msg_fb_it_probs_buf(dec);
|
||||
rvcn_dec_message_destroy(dec);
|
||||
send_msg_buf(dec);
|
||||
flush(dec, 0, NULL);
|
||||
flush(dec, 0, &dec->destroy_fence);
|
||||
dec->ws->fence_wait(dec->ws, dec->destroy_fence, PIPE_DEFAULT_DECODER_FEEDBACK_TIMEOUT_NS);
|
||||
}
|
||||
|
||||
dec->ws->cs_destroy(&dec->cs);
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ struct radeon_decoder {
|
|||
unsigned cb_idx;
|
||||
unsigned njctx;
|
||||
struct pipe_fence_handle *prev_fence;
|
||||
struct pipe_fence_handle *destroy_fence;
|
||||
};
|
||||
|
||||
void send_cmd_dec(struct radeon_decoder *dec, struct pipe_video_buffer *target,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue