mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
|
From 747d384b2930f8c5a9848d1b3c82a4c20eabcf74 Mon Sep 17 00:00:00 2001
|
||
|
From: Andrey Konovalov <andrey.konovalov@linaro.org>
|
||
|
Date: Fri, 12 Jun 2020 15:53:46 +0200
|
||
|
Subject: [PATCH 263/634] media: i2c: imx290: set the format before
|
||
|
VIDIOC_SUBDEV_G_FMT is called
|
||
|
|
||
|
Commit d46cfdc86c30d5ec768924f0b1e2683c8d20b671 upstream.
|
||
|
|
||
|
With the current driver 'media-ctl -p' issued right after the imx290 driver
|
||
|
is loaded prints:
|
||
|
pad0: Source
|
||
|
[fmt:unknown/0x0]
|
||
|
|
||
|
The format value of zero is due to the current_format field of the imx290
|
||
|
struct not being initialized yet.
|
||
|
|
||
|
As imx290_entity_init_cfg() calls imx290_set_fmt(), the current_mode field
|
||
|
is also initialized, so the line which set current_mode to a default value
|
||
|
in driver's probe() function is no longer needed.
|
||
|
|
||
|
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
|
||
|
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||
|
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||
|
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
||
|
---
|
||
|
drivers/media/i2c/imx290.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
|
||
|
index bf7a6c37ca5d..f6ae24a964d4 100644
|
||
|
--- a/drivers/media/i2c/imx290.c
|
||
|
+++ b/drivers/media/i2c/imx290.c
|
||
|
@@ -1087,6 +1087,9 @@ static int imx290_probe(struct i2c_client *client)
|
||
|
goto free_ctrl;
|
||
|
}
|
||
|
|
||
|
+ /* Initialize the frame format (this also sets imx290->current_mode) */
|
||
|
+ imx290_entity_init_cfg(&imx290->sd, NULL);
|
||
|
+
|
||
|
ret = v4l2_async_register_subdev(&imx290->sd);
|
||
|
if (ret < 0) {
|
||
|
dev_err(dev, "Could not register v4l2 device\n");
|
||
|
--
|
||
|
2.33.1
|
||
|
|