radeonsi/vcn: Add decode DPB buffers as CS dependency

This is needed to ensure correct synchronization in kernel eg. when it
moves the buffers between VRAM and GTT.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
(cherry picked from commit 0c024bbe64)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30537>
This commit is contained in:
David Rosca 2024-08-05 09:14:37 +02:00 committed by Eric Engestrom
parent 41fcf9bfea
commit c1a46271bc
2 changed files with 2 additions and 1 deletions

View file

@ -3684,7 +3684,7 @@
"description": "radeonsi/vcn: Add decode DPB buffers as CS dependency",
"nominated": false,
"nomination_type": 3,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1838,6 +1838,7 @@ static unsigned rvcn_dec_dynamic_dpb_t2_message(struct radeon_decoder *dec, rvcn
RVID_ERR("Ref list from application is incorrect, using dummy buffer instead.\n");
addr = dec->ws->buffer_get_virtual_address(dummy->dpb.res->buf);
}
dec->ws->cs_add_buffer(&dec->cs, d->dpb.res->buf, RADEON_USAGE_READWRITE | RADEON_USAGE_SYNCHRONIZED, RADEON_DOMAIN_VRAM);
dynamic_dpb_t2->dpbAddrLo[i] = addr;
dynamic_dpb_t2->dpbAddrHi[i] = addr >> 32;
++dynamic_dpb_t2->dpbArraySize;