radeon/vce: move destroy command before feedback command

VCE processing IBs starts from session and task info at first level,
other commands processed subsequently. The task info for destroy is
embedded to destroy command, resulting that feedback command is not
properly procoessed. This is causing kernel spin VM fault messages on
Polaris and Vega10 card when running ends at encode application.

The fix is also verified on VCE physical mode card.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Leo Liu 2017-12-07 12:04:59 -05:00
parent 060eb314eb
commit 6d74cb2570

View file

@ -246,8 +246,8 @@ static void rvce_destroy(struct pipe_video_codec *encoder)
si_vid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING);
enc->fb = &fb;
enc->session(enc);
enc->feedback(enc);
enc->destroy(enc);
enc->feedback(enc);
flush(enc);
si_vid_destroy_buffer(&fb);
}