]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/media-mt9m111-set-initial-frame-size-other-than-0x0.patch
1873a0361c14f11b0ec807125488a5815fa368ff
[thirdparty/kernel/stable-queue.git] / queue-4.19 / media-mt9m111-set-initial-frame-size-other-than-0x0.patch
1 From 6622a78a6f6d429206078a851e5cdbcabf175513 Mon Sep 17 00:00:00 2001
2 From: Akinobu Mita <akinobu.mita@gmail.com>
3 Date: Tue, 15 Jan 2019 12:05:41 -0200
4 Subject: media: mt9m111: set initial frame size other than 0x0
5
6 [ Upstream commit 29856308137de1c21eda89411695f4fc6e9780ff ]
7
8 This driver sets initial frame width and height to 0x0, which is invalid.
9 So set it to selection rectangle bounds instead.
10
11 This is detected by v4l2-compliance detected.
12
13 Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
14 Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
15 Cc: Marco Felsch <m.felsch@pengutronix.de>
16 Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
17 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
18 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 drivers/media/i2c/mt9m111.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24 diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
25 index efda1aa95ca0..7a7d3969af20 100644
26 --- a/drivers/media/i2c/mt9m111.c
27 +++ b/drivers/media/i2c/mt9m111.c
28 @@ -1014,6 +1014,8 @@ static int mt9m111_probe(struct i2c_client *client,
29 mt9m111->rect.top = MT9M111_MIN_DARK_ROWS;
30 mt9m111->rect.width = MT9M111_MAX_WIDTH;
31 mt9m111->rect.height = MT9M111_MAX_HEIGHT;
32 + mt9m111->width = mt9m111->rect.width;
33 + mt9m111->height = mt9m111->rect.height;
34 mt9m111->fmt = &mt9m111_colour_fmts[0];
35 mt9m111->lastpage = -1;
36 mutex_init(&mt9m111->power_lock);
37 --
38 2.19.1
39