Commit e18976ee authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

media: rcar-vin: Limit NV12 availability to supported VIN channels only

When adding support for NV12 it was overlooked that the pixel format is
only supported on some VIN channels. Fix this by adding a check to only
accept NV12 on the supported channels 0, 1, 4, 5, 8, 9, 12 and 13.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 9ac560d4
...@@ -79,7 +79,11 @@ const struct rvin_video_format *rvin_format_from_pixel(struct rvin_dev *vin, ...@@ -79,7 +79,11 @@ const struct rvin_video_format *rvin_format_from_pixel(struct rvin_dev *vin,
return NULL; return NULL;
break; break;
case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV12:
if (!vin->info->nv12) /*
* If NV12 is supported it's only supported on channels 0, 1, 4,
* 5, 8, 9, 12 and 13.
*/
if (!vin->info->nv12 || !(BIT(vin->id) & 0x3333))
return NULL; return NULL;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment