]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration
authorPawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>
Sat, 29 Dec 2018 15:46:01 +0000 (10:46 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit42abc8a767693a02e5d79123ac88e0cb06c1fea2
treed0d7cb08ecc29114f79e9a7ec37a53701f28a394
parent471f4208d8193ed7b5d8601fbc55d3e851323512
media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit 49710c32cd9d6626a77c9f5f978a5f58cb536b35 ]

Previously when doing format enumeration, it was returning all
 formats supported by driver, even if they're not supported by hw.
Add missing check for fmt_ver_flag, so it'll be fixed and only those
 supported by hw will be returned. Similar thing is already done
 in s5p_jpeg_find_format.

It was found by using v4l2-compliance tool and checking result
 of VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS test
and using v4l2-ctl to get list of all supported formats.

Tested on s5pv210-galaxys (Samsung i9000 phone).

Fixes: bb677f3ac434 ("[media] Exynos4 JPEG codec v4l2 driver")
Signed-off-by: Pawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>
Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
[hverkuil-cisco@xs4all.nl: fix a few alignment issues]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c