]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
media: mt9m111: set initial frame size other than 0x0
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 15 Jan 2019 14:05:41 +0000 (12:05 -0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit 29856308137de1c21eda89411695f4fc6e9780ff ]

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>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/i2c/mt9m111.c

index b1665d97e0fd90acc2b5f52773382a59758b0262..37b6b3cd94abf309cc5f8a0c96aa9af5c256e4ba 100644 (file)
@@ -974,6 +974,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);