summaryrefslogtreecommitdiff
path: root/drivers/media/platform/davinci/vpif_capture.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2017-06-07 02:37:38 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-07 18:15:56 +0300
commit6e3520f2e20262fbf913ffff14f1d345c7b82c25 (patch)
tree6884d6d734ae30dcaa24cc407c8ebfff93d8b6f4 /drivers/media/platform/davinci/vpif_capture.c
parentcc20ba4ed8576abfa10a17e81cb4521f474624f0 (diff)
downloadlinux-6e3520f2e20262fbf913ffff14f1d345c7b82c25.tar.xz
[media] davinci: vpif_capture: drop compliance hack
Capture driver silently overrides pixel format with a hack (according to the comments) to pass v4l2 compliance tests. This isn't needed for normal functionality, and works for composite video and raw camera capture without. In addition, the hack assumes that it only supports raw capture with a single format (SBGGR8) which isn't true. VPIF can also capture 10- and 12-bit raw formats as well. Forthcoming patches will enable VPIF input with raw-camera support and has been tested with 10-bit format from the aptina,mt9v032 sensor. Any compliance failures should be fixed with a real fix. Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/davinci/vpif_capture.c')
-rw-r--r--drivers/media/platform/davinci/vpif_capture.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index 128e92d1dd5a..fc5c7622660c 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -936,21 +936,6 @@ static int vpif_try_fmt_vid_cap(struct file *file, void *priv,
struct channel_obj *ch = video_get_drvdata(vdev);
struct v4l2_pix_format *pixfmt = &fmt->fmt.pix;
struct common_obj *common = &(ch->common[VPIF_VIDEO_INDEX]);
- struct vpif_params *vpif_params = &ch->vpifparams;
-
- /*
- * to supress v4l-compliance warnings silently correct
- * the pixelformat
- */
- if (vpif_params->iface.if_type == VPIF_IF_RAW_BAYER) {
- if (pixfmt->pixelformat != V4L2_PIX_FMT_SBGGR8)
- pixfmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
- } else {
- if (pixfmt->pixelformat != V4L2_PIX_FMT_NV16)
- pixfmt->pixelformat = V4L2_PIX_FMT_NV16;
- }
-
- common->fmt.fmt.pix.pixelformat = pixfmt->pixelformat;
vpif_update_std_info(ch);