mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
media: atomisp: fix enum_fmt logic
Currently, the enum lists the sensor's native format as a supported format. However, trying to setup a pipeline using it doesn't work. So, exclude such formats from the enum. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
f5f3cedf2b
commit
cc55907585
|
|
@ -775,6 +775,7 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
|
|||
struct v4l2_subdev_mbus_code_enum code = {
|
||||
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
};
|
||||
const struct atomisp_format_bridge *format;
|
||||
struct v4l2_subdev *camera;
|
||||
unsigned int i, fi = 0;
|
||||
int rval;
|
||||
|
|
@ -806,15 +807,15 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
|
|||
return rval;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(atomisp_output_fmts); i++) {
|
||||
const struct atomisp_format_bridge *format =
|
||||
&atomisp_output_fmts[i];
|
||||
format = &atomisp_output_fmts[i];
|
||||
|
||||
/*
|
||||
* Is the atomisp-supported format is valid for the
|
||||
* sensor (configuration)? If not, skip it.
|
||||
*
|
||||
* FIXME: fix the pipeline to allow sensor format too.
|
||||
*/
|
||||
if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW
|
||||
&& format->mbus_code != code.code)
|
||||
if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW)
|
||||
continue;
|
||||
|
||||
/* Found a match. Now let's pick f->index'th one. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user