OSDN Git Service

media: ipu3-cio2: Validate mbus format in setting subdev format
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 8 Oct 2020 19:33:26 +0000 (21:33 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:14 +0000 (10:31 +0100)
commita86cf9b29e8b12811cf53c4970eefe0c1d290476
tree86243ba02a86b5f3c7a2618f94e76378342b0b56
parent55a6c6b2be3d6670bf5772364d8208bd8dc17da4
media: ipu3-cio2: Validate mbus format in setting subdev format

Validate media bus code, width and height when setting the subdev format.

This effectively reworks how setting subdev format is implemented in the
driver.

Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org # v4.16 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/intel/ipu3/ipu3-cio2.c