]> asedeno.scripts.mit.edu Git - linux.git/commit
media: vim2m: fix driver for it to handle different fourcc formats
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 29 Jan 2019 16:00:15 +0000 (14:00 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 31 Jan 2019 19:14:14 +0000 (17:14 -0200)
commit8aa153f103f10807941bd95dda95071380609e05
tree7ee507b2f26fa2582b06b72d3687075def56d7d2
parent560c053deb94ff65b22a87f28e8e2fab5940555c
media: vim2m: fix driver for it to handle different fourcc formats

Despite vim2m is reporting that it supports RGB565BE and YUYV,
that's not true.

Right now, it just says that it supports both format, but it
doesn't actually support them.

Also, horizontal flip is not properly implemented. It sounds
that it was designed to do a pseudo-horizontal flip using 8
tiles. Yet, as it doesn't do format conversion, the result
is a mess.

I suspect that it was done this way in order to save CPU time,
at the time of OMAP2 days.

That's messy and doesn't really help if someone wants to
use vim2m to test a pipeline.

Worse than that, the unique RGB format it says it supports is
RGB565BE, with is not supported by Gstreamer. That prevents
practical usage of it, even for tests.

So, instead, properly implement fourcc format conversions,
adding a few more RGB formats:

- RGB and BGR with 24 bits
- RGB565LE (known as RGB16 at gstreamer)

Also allows using any of the 5 supported formats as either
capture or output.

Note: The YUYV conversion routines are based on the conversion code
written by Hans de Goede inside libv4lconvert (part of v4l-utils),
released under LGPGL 2.1 (GPL 2.0 compatible).

Tested all possible format combinations except for RGB565BE,
as Gstreamer currently doesn't support it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vim2m.c