LinuxTV Patchwork [v2,3/3] media: mt9m111: set initial frame size other than 0x0

login
register
mail settings
Submitter Akinobu Mita
Date Jan. 10, 2019, 3:28 p.m.
Message ID <1547134109-21449-4-git-send-email-akinobu.mita@gmail.com>
Download mbox | patch
Permalink /patch/53852/
State Changes Requested
Delegated to: Sakari Ailus
Headers show

Comments

Akinobu Mita - Jan. 10, 2019, 3:28 p.m.
This driver sets initial frame width and height to 0x0, which is invalid.
So set it to selection rectangle bounds instead.

This is detected by v4l2-compliance detected.

Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Marco Felsch <m.felsch@pengutronix.de>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
* No changes from v1

 drivers/media/i2c/mt9m111.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index e758b4d..c442f80 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -1311,6 +1311,8 @@  static int mt9m111_probe(struct i2c_client *client,
 	mt9m111->rect.top	= MT9M111_MIN_DARK_ROWS;
 	mt9m111->rect.width	= MT9M111_MAX_WIDTH;
 	mt9m111->rect.height	= MT9M111_MAX_HEIGHT;
+	mt9m111->width		= mt9m111->rect.width;
+	mt9m111->height		= mt9m111->rect.height;
 	mt9m111->fmt		= &mt9m111_colour_fmts[0];
 	mt9m111->lastpage	= -1;
 	mutex_init(&mt9m111->power_lock);

Privacy Policy