Skip to content
Snippets Groups Projects
Commit 0a039862 authored by Mattijs Korpershoek's avatar Mattijs Korpershoek
Browse files

HACK: TI: v4l2_codec2: decoder: hard-code 1080p as initial size

In V4L2Decoder::start(), we call setupInputFormat() to configure the initial
decoding resolution.

This is done by passing a default Size() class, which has a size of (-1,-1).

According to [1], when calling VIDIOC_S_FMT, the driver can adapt the requested
format, which is what the wave5 driver does.
By default, the wave5 driver picks up the maximum available resolution:

[ 1047.307387][ T3573] wave5_update_pix_fmt 8192x4320 sizeimage: 53084160

Because of that, the initial buffers are too big and connot be allocated by the kernel:

[ 1047.981455][ T3573] videobuf2_common: [out-00000000d79789f3] __prepare_dmabuf: failed to attach dmabuf
[ 1047.990842][ T3573] videobuf2_common: [out-00000000d79789f3] __buf_prepare: buffer preparation failed: -14

Fix this by using a hard-coding 1080p as an initial input size.

[1] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-g-fmt.html#c.V4L.VIDIOC_S_FMT


Signed-off-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
parent cbe32788
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment