st/va: force to flush the last p frame in idr period
authorBoyuan Zhang <boyuan.zhang@amd.com>
Mon, 17 Oct 2016 20:11:48 +0000 (16:11 -0400)
committerLeo Liu <leo.liu@amd.com>
Tue, 18 Oct 2016 19:16:34 +0000 (15:16 -0400)
commit5567145d59d5d539474fb68155dba4dec716e32e
treee9c46dbc329cbd0c55ae6506fc01fb7892db4001
parent52a6483e8a016f3dec7db8634a85b9fa62e86693
st/va: force to flush the last p frame in idr period

During dual instance encoding submission, if the second encode task and first
encode task have no reference dependency, e.g. p following with idr-frame,
there is a chance the second task will use for its reconstructed picture
buffer the same buffer used by first task for its reference/reconstructed
picture. In this case, buffer corruption may occur depending on encoding
speed. Fix is to force flush these two tasks separately to avoid race condition

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98005
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/picture.c