media/gpu/v4l2: fix EBUSY error when changing resolution
When changing the resolution while decoding and using video decoder, VIDIOC_S_FMT on the output buffer will return EBUSY. Before changing the output buffer format, the capture buffer must be destroyed. This patch, moves the capture buffer destruction before changing the output buffer's format as per specification [1]. [1] https://hverkuil.home.xs4all.nl/codec-api/uapi/v4l/dev-stateless-decoder.html#dynamic-resolution-change BUG=b:142828922 TEST=ran tast with video.DecodeAccelVDVP8ResolutionSwitch on veyron_minnie-kernelnext. TEST=ran tast with video.DecodeAccelVDH264ResolutionSwitch on veyron_minnie-kernelnext. TEST=ran tast with video.DecodeAccelVDVP8 on veyron_minnie-kernelnext. TEST=ran tast with video.DecodeAccelVDH264 on veyron_minnie-kernelnext. Signed-off-by:Francois Buergisser <fbuergisser@chromium.org> Change-Id: I304cd4b7e52d95bec4dcf4bcb803439c6f8cf273 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868574 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by:
Alexandre Courbot <acourbot@chromium.org> Cr-Commit-Position: refs/heads/master@{#707393}
Showing
Please register or sign in to comment