[git:media_stage/master] media: remove the old videobuf framework

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: remove the old videobuf framework
Author:  Hans Verkuil 
Date:Sun Aug 13 10:22:54 2023 +0200

The last driver that still used this old framework has been converted
to the videobuf2 framework. So it is now time to delete the old videobuf
code.

Signed-off-by: Hans Verkuil 
Reviewed-by: Hans de Goede 

 Documentation/driver-api/media/v4l2-core.rst   |1 -
 Documentation/driver-api/media/v4l2-dev.rst|8 -
 Documentation/driver-api/media/v4l2-videobuf.rst   |  403 ---
 .../zh_CN/video4linux/v4l2-framework.txt   |   12 -
 drivers/media/v4l2-core/Kconfig|   16 -
 drivers/media/v4l2-core/Makefile   |5 -
 drivers/media/v4l2-core/videobuf-core.c| 1198 
 drivers/media/v4l2-core/videobuf-dma-contig.c  |  402 ---
 drivers/media/v4l2-core/videobuf-dma-sg.c  |  681 ---
 drivers/media/v4l2-core/videobuf-vmalloc.c |  326 --
 include/media/videobuf-core.h  |  233 
 include/media/videobuf-dma-contig.h|   30 -
 include/media/videobuf-dma-sg.h|  102 --
 include/media/videobuf-vmalloc.h   |   43 -
 14 files changed, 3460 deletions(-)

---

diff --git a/Documentation/driver-api/media/v4l2-core.rst 
b/Documentation/driver-api/media/v4l2-core.rst
index 239045ecc8f4..58cba831ade5 100644
--- a/Documentation/driver-api/media/v4l2-core.rst
+++ b/Documentation/driver-api/media/v4l2-core.rst
@@ -13,7 +13,6 @@ Video4Linux devices
 v4l2-subdev
 v4l2-event
 v4l2-controls
-v4l2-videobuf
 v4l2-videobuf2
 v4l2-dv-timings
 v4l2-flash-led-class
diff --git a/Documentation/driver-api/media/v4l2-dev.rst 
b/Documentation/driver-api/media/v4l2-dev.rst
index 99e3b5fa7444..d5cb19b21a9f 100644
--- a/Documentation/driver-api/media/v4l2-dev.rst
+++ b/Documentation/driver-api/media/v4l2-dev.rst
@@ -157,14 +157,6 @@ changing the e.g. exposure of the webcam.
 Of course, you can always do all the locking yourself by leaving both lock
 pointers at ``NULL``.
 
-If you use the old :ref:`videobuf framework ` then you must
-pass the :c:type:`video_device`->lock to the videobuf queue initialize
-function: if videobuf has to wait for a frame to arrive, then it will
-temporarily unlock the lock and relock it afterwards. If your driver also
-waits in the code, then you should do the same to allow other
-processes to access the device node while the first process is waiting for
-something.
-
 In the case of :ref:`videobuf2 ` you will need to implement the
 ``wait_prepare()`` and ``wait_finish()`` callbacks to unlock/lock if 
applicable.
 If you use the ``queue->lock`` pointer, then you can use the helper functions
diff --git a/Documentation/driver-api/media/v4l2-videobuf.rst 
b/Documentation/driver-api/media/v4l2-videobuf.rst
deleted file mode 100644
index 4b1d84eefeb8..
diff --git a/Documentation/translations/zh_CN/video4linux/v4l2-framework.txt 
b/Documentation/translations/zh_CN/video4linux/v4l2-framework.txt
index a88fcbc11eca..9cc97ec75d7a 100644
--- a/Documentation/translations/zh_CN/video4linux/v4l2-framework.txt
+++ b/Documentation/translations/zh_CN/video4linux/v4l2-framework.txt
@@ -768,18 +768,6 @@ const char *video_device_node_name(struct video_device 
*vdev);
 此功能,而非访问 video_device::num 和 video_device::minor 域。
 
 
-视频缓冲辅助函数

-
-v4l2 核心 API 提供了一个处理视频缓冲的æ 
‡å‡†æ–¹æ³•(称为“videobuf”)。
-这些方法使驱动可以通过统一的方式实现 read()、mmap() 和 
overlay()。
-目前在设备上支持视频缓冲的方法有分散/聚集 
DMA(videobuf-dma-sg)、
-线性 DMA(videobuf-dma-contig)以及大多用于 USB 设备的用 vmalloc
-分配的缓冲(videobuf-vmalloc)。
-
-请参阅 Documentation/driver-api/media/v4l2-videobuf.rst,以获得更多å…
³äºŽ videobuf
-层的使用信息。
-
 v4l2_fh 结构体
 -
 
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
index f77ebd688cde..331b8e535e5b 100644
--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
@@ -82,19 +82,3 @@ config V4L2_CCI_I2C
depends on I2C
select REGMAP_I2C
select V4L2_CCI
-
-# Used by drivers that need Videobuf modules
-config VIDEOBUF_GEN
-   tristate
-
-config VIDEOBUF_DMA_SG
-   tristate
-   select VIDEOBUF_GEN
-
-config VIDEOBUF_VMALLOC
-   tristate
-   select VIDEOBUF_GEN
-
-config VIDEOBUF_DMA_CONTIG
-   tristate
-   select VIDEOBUF_GEN
diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile
index be2551705755..2177b9d63a8f 100644
--- a/drivers/media/v4l2-core/Makefile
+++ b/drivers/media/v4l2-core/Makefile
@@ -33,10 +33,5 @@ obj-$(CONFIG_V4L2_JPEG_HELPER) += v4l2-jpeg.o
 

[git:media_stage/master] media: atomisp: remove left-over videobuf include

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: atomisp: remove left-over videobuf include
Author:  Hans Verkuil 
Date:Sun Aug 13 10:20:49 2023 +0200

This source still included the media/videobuf-vmalloc.h
header, even though it is no longer used.

Since the old videobuf framework is about to be removed,
delete this include first.

Signed-off-by: Hans Verkuil 
Reviewed-by: Hans de Goede 

 drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 1 -
 1 file changed, 1 deletion(-)

---

diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c 
b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
index b97ec85aa0ba..0c02f41e1a1f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
@@ -16,7 +16,6 @@
  *
  */
 
-#include 
 #include 
 #include 
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: video-i2c: Convert enum->pointer for data in the match tables

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: video-i2c: Convert enum->pointer for data in the match 
tables
Author:  Biju Das 
Date:Sun Aug 20 08:58:46 2023 +0100

Convert enum->pointer for data in the match tables, so that
device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c
bus type match support added to it.

Replace enum->struct *video_i2c_chip for data in the match table. Simplify
the probe() by replacing device_get_match_data() and ID lookup for
retrieving data by i2c_get_match_data().

Signed-off-by: Biju Das 
Reviewed-by: Andy Shevchenko 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/video-i2c.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

---

diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index 537ebd9fa8d7..178bd06cc2ed 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -759,7 +759,6 @@ static void video_i2c_release(struct video_device *vdev)
 
 static int video_i2c_probe(struct i2c_client *client)
 {
-   const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct video_i2c_data *data;
struct v4l2_device *v4l2_dev;
struct vb2_queue *queue;
@@ -769,11 +768,8 @@ static int video_i2c_probe(struct i2c_client *client)
if (!data)
return -ENOMEM;
 
-   if (dev_fwnode(>dev))
-   data->chip = device_get_match_data(>dev);
-   else if (id)
-   data->chip = _i2c_chip[id->driver_data];
-   else
+   data->chip = i2c_get_match_data(client);
+   if (!data->chip)
goto error_free_device;
 
data->regmap = regmap_init_i2c(client, data->chip->regmap_config);
@@ -940,8 +936,8 @@ static const struct dev_pm_ops video_i2c_pm_ops = {
 };
 
 static const struct i2c_device_id video_i2c_id_table[] = {
-   { "amg88xx", AMG88XX },
-   { "mlx90640", MLX90640 },
+   { "amg88xx", (kernel_ulong_t)_i2c_chip[AMG88XX] },
+   { "mlx90640", (kernel_ulong_t)_i2c_chip[MLX90640] },
{}
 };
 MODULE_DEVICE_TABLE(i2c, video_i2c_id_table);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx319: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx319: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:15 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx319.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/imx319.c b/drivers/media/i2c/imx319.c
index 52ebb096e107..935bcbacd62e 100644
--- a/drivers/media/i2c/imx319.c
+++ b/drivers/media/i2c/imx319.c
@@ -2166,10 +2166,6 @@ static int imx319_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (imx319->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov7670: Extend match support for OF tables

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov7670: Extend match support for OF tables
Author:  Biju Das 
Date:Sun Sep 10 16:00:32 2023 +0100

The driver has an OF match table, still, it uses an ID lookup table for
retrieving match data. Currently, the driver is working on the
assumption that an I2C device registered via OF will always match a
legacy I2C device ID. The correct approach is to have an OF device ID
table using i2c_get_match_data() if the devices are registered via OF/ID.

Unify the OF/ID table by using struct ov7670_devtype as match data for
both these tables and replace the ID lookup table for the match data by
i2c_get_match_data().

Split the array ov7670_devdata[] as individual variables, and
make lines shorter by referring to e.g. _devdata instead of
_devdata[MODEL_OV7670].

Drop enum ov7670_model as there is no user.

While at it, remove the trailing comma in the terminator entry for the OF
table making code robust against (theoretical) misrebases or other similar
things where the new entry goes _after_ the termination without the
compiler noticing.

Signed-off-by: Biju Das 
Reviewed-by: Kieran Bingham 
Reviewed-by: Jacopo Mondi 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov7670.c | 47 --
 1 file changed, 20 insertions(+), 27 deletions(-)

---

diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 85bf745c0bad..b70d65f5c18a 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -186,11 +186,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
 #define REG_HAECC7 0xaa/* Hist AEC/AGC control 7 */
 #define REG_BD60MAX0xab/* 60hz banding step limit */
 
-enum ov7670_model {
-   MODEL_OV7670 = 0,
-   MODEL_OV7675,
-};
-
 struct ov7670_win_size {
int width;
int height;
@@ -1758,21 +1753,6 @@ static const struct v4l2_subdev_internal_ops 
ov7670_subdev_internal_ops = {
 
 /* --- */
 
-static const struct ov7670_devtype ov7670_devdata[] = {
-   [MODEL_OV7670] = {
-   .win_sizes = ov7670_win_sizes,
-   .n_win_sizes = ARRAY_SIZE(ov7670_win_sizes),
-   .set_framerate = ov7670_set_framerate_legacy,
-   .get_framerate = ov7670_get_framerate_legacy,
-   },
-   [MODEL_OV7675] = {
-   .win_sizes = ov7675_win_sizes,
-   .n_win_sizes = ARRAY_SIZE(ov7675_win_sizes),
-   .set_framerate = ov7675_set_framerate,
-   .get_framerate = ov7675_get_framerate,
-   },
-};
-
 static int ov7670_init_gpio(struct i2c_client *client, struct ov7670_info 
*info)
 {
info->pwdn_gpio = devm_gpiod_get_optional(>dev, "powerdown",
@@ -1833,7 +1813,6 @@ static int ov7670_parse_dt(struct device *dev,
 
 static int ov7670_probe(struct i2c_client *client)
 {
-   const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct v4l2_fract tpf;
struct v4l2_subdev *sd;
struct ov7670_info *info;
@@ -1905,7 +1884,7 @@ static int ov7670_probe(struct i2c_client *client)
v4l_info(client, "chip found @ 0x%02x (%s)\n",
client->addr << 1, client->adapter->name);
 
-   info->devtype = _devdata[id->driver_data];
+   info->devtype = i2c_get_match_data(client);
info->fmt = _formats[0];
info->wsize = >devtype->win_sizes[0];
 
@@ -1993,17 +1972,31 @@ static void ov7670_remove(struct i2c_client *client)
media_entity_cleanup(>sd.entity);
 }
 
+static const struct ov7670_devtype ov7670_devdata = {
+   .win_sizes = ov7670_win_sizes,
+   .n_win_sizes = ARRAY_SIZE(ov7670_win_sizes),
+   .set_framerate = ov7670_set_framerate_legacy,
+   .get_framerate = ov7670_get_framerate_legacy,
+};
+
+static const struct ov7670_devtype ov7675_devdata = {
+   .win_sizes = ov7675_win_sizes,
+   .n_win_sizes = ARRAY_SIZE(ov7675_win_sizes),
+   .set_framerate = ov7675_set_framerate,
+   .get_framerate = ov7675_get_framerate,
+};
+
 static const struct i2c_device_id ov7670_id[] = {
-   { "ov7670", MODEL_OV7670 },
-   { "ov7675", MODEL_OV7675 },
-   { }
+   { "ov7670", (kernel_ulong_t)_devdata },
+   { "ov7675", (kernel_ulong_t)_devdata },
+   { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, ov7670_id);
 
 #if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id ov7670_of_match[] = {
-   { .compatible = "ovti,ov7670", },
-   { /* sentinel */ },
+   { .compatible = "ovti,ov7670", _devdata },
+   { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, ov7670_of_match);
 #endif

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx412: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx412: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:19 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx412.c | 9 -
 1 file changed, 9 deletions(-)

---

diff --git a/drivers/media/i2c/imx412.c b/drivers/media/i2c/imx412.c
index c7e862ae4040..962b3136c31e 100644
--- a/drivers/media/i2c/imx412.c
+++ b/drivers/media/i2c/imx412.c
@@ -127,7 +127,6 @@ static const char * const imx412_supply_names[] = {
  * @vblank: Vertical blanking in lines
  * @cur_mode: Pointer to current selected sensor mode
  * @mutex: Mutex for serializing sensor controls
- * @streaming: Flag indicating streaming state
  */
 struct imx412 {
struct device *dev;
@@ -149,7 +148,6 @@ struct imx412 {
u32 vblank;
const struct imx412_mode *cur_mode;
struct mutex mutex;
-   bool streaming;
 };
 
 static const s64 link_freq[] = {
@@ -857,11 +855,6 @@ static int imx412_set_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
 
-   if (imx412->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
-
if (enable) {
ret = pm_runtime_resume_and_get(imx412->dev);
if (ret)
@@ -875,8 +868,6 @@ static int imx412_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(imx412->dev);
}
 
-   imx412->streaming = enable;
-
mutex_unlock(>mutex);
 
return 0;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: Use pm_runtime_resume_and_get()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: Use pm_runtime_resume_and_get()
Author:  Laurent Pinchart 
Date:Thu Sep 14 20:20:54 2023 +0300

Simplify error handling by using pm_runtime_resume_and_get() instead of
pm_runtime_get_sync() with a put call in the error path.

Signed-off-by: Laurent Pinchart 
Acked-by: Benjamin Mugnier  (st-vgxy61)
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ccs/ccs-core.c |  6 +++---
 drivers/media/i2c/hi846.c|  6 ++
 drivers/media/i2c/hi847.c|  5 ++---
 drivers/media/i2c/imx208.c   | 14 +++---
 drivers/media/i2c/og01a1b.c  |  5 ++---
 drivers/media/i2c/ov5693.c   |  6 +++---
 drivers/media/i2c/ov7251.c   |  8 +---
 drivers/media/i2c/st-vgxy61.c|  9 ++---
 8 files changed, 26 insertions(+), 33 deletions(-)

---

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 49e0d9a09530..569bf9b67539 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -1893,9 +1893,9 @@ static int ccs_pm_get_init(struct ccs_sensor *sensor)
 * relies at the returned value to detect if the device was already
 * active or not.
 */
-   rval = pm_runtime_get_sync(>dev);
-   if (rval < 0)
-   goto error;
+   rval = pm_runtime_resume_and_get(>dev);
+   if (rval)
+   return rval;
 
/* Device was already active, so don't set controls */
if (rval == 1)
diff --git a/drivers/media/i2c/hi846.c b/drivers/media/i2c/hi846.c
index fa0038749a3b..8a8ae89a8453 100644
--- a/drivers/media/i2c/hi846.c
+++ b/drivers/media/i2c/hi846.c
@@ -1613,11 +1613,9 @@ static int hi846_set_stream(struct v4l2_subdev *sd, int 
enable)
mutex_lock(>mutex);
 
if (enable) {
-   ret = pm_runtime_get_sync(>dev);
-   if (ret < 0) {
-   pm_runtime_put_noidle(>dev);
+   ret = pm_runtime_resume_and_get(>dev);
+   if (ret)
goto out;
-   }
 
ret = hi846_start_streaming(hi846);
}
diff --git a/drivers/media/i2c/hi847.c b/drivers/media/i2c/hi847.c
index 32547d7a2659..47aa2cd06e32 100644
--- a/drivers/media/i2c/hi847.c
+++ b/drivers/media/i2c/hi847.c
@@ -2623,9 +2623,8 @@ static int hi847_set_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
if (enable) {
-   ret = pm_runtime_get_sync(>dev);
-   if (ret < 0) {
-   pm_runtime_put_noidle(>dev);
+   ret = pm_runtime_resume_and_get(>dev);
+   if (ret) {
mutex_unlock(>mutex);
return ret;
}
diff --git a/drivers/media/i2c/imx208.c b/drivers/media/i2c/imx208.c
index ee5a28675388..a6edcae4ef47 100644
--- a/drivers/media/i2c/imx208.c
+++ b/drivers/media/i2c/imx208.c
@@ -720,9 +720,11 @@ static int imx208_set_stream(struct v4l2_subdev *sd, int 
enable)
}
 
if (enable) {
-   ret = pm_runtime_get_sync(>dev);
-   if (ret < 0)
-   goto err_rpm_put;
+   ret = pm_runtime_resume_and_get(>dev);
+   if (ret) {
+   mutex_unlock(>imx208_mx);
+   return ret;
+   }
 
/*
 * Apply default & customized values
@@ -819,11 +821,9 @@ static int imx208_read_otp(struct imx208 *imx208)
if (imx208->otp_read)
goto out_unlock;
 
-   ret = pm_runtime_get_sync(>dev);
-   if (ret < 0) {
-   pm_runtime_put_noidle(>dev);
+   ret = pm_runtime_resume_and_get(>dev);
+   if (ret)
goto out_unlock;
-   }
 
ret = imx208_identify_module(imx208);
if (ret)
diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c
index 365ce5684583..ccf6731ea2e2 100644
--- a/drivers/media/i2c/og01a1b.c
+++ b/drivers/media/i2c/og01a1b.c
@@ -737,9 +737,8 @@ static int og01a1b_set_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
if (enable) {
-   ret = pm_runtime_get_sync(>dev);
-   if (ret < 0) {
-   pm_runtime_put_noidle(>dev);
+   ret = pm_runtime_resume_and_get(>dev);
+   if (ret) {
mutex_unlock(>mutex);
return ret;
}
diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 488ee6d9d301..033cf7f14f19 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -975,9 +975,9 @@ static int ov5693_s_stream(struct v4l2_subdev *sd, int 
enable)
int ret;
 
if (enable) {
-   ret = pm_runtime_get_sync(ov5693->dev);
-   if (ret < 0)
-   goto err_power_down;

[git:media_stage/master] MAINTAINERS: fix file path for Omnvision OV4689

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: MAINTAINERS: fix file path for Omnvision OV4689
Author:  Mikhail Rudenko 
Date:Thu Aug 3 15:37:42 2023 +0300

Correct the driver source path specified in the MAINTAINERS file,
which was mistakenly set due to an oversight during the driver's
initial addition.

Signed-off-by: Mikhail Rudenko 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/MAINTAINERS b/MAINTAINERS
index 90f13281d297..980b141856e1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15772,7 +15772,7 @@ L:  linux-me...@vger.kernel.org
 S: Maintained
 T: git git://linuxtv.org/media_tree.git
 F: Documentation/devicetree/bindings/media/i2c/ovti,ov4689.yaml
-F: drivers/media/i2c/ov5647.c
+F: drivers/media/i2c/ov4689.c
 
 OMNIVISION OV5640 SENSOR DRIVER
 M: Steve Longerbeam 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ov5640: Fix a memory leak when ov5640_probe fails

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ov5640: Fix a memory leak when ov5640_probe fails
Author:  Xiaolei Wang 
Date:Mon Aug 7 17:05:35 2023 +0800

sensor->ctrls.handler is initialized in ov5640_init_controls(),
so when the sensor is not connected and ov5640_sensor_resume()
fails, sensor->ctrls.handler should be released, otherwise a
memory leak will be detected:

unreferenced object 0xc674ca80 (size 64):
   comm "swapper/0", pid 1, jiffies 4294938337 (age 204.880s)
   hex dump (first 32 bytes):
 80 55 75 c6 80 54 75 c6 00 55 75 c6 80 52 75 c6 .Uu..Tu..Uu..Ru.
 00 53 75 c6 00 00 00 00 00 00 00 00 00 00 00 00 .Su..

Fixes: 85644a9b37ec ("media: ov5640: Use runtime PM")
Signed-off-by: Xiaolei Wang 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5640.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 1c9cda1e7df5..40532f7bcabe 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3928,7 +3928,7 @@ static int ov5640_probe(struct i2c_client *client)
ret = ov5640_sensor_resume(dev);
if (ret) {
dev_err(dev, "failed to power on\n");
-   goto entity_cleanup;
+   goto free_ctrls;
}
 
pm_runtime_set_active(dev);
@@ -3953,8 +3953,9 @@ static int ov5640_probe(struct i2c_client *client)
 err_pm_runtime:
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
-   v4l2_ctrl_handler_free(>ctrls.handler);
ov5640_sensor_suspend(dev);
+free_ctrls:
+   v4l2_ctrl_handler_free(>ctrls.handler);
 entity_cleanup:
media_entity_cleanup(>sd.entity);
mutex_destroy(>lock);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: Drop ifdeffery from sensor drivers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: Drop ifdeffery from sensor drivers
Author:  Jacopo Mondi 
Date:Mon Sep 11 16:56:36 2023 +0200

Since commit 7d3c7d2a2914 ("media: i2c: Add a camera sensor top level
menu") the CONFIG_MEDIA_CONTROLLER and CONFIG_VIDEO_V4L2_SUBDEV_API are
selected by the top-level VIDEO_CAMERA_SENSOR menu.

Remove all ifdefferies from camera sensor drivers to simplify the code.

Compile-tested only.

Signed-off-by: Jacopo Mondi 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/mt9m111.c | 13 +
 drivers/media/i2c/mt9v011.c |  6 --
 drivers/media/i2c/mt9v111.c | 14 --
 drivers/media/i2c/ov2640.c  | 11 +--
 drivers/media/i2c/ov2659.c  | 16 +---
 drivers/media/i2c/ov2685.c  | 12 
 drivers/media/i2c/ov5695.c  | 19 ---
 drivers/media/i2c/ov7670.c  | 20 
 drivers/media/i2c/ov772x.c  |  4 
 drivers/media/i2c/ov7740.c  | 23 ++-
 10 files changed, 5 insertions(+), 133 deletions(-)

---

diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index df8d9c9e6a96..1f44b72e8a70 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -244,9 +244,7 @@ struct mt9m111 {
bool is_streaming;
/* user point of view - 0: falling 1: rising edge */
unsigned int pclk_sample:1;
-#ifdef CONFIG_MEDIA_CONTROLLER
struct media_pad pad;
-#endif
 };
 
 static const struct mt9m111_mode_info mt9m111_mode_data[MT9M111_NUM_MODES] = {
@@ -527,13 +525,9 @@ static int mt9m111_get_fmt(struct v4l2_subdev *sd,
return -EINVAL;
 
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
-#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
mf = v4l2_subdev_get_try_format(sd, sd_state, format->pad);
format->format = *mf;
return 0;
-#else
-   return -EINVAL;
-#endif
}
 
mf->width   = mt9m111->width;
@@ -1120,7 +1114,6 @@ static int mt9m111_s_stream(struct v4l2_subdev *sd, int 
enable)
 static int mt9m111_init_cfg(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state)
 {
-#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
struct v4l2_mbus_framefmt *format =
v4l2_subdev_get_try_format(sd, sd_state, 0);
 
@@ -1132,7 +1125,7 @@ static int mt9m111_init_cfg(struct v4l2_subdev *sd,
format->ycbcr_enc   = V4L2_YCBCR_ENC_DEFAULT;
format->quantization= V4L2_QUANTIZATION_DEFAULT;
format->xfer_func   = V4L2_XFER_FUNC_DEFAULT;
-#endif
+
return 0;
 }
 
@@ -1315,13 +1308,11 @@ static int mt9m111_probe(struct i2c_client *client)
return ret;
}
 
-#ifdef CONFIG_MEDIA_CONTROLLER
mt9m111->pad.flags = MEDIA_PAD_FL_SOURCE;
mt9m111->subdev.entity.function = MEDIA_ENT_F_CAM_SENSOR;
ret = media_entity_pads_init(>subdev.entity, 1, >pad);
if (ret < 0)
goto out_hdlfree;
-#endif
 
mt9m111->current_mode = _mode_data[MT9M111_MODE_SXGA_15FPS];
mt9m111->frame_interval.numerator = 1;
@@ -1350,10 +1341,8 @@ static int mt9m111_probe(struct i2c_client *client)
return 0;
 
 out_entityclean:
-#ifdef CONFIG_MEDIA_CONTROLLER
media_entity_cleanup(>subdev.entity);
 out_hdlfree:
-#endif
v4l2_ctrl_handler_free(>hdl);
 
return ret;
diff --git a/drivers/media/i2c/mt9v011.c b/drivers/media/i2c/mt9v011.c
index 774861ba7747..37a634b92cd5 100644
--- a/drivers/media/i2c/mt9v011.c
+++ b/drivers/media/i2c/mt9v011.c
@@ -49,9 +49,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-2)");
 
 struct mt9v011 {
struct v4l2_subdev sd;
-#ifdef CONFIG_MEDIA_CONTROLLER
struct media_pad pad;
-#endif
struct v4l2_ctrl_handler ctrls;
unsigned width, height;
unsigned xtal;
@@ -483,9 +481,7 @@ static int mt9v011_probe(struct i2c_client *c)
u16 version;
struct mt9v011 *core;
struct v4l2_subdev *sd;
-#ifdef CONFIG_MEDIA_CONTROLLER
int ret;
-#endif
 
/* Check if the adapter supports the needed features */
if (!i2c_check_functionality(c->adapter,
@@ -499,14 +495,12 @@ static int mt9v011_probe(struct i2c_client *c)
sd = >sd;
v4l2_i2c_subdev_init(sd, c, _ops);
 
-#ifdef CONFIG_MEDIA_CONTROLLER
core->pad.flags = MEDIA_PAD_FL_SOURCE;
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
 
ret = media_entity_pads_init(>entity, 1, >pad);
if (ret < 0)
return ret;
-#endif
 
/* Check if the sensor is really a MT9V011 */
version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION);
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index 1f7edc0f5b1a..f859b49e13bf 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -121,9 +121,7 @@ 

[git:media_stage/master] media: i2c: mt9v032: Extend match support for OF tables

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: mt9v032: Extend match support for OF tables
Author:  Biju Das 
Date:Sun Sep 10 17:54:31 2023 +0100

The driver has an OF match table, still, it uses an ID lookup table for
retrieving match data. Currently, the driver is working on the
assumption that an I2C device registered via OF will always match a
legacy I2C device ID. The correct approach is to have an OF device ID
table using i2c_get_match_data() if the devices are registered via OF/ID.

Unify the OF/ID table by using mt9v032_model_info as match data for both
these tables and replace the ID lookup table for the match data by
i2c_get_match_data() and simplifly probe().

Signed-off-by: Biju Das 
Reviewed-by: Jacopo Mondi 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/mt9v032.c | 21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

---

diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
index 00e7bc6e3235..0f448aa27e53 100644
--- a/drivers/media/i2c/mt9v032.c
+++ b/drivers/media/i2c/mt9v032.c
@@ -1046,7 +1046,6 @@ done:
 
 static int mt9v032_probe(struct i2c_client *client)
 {
-   const struct i2c_device_id *did = i2c_client_get_device_id(client);
struct mt9v032_platform_data *pdata = mt9v032_get_pdata(client);
struct mt9v032 *mt9v032;
unsigned int i;
@@ -1076,7 +1075,7 @@ static int mt9v032_probe(struct i2c_client *client)
 
mutex_init(>power_lock);
mt9v032->pdata = pdata;
-   mt9v032->model = (const void *)did->driver_data;
+   mt9v032->model = i2c_get_match_data(client);
 
v4l2_ctrl_handler_init(>ctrls, 11 +
   ARRAY_SIZE(mt9v032_aegc_controls));
@@ -1272,20 +1271,20 @@ static const struct i2c_device_id mt9v032_id[] = {
{ "mt9v032m", (kernel_ulong_t)_models[MT9V032_MODEL_V032_MONO] 
},
{ "mt9v034", (kernel_ulong_t)_models[MT9V032_MODEL_V034_COLOR] 
},
{ "mt9v034m", (kernel_ulong_t)_models[MT9V032_MODEL_V034_MONO] 
},
-   { }
+   { /* Sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, mt9v032_id);
 
 #if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id mt9v032_of_match[] = {
-   { .compatible = "aptina,mt9v022" },
-   { .compatible = "aptina,mt9v022m" },
-   { .compatible = "aptina,mt9v024" },
-   { .compatible = "aptina,mt9v024m" },
-   { .compatible = "aptina,mt9v032" },
-   { .compatible = "aptina,mt9v032m" },
-   { .compatible = "aptina,mt9v034" },
-   { .compatible = "aptina,mt9v034m" },
+   { .compatible = "aptina,mt9v022", .data = 
_models[MT9V032_MODEL_V022_COLOR] },
+   { .compatible = "aptina,mt9v022m", .data = 
_models[MT9V032_MODEL_V022_MONO] },
+   { .compatible = "aptina,mt9v024", .data = 
_models[MT9V032_MODEL_V024_COLOR] },
+   { .compatible = "aptina,mt9v024m", .data = 
_models[MT9V032_MODEL_V024_MONO] },
+   { .compatible = "aptina,mt9v032", .data = 
_models[MT9V032_MODEL_V032_COLOR] },
+   { .compatible = "aptina,mt9v032m", .data = 
_models[MT9V032_MODEL_V032_MONO] },
+   { .compatible = "aptina,mt9v034", .data = 
_models[MT9V032_MODEL_V034_COLOR] },
+   { .compatible = "aptina,mt9v034m", .data = 
_models[MT9V032_MODEL_V034_MONO] },
{ /* Sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mt9v032_of_match);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ivsc: csi: remove name identifier

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ivsc: csi: remove name identifier
Author:  Wentong Wu 
Date:Tue Aug 29 13:24:26 2023 +0800

Remove name identifier to match the device with the
defined UUID when load driver module.

Signed-off-by: Wentong Wu 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/intel/ivsc/mei_csi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c 
b/drivers/media/pci/intel/ivsc/mei_csi.c
index 00ba611e0f68..2a6b828fd8dd 100644
--- a/drivers/media/pci/intel/ivsc/mei_csi.c
+++ b/drivers/media/pci/intel/ivsc/mei_csi.c
@@ -30,7 +30,6 @@
 #include 
 #include 
 
-#define MEI_CSI_DRIVER_NAME "ivsc_csi"
 #define MEI_CSI_ENTITY_NAME "Intel IVSC CSI"
 
 #define MEI_CSI_LINK_FREQ_400MHZ 4ULL
@@ -804,14 +803,14 @@ static void mei_csi_remove(struct mei_cl_device *cldev)
 0xAF, 0x93, 0x7b, 0x44, 0x53, 0xAC, 0x29, 0xDA)
 
 static const struct mei_cl_device_id mei_csi_tbl[] = {
-   { MEI_CSI_DRIVER_NAME, MEI_CSI_UUID, MEI_CL_VERSION_ANY },
+   { .uuid = MEI_CSI_UUID, .version = MEI_CL_VERSION_ANY },
{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(mei, mei_csi_tbl);
 
 static struct mei_cl_driver mei_csi_driver = {
.id_table = mei_csi_tbl,
-   .name = MEI_CSI_DRIVER_NAME,
+   .name = KBUILD_MODNAME,
 
.probe = mei_csi_probe,
.remove = mei_csi_remove,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: v4l2-subdev: Document that routing support depends on streams

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: v4l2-subdev: Document that routing support depends on streams
Author:  Laurent Pinchart 
Date:Fri Aug 18 18:55:18 2023 +0300

Routing support, through the subdev .set_routing() operation, requires
the subdev to support streams. This is however not clearly documented
anywhere. Fix it by expanding the operation's documentation to indicate
that subdevs must set the V4L2_SUBDEV_FL_STREAMS flag.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Tomi Valkeinen 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 include/media/v4l2-subdev.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

---

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index d9fca929c10b..820e38ec3dc9 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -822,8 +822,9 @@ struct v4l2_subdev_state {
  *  operation shall fail if the pad index it has been called on
  *  is not valid or in case of unrecoverable failures.
  *
- * @set_routing: enable or disable data connection routes described in the
- *  subdevice routing table.
+ * @set_routing: Enable or disable data connection routes described in the
+ *  subdevice routing table. Subdevs that implement this operation
+ *  must set the V4L2_SUBDEV_FL_STREAMS flag.
  *
  * @enable_streams: Enable the streams defined in streams_mask on the given
  * source pad. Subdevs that implement this operation must use the active

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: bttv: Add MODULE_FIRMWARE macro

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: bttv: Add MODULE_FIRMWARE macro
Author:  Juerg Haefliger 
Date:Fri Jun 16 14:04:06 2023 +0200

The module loads firmware so add a MODULE_FIRMWARE macro to provide that
information via modinfo.

Signed-off-by: Juerg Haefliger 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/bt8xx/bttv-cards.c | 1 +
 1 file changed, 1 insertion(+)

---

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c 
b/drivers/media/pci/bt8xx/bttv-cards.c
index ec78f7fc5e1b..867c1308de23 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -126,6 +126,7 @@ MODULE_PARM_DESC(audiodev, "specify audio device:\n"
"\t\t 3 = tvaudio");
 MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) 
is to use the card definition.");
 
+MODULE_FIRMWARE("hcwamc.rbf");
 
 /* I2C addresses list */
 #define I2C_ADDR_TDA7432   0x8a

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: use struct_size() helper

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: use struct_size() helper
Author:  Yu Liao 
Date:Wed Aug 16 14:31:43 2023 +0800

Prefer struct_size() over open-coded versions of idiom:

sizeof(struct-with-flex-array) + sizeof(typeof-flex-array-elements) * count

where count is the max number of items the flexible array is supposed to
contain.

Signed-off-by: Yu Liao 
Reviewed-by: Tomasz Figa 
Signed-off-by: Hans Verkuil 

 drivers/media/common/videobuf2/frame_vector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/common/videobuf2/frame_vector.c 
b/drivers/media/common/videobuf2/frame_vector.c
index 0f430ddc1f67..ff1c3ebee4b0 100644
--- a/drivers/media/common/videobuf2/frame_vector.c
+++ b/drivers/media/common/videobuf2/frame_vector.c
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(frame_vector_to_pfns);
 struct frame_vector *frame_vector_create(unsigned int nr_frames)
 {
struct frame_vector *vec;
-   int size = sizeof(struct frame_vector) + sizeof(void *) * nr_frames;
+   int size = struct_size(vec, ptrs, nr_frames);
 
if (WARN_ON_ONCE(nr_frames == 0))
return NULL;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: bttv: fix use after free error due to btv->timeout timer

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: bttv: fix use after free error due to btv->timeout timer
Author:  Zheng Wang 
Date:Thu Apr 13 11:49:42 2023 +0800

There may be some a race condition between timer function
bttv_irq_timeout and bttv_remove. The timer is setup in
probe and there is no timer_delete operation in remove
function. When it hit kfree btv, the function might still be
invoked, which will cause use after free bug.

This bug is found by static analysis, it may be false positive.

Fix it by adding del_timer_sync invoking to the remove function.

cpu0cpu1
  bttv_probe
->timer_setup
  ->bttv_set_dma
->mod_timer;
bttv_remove
  ->kfree(btv);
  ->bttv_irq_timeout
->USE btv

Fixes: 162e6376ac58 ("media: pci: Convert timers to use timer_setup()")
Signed-off-by: Zheng Wang 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/bt8xx/bttv-driver.c | 1 +
 1 file changed, 1 insertion(+)

---

diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
b/drivers/media/pci/bt8xx/bttv-driver.c
index aa708a0e5eac..09a193bb87df 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -3474,6 +3474,7 @@ static void bttv_remove(struct pci_dev *pci_dev)
 
/* free resources */
free_irq(btv->c.pci->irq,btv);
+   del_timer_sync(>timeout);
iounmap(btv->bt848_mmio);
release_mem_region(pci_resource_start(btv->c.pci,0),
   pci_resource_len(btv->c.pci,0));

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: platform: Use dev_err_probe instead of dev_err

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: platform: Use dev_err_probe instead of dev_err
Author:  Wang Ming 
Date:Wed Jul 26 19:51:58 2023 +0800

It is possible that dma_request_chan will return EPROBE_DEFER,
which means that dma->xdev->dev is not ready yet. In this case,
dev_err(dma->xdev->dev), there will be no output. This patch
fixes the bug.

Signed-off-by: Wang Ming 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/xilinx/xilinx-dma.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/platform/xilinx/xilinx-dma.c 
b/drivers/media/platform/xilinx/xilinx-dma.c
index 80d6f5b072ea..a96de5d388a1 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -708,9 +708,8 @@ int xvip_dma_init(struct xvip_composite_device *xdev, 
struct xvip_dma *dma,
snprintf(name, sizeof(name), "port%u", port);
dma->dma = dma_request_chan(dma->xdev->dev, name);
if (IS_ERR(dma->dma)) {
-   ret = PTR_ERR(dma->dma);
-   if (ret != -EPROBE_DEFER)
-   dev_err(dma->xdev->dev, "no VDMA channel found\n");
+   ret = dev_err_probe(dma->xdev->dev, PTR_ERR(dma->dma),
+   "no VDMA channel found\n");
goto error;
}
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: nxp: Use devm_kmemdup to replace devm_kmalloc + memcpy

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: nxp: Use devm_kmemdup to replace devm_kmalloc + memcpy
Author:  Li Zetao 
Date:Thu Aug 10 19:52:20 2023 +0800

Use the helper function devm_kmemdup() rather than duplicating its
implementation, which helps to enhance code readability.

Signed-off-by: Li Zetao 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

---

diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c 
b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
index 81be744e9f1b..f73facb97dc5 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -406,12 +406,10 @@ static int mxc_isi_clk_get(struct mxc_isi_dev *isi)
  * sizeof(*isi->clks);
int ret;
 
-   isi->clks = devm_kmalloc(isi->dev, size, GFP_KERNEL);
+   isi->clks = devm_kmemdup(isi->dev, isi->pdata->clks, size, GFP_KERNEL);
if (!isi->clks)
return -ENOMEM;
 
-   memcpy(isi->clks, isi->pdata->clks, size);
-
ret = devm_clk_bulk_get(isi->dev, isi->pdata->num_clks,
isi->clks);
if (ret < 0) {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: dt-bindings: samsung, exynos4212-fimc-is: replace duplicate pmu node with phandle

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: dt-bindings: samsung,exynos4212-fimc-is: replace duplicate pmu 
node with phandle
Author:  Krzysztof Kozlowski 
Date:Tue Aug 15 08:07:37 2023 +0200

The FIMC IS camera must access the PMU (Power Management Unit) IO memory
to control camera power.  This was achieved by duplicating the PMU node
as its child like:

  soc@0 {
system-controller@1002 { ... }; // Real PMU

camera@1180 {
  fimc-is@1200 {
// FIMC IS camera node
pmu@1002 {
  reg = <0x1002 0x3000>; // Fake PMU node
};
  };
};
  };

This is not a correct representation of the hardware.  Mapping the PMU
(Power Management Unit) IO memory should be via syscon-like phandle
(samsung,pmu-syscon, already used for other drivers), not by duplicating
"pmu" Devicetree node inside the FIMC IS.

Reviewed-by: Rob Herring 
Signed-off-by: Krzysztof Kozlowski 
Signed-off-by: Hans Verkuil 

 .../bindings/media/samsung,exynos4212-fimc-is.yaml| 15 ++-
 Documentation/devicetree/bindings/media/samsung,fimc.yaml |  5 +
 2 files changed, 11 insertions(+), 9 deletions(-)

---

diff --git 
a/Documentation/devicetree/bindings/media/samsung,exynos4212-fimc-is.yaml 
b/Documentation/devicetree/bindings/media/samsung,exynos4212-fimc-is.yaml
index 3691cd4962b2..3a5ff3f47060 100644
--- a/Documentation/devicetree/bindings/media/samsung,exynos4212-fimc-is.yaml
+++ b/Documentation/devicetree/bindings/media/samsung,exynos4212-fimc-is.yaml
@@ -75,13 +75,20 @@ properties:
   power-domains:
 maxItems: 1
 
+  samsung,pmu-syscon:
+$ref: /schemas/types.yaml#/definitions/phandle
+description:
+  Power Management Unit (PMU) system controller interface, used to
+  power/start the ISP.
+
 patternProperties:
   "^pmu@[0-9a-f]+$":
 type: object
 additionalProperties: false
+deprecated: true
 description:
   Node representing the SoC's Power Management Unit (duplicated with the
-  correct PMU node in the SoC).
+  correct PMU node in the SoC). Deprecated, use samsung,pmu-syscon.
 
 properties:
   reg:
@@ -131,6 +138,7 @@ required:
   - clock-names
   - interrupts
   - ranges
+  - samsung,pmu-syscon
   - '#size-cells'
 
 additionalProperties: false
@@ -179,15 +187,12 @@ examples:
  <_fimc_fd>, <_fimc_mcuctl>;
 iommu-names = "isp", "drc", "fd", "mcuctl";
 power-domains = <_isp>;
+samsung,pmu-syscon = <_system_controller>;
 
 #address-cells = <1>;
 #size-cells = <1>;
 ranges;
 
-pmu@1002 {
-reg = <0x1002 0x3000>;
-};
-
 i2c-isp@1214 {
 compatible = "samsung,exynos4212-i2c-isp";
 reg = <0x1214 0x100>;
diff --git a/Documentation/devicetree/bindings/media/samsung,fimc.yaml 
b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
index 79ff6d83a9fd..530a08f5d3fe 100644
--- a/Documentation/devicetree/bindings/media/samsung,fimc.yaml
+++ b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
@@ -236,15 +236,12 @@ examples:
  <_fimc_fd>, <_fimc_mcuctl>;
 iommu-names = "isp", "drc", "fd", "mcuctl";
 power-domains = <_isp>;
+samsung,pmu-syscon = <_system_controller>;
 
 #address-cells = <1>;
 #size-cells = <1>;
 ranges;
 
-pmu@1002 {
-reg = <0x1002 0x3000>;
-};
-
 i2c-isp@1214 {
 compatible = "samsung,exynos4212-i2c-isp";
 reg = <0x1214 0x100>;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: mediatek: vcodec: fix spelling mistake "resonable" -> "reasonable"

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: mediatek: vcodec: fix spelling mistake "resonable" -> 
"reasonable"
Author:  Colin Ian King 
Date:Tue Aug 15 13:14:46 2023 +0100

There are a couple of spelling mistakes in pr_err error messages. Fix them.

Signed-off-by: Colin Ian King 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c | 2 +-
 drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c 
b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
index 9e744d07a1e8..6bbe55de6ce9 100644
--- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
+++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
@@ -68,7 +68,7 @@ struct mtk_vcodec_fw *mtk_vcodec_fw_scp_init(void *priv, enum 
mtk_vcodec_fw_use
 
plat_dev = dec_dev->plat_dev;
} else {
-   pr_err("Invalid fw_use %d (use a resonable fw id here)\n", 
fw_use);
+   pr_err("Invalid fw_use %d (use a reasonable fw id here)\n", 
fw_use);
return ERR_PTR(-EINVAL);
}
 
diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c 
b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c
index 5e03b0886559..9f6e4b59455d 100644
--- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c
+++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c
@@ -109,7 +109,7 @@ struct mtk_vcodec_fw *mtk_vcodec_fw_vpu_init(void *priv, 
enum mtk_vcodec_fw_use
plat_dev = dec_dev->plat_dev;
rst_id = VPU_RST_DEC;
} else {
-   pr_err("Invalid fw_use %d (use a resonable fw id here)\n", 
fw_use);
+   pr_err("Invalid fw_use %d (use a reasonable fw id here)\n", 
fw_use);
return ERR_PTR(-EINVAL);
}
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: exynos4-is: fimc-is: replace duplicate pmu node with phandle
Author:  Krzysztof Kozlowski 
Date:Tue Aug 15 08:07:39 2023 +0200

Devicetree for the FIMC IS camera included duplicated PMU node as its
child like:

  soc@0 {
system-controller@1002 { ... }; // Real PMU

camera@1180 {
  fimc-is@1200 {
// FIMC IS camera node
pmu@1002 {
  reg = <0x1002 0x3000>; // Fake PMU node
};
  };
};
  };

This is not a correct representation of the hardware.  Mapping the PMU
(Power Management Unit) IO memory should be via syscon-like phandle
(samsung,pmu-syscon, already used for other drivers), not by duplicating
"pmu" Devicetree node inside the FIMC IS.  Backward compatibility is
preserved.

Signed-off-by: Krzysztof Kozlowski 
Signed-off-by: Hans Verkuil 

 .../media/platform/samsung/exynos4-is/fimc-is.c| 33 --
 1 file changed, 24 insertions(+), 9 deletions(-)

---

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c 
b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
index 530a148fe4d3..a08c87ef6e2d 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
@@ -767,12 +767,32 @@ static void fimc_is_debugfs_create(struct fimc_is *is)
 static int fimc_is_runtime_resume(struct device *dev);
 static int fimc_is_runtime_suspend(struct device *dev);
 
+static void __iomem *fimc_is_get_pmu_regs(struct device *dev)
+{
+   struct device_node *node;
+   void __iomem *regs;
+
+   node = of_parse_phandle(dev->of_node, "samsung,pmu-syscon", 0);
+   if (!node) {
+   node = of_get_child_by_name(dev->of_node, "pmu");
+   if (!node)
+   return IOMEM_ERR_PTR(-ENODEV);
+   dev_warn(dev, "Found PMU node via deprecated method, update 
your DTB\n");
+   }
+
+   regs = of_iomap(node, 0);
+   of_node_put(node);
+   if (!regs)
+   return IOMEM_ERR_PTR(-ENOMEM);
+
+   return regs;
+}
+
 static int fimc_is_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
struct fimc_is *is;
struct resource res;
-   struct device_node *node;
int ret;
 
is = devm_kzalloc(>dev, sizeof(*is), GFP_KERNEL);
@@ -794,14 +814,9 @@ static int fimc_is_probe(struct platform_device *pdev)
if (IS_ERR(is->regs))
return PTR_ERR(is->regs);
 
-   node = of_get_child_by_name(dev->of_node, "pmu");
-   if (!node)
-   return -ENODEV;
-
-   is->pmu_regs = of_iomap(node, 0);
-   of_node_put(node);
-   if (!is->pmu_regs)
-   return -ENOMEM;
+   is->pmu_regs = fimc_is_get_pmu_regs(dev);
+   if (IS_ERR(is->pmu_regs))
+   return PTR_ERR(is->pmu_regs);
 
is->irq = irq_of_parse_and_map(dev->of_node, 0);
if (!is->irq) {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: staging: media: sunxi: cedrus: Remove redundant of_match_ptr()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: staging: media: sunxi: cedrus: Remove redundant of_match_ptr()
Author:  Ruan Jinjie 
Date:Fri Aug 11 10:49:45 2023 +0800

The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie 
Acked-by: Jernej Skrabec 
Acked-by: Paul Kocialkowski 
Signed-off-by: Hans Verkuil 

 drivers/staging/media/sunxi/cedrus/cedrus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c 
b/drivers/staging/media/sunxi/cedrus/cedrus.c
index 8e248d4a0aec..f52df6836045 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -708,7 +708,7 @@ static struct platform_driver cedrus_driver = {
.remove_new = cedrus_remove,
.driver = {
.name   = CEDRUS_NAME,
-   .of_match_table = of_match_ptr(cedrus_dt_match),
+   .of_match_table = cedrus_dt_match,
.pm = _dev_pm_ops,
},
 };

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: cx25840: simplify cx23885_dif_setup()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: cx25840: simplify cx23885_dif_setup()
Author:  Hans Verkuil 
Date:Thu Aug 3 09:42:10 2023 +0200

Instead of creating a huge switch statement (that thoroughly confuses
smatch), create a table of coefficients and use that.

Signed-off-by: Hans Verkuil 

 drivers/media/i2c/cx25840/cx25840-core.c | 3694 +++---
 1 file changed, 811 insertions(+), 2883 deletions(-)

---



___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: bt8xx: make read-only arrays static

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: bt8xx: make read-only arrays static
Author:  Colin Ian King 
Date:Tue Jun 27 16:37:38 2023 +0100

Don't populate the arrays on the stack, instead make them static const.
Also add spaces between values to clean up checkpatch style warnings.

Signed-off-by: Colin Ian King 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/bt8xx/dvb-bt8xx.c | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

---

diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c 
b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index 4cb890b949c3..390cbba6c065 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -190,11 +190,15 @@ static int cx24108_tuner_set_params(struct dvb_frontend 
*fe)
u32 freq = c->frequency;
int i, a, n, pump;
u32 band, pll;
-   u32 osci[]={95,1019000,1075000,1178000,1296000,1432000,
-   1576000,1718000,1856000,2036000,215};
-   u32 bandsel[]={0,0x0002,0x0004,0x00100800,0x00101000,
-   0x00102000,0x00104000,0x00108000,0x0011,
-   0x0012,0x0014};
+   static const u32 osci[] = {
+   95, 1019000, 1075000, 1178000, 1296000, 1432000,
+   1576000, 1718000, 1856000, 2036000, 215
+   };
+   static const u32 bandsel[] = {
+   0, 0x0002, 0x0004, 0x00100800, 0x00101000,
+   0x00102000, 0x00104000, 0x00108000, 0x0011,
+   0x0012, 0x0014
+   };
 
#define XTAL 1011100 /* Hz, really 1.0111 MHz and a /10 prescaler */
dprintk("cx24108 debug: entering SetTunerFreq, freq=%d\n", freq);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: imx-jpeg: Remove unused declarations

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: imx-jpeg: Remove unused declarations
Author:  Yue Haibing 
Date:Thu Aug 17 21:43:54 2023 +0800

These are never implemented, remove them.

Signed-off-by: Yue Haibing 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 11 ---
 1 file changed, 11 deletions(-)

---

diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h 
b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h
index a2b4fb9e29e7..d579c804b047 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h
@@ -115,28 +115,17 @@ void print_cast_status(struct device *dev, void __iomem 
*reg,
 void print_wrapper_info(struct device *dev, void __iomem *reg);
 void mxc_jpeg_sw_reset(void __iomem *reg);
 int mxc_jpeg_enable(void __iomem *reg);
-void wait_frmdone(struct device *dev, void __iomem *reg);
 void mxc_jpeg_enc_mode_conf(struct device *dev, void __iomem *reg, u8 extseq);
 void mxc_jpeg_enc_mode_go(struct device *dev, void __iomem *reg, u8 extseq);
 void mxc_jpeg_enc_set_quality(struct device *dev, void __iomem *reg, u8 
quality);
 void mxc_jpeg_dec_mode_go(struct device *dev, void __iomem *reg);
-int mxc_jpeg_get_slot(void __iomem *reg);
-u32 mxc_jpeg_get_offset(void __iomem *reg, int slot);
 void mxc_jpeg_enable_slot(void __iomem *reg, int slot);
 void mxc_jpeg_set_l_endian(void __iomem *reg, int le);
 void mxc_jpeg_enable_irq(void __iomem *reg, int slot);
 void mxc_jpeg_disable_irq(void __iomem *reg, int slot);
-int mxc_jpeg_set_input(void __iomem *reg, u32 in_buf, u32 bufsize);
-int mxc_jpeg_set_output(void __iomem *reg, u16 out_pitch, u32 out_buf,
-   u16 w, u16 h);
-void mxc_jpeg_set_config_mode(void __iomem *reg, int config_mode);
-int mxc_jpeg_set_params(struct mxc_jpeg_desc *desc,  u32 bufsize, u16
-   out_pitch, u32 format);
 void mxc_jpeg_set_bufsize(struct mxc_jpeg_desc *desc,  u32 bufsize);
 void mxc_jpeg_set_res(struct mxc_jpeg_desc *desc, u16 w, u16 h);
 void mxc_jpeg_set_line_pitch(struct mxc_jpeg_desc *desc, u32 line_pitch);
 void mxc_jpeg_set_desc(u32 desc, void __iomem *reg, int slot);
 void mxc_jpeg_clr_desc(void __iomem *reg, int slot);
-void mxc_jpeg_set_regs_from_desc(struct mxc_jpeg_desc *desc,
-void __iomem *reg);
 #endif

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ov2640: Use the devm_clk_get_enabled() helper function

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ov2640: Use the devm_clk_get_enabled() helper function
Author:  Ruan Jinjie 
Date:Fri Aug 18 18:16:24 2023 +0800

With devm_clk_get_enabled() the call to clk_disable_unprepare() can be
dropped from the error path and the remove callback.

Signed-off-by: Ruan Jinjie 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov2640.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

---

diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index bb6c9863a546..2d08d30175c0 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -1205,17 +1205,14 @@ static int ov2640_probe(struct i2c_client *client)
return -ENOMEM;
 
if (client->dev.of_node) {
-   priv->clk = devm_clk_get(>dev, "xvclk");
+   priv->clk = devm_clk_get_enabled(>dev, "xvclk");
if (IS_ERR(priv->clk))
return PTR_ERR(priv->clk);
-   ret = clk_prepare_enable(priv->clk);
-   if (ret)
-   return ret;
}
 
ret = ov2640_probe_dt(client, priv);
if (ret)
-   goto err_clk;
+   return ret;
 
priv->win = ov2640_select_win(SVGA_WIDTH, SVGA_HEIGHT);
priv->cfmt_code = MEDIA_BUS_FMT_UYVY8_2X8;
@@ -1264,8 +1261,6 @@ err_videoprobe:
 err_hdl:
v4l2_ctrl_handler_free(>hdl);
mutex_destroy(>lock);
-err_clk:
-   clk_disable_unprepare(priv->clk);
return ret;
 }
 
@@ -1278,7 +1273,6 @@ static void ov2640_remove(struct i2c_client *client)
mutex_destroy(>lock);
media_entity_cleanup(>subdev.entity);
v4l2_device_unregister_subdev(>subdev);
-   clk_disable_unprepare(priv->clk);
 }
 
 static const struct i2c_device_id ov2640_id[] = {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov01a10: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov01a10: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:22 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov01a10.c | 2 --
 1 file changed, 2 deletions(-)

---

diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
index 2b9e1b3a3bf4..b43c1c96f47b 100644
--- a/drivers/media/i2c/ov01a10.c
+++ b/drivers/media/i2c/ov01a10.c
@@ -672,8 +672,6 @@ static int ov01a10_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
state = v4l2_subdev_lock_and_get_active_state(sd);
-   if (ov01a10->streaming == enable)
-   goto unlock;
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ivsc: ace: remove name identifier

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ivsc: ace: remove name identifier
Author:  Wentong Wu 
Date:Tue Aug 29 13:24:27 2023 +0800

Remove name identifier to match the device with the
defined UUID when load driver module.

Signed-off-by: Wentong Wu 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/intel/ivsc/mei_ace.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

---

diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c 
b/drivers/media/pci/intel/ivsc/mei_ace.c
index a0491f307831..d4ecc2b4a7f0 100644
--- a/drivers/media/pci/intel/ivsc/mei_ace.c
+++ b/drivers/media/pci/intel/ivsc/mei_ace.c
@@ -30,8 +30,6 @@
 #include 
 #include 
 
-#defineMEI_ACE_DRIVER_NAME "ivsc_ace"
-
 /* indicating driver message */
 #defineACE_DRV_MSG 1
 /* indicating set command */
@@ -554,14 +552,14 @@ static const struct dev_pm_ops mei_ace_pm_ops = {
 0x9B, 0x78, 0x03, 0x61, 0x63, 0x5E, 0x24, 0x47)
 
 static const struct mei_cl_device_id mei_ace_tbl[] = {
-   { MEI_ACE_DRIVER_NAME, MEI_ACE_UUID, MEI_CL_VERSION_ANY },
+   { .uuid = MEI_ACE_UUID, .version = MEI_CL_VERSION_ANY },
{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(mei, mei_ace_tbl);
 
 static struct mei_cl_driver mei_ace_driver = {
.id_table = mei_ace_tbl,
-   .name = MEI_ACE_DRIVER_NAME,
+   .name = KBUILD_MODNAME,
 
.probe = mei_ace_probe,
.remove = mei_ace_remove,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov7670: Drop CONFIG_OF ifdeffery

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov7670: Drop CONFIG_OF ifdeffery
Author:  Biju Das 
Date:Sun Sep 10 16:00:33 2023 +0100

Drop of_match_ptr() from ov7670_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of ov7670_driver on non-OF
system and shouldn't be an issue.

Add mod_devicetable.h include.

It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.

Signed-off-by: Biju Das 
Reviewed-by: Jacopo Mondi 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov7670.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index b70d65f5c18a..172483597c54 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -10,6 +10,7 @@
  */
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1993,18 +1994,16 @@ static const struct i2c_device_id ov7670_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ov7670_id);
 
-#if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id ov7670_of_match[] = {
{ .compatible = "ovti,ov7670", _devdata },
{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, ov7670_of_match);
-#endif
 
 static struct i2c_driver ov7670_driver = {
.driver = {
.name   = "ov7670",
-   .of_match_table = of_match_ptr(ov7670_of_match),
+   .of_match_table = ov7670_of_match,
},
.probe  = ov7670_probe,
.remove = ov7670_remove,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: dt-bindings: Add OV5642

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: dt-bindings: Add OV5642
Author:  Fabio Estevam 
Date:Wed Sep 13 16:28:11 2023 -0300

As explained in the description text from trivial-devices.yaml:

"This is a list of trivial I2C and SPI devices that have simple device tree
bindings, consisting only of a compatible field, an address and possibly an
interrupt line."

A camera device does not fall into this category as it needs other
properties such as regulators, reset and powerdown GPIOs, clocks,
media endpoint.

Remove the OV5642 entry from trivial-devices.yaml and add its own
ovti,ov5642.yaml.

Signed-off-by: Fabio Estevam 
Reviewed-by: Rob Herring 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 .../devicetree/bindings/media/i2c/ovti,ov5642.yaml | 141 +
 .../devicetree/bindings/trivial-devices.yaml   |   2 -
 2 files changed, 141 insertions(+), 2 deletions(-)

---

diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5642.yaml 
b/Documentation/devicetree/bindings/media/i2c/ovti,ov5642.yaml
new file mode 100644
index ..01f8b2b3fd17
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5642.yaml
@@ -0,0 +1,141 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ovti,ov5642.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OmniVision OV5642 Image Sensor
+
+maintainers:
+  - Fabio Estevam 
+
+allOf:
+  - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+  compatible:
+const: ovti,ov5642
+
+  reg:
+maxItems: 1
+
+  clocks:
+description: XCLK Input Clock
+
+  AVDD-supply:
+description: Analog voltage supply, 2.8V.
+
+  DVDD-supply:
+description: Digital core voltage supply, 1.5V.
+
+  DOVDD-supply:
+description: Digital I/O voltage supply, 1.8V.
+
+  powerdown-gpios:
+maxItems: 1
+description: Reference to the GPIO connected to the powerdown pin, if any.
+
+  reset-gpios:
+maxItems: 1
+description: Reference to the GPIO connected to the reset pin, if any.
+
+  port:
+$ref: /schemas/graph.yaml#/$defs/port-base
+description: |
+  Video output port.
+
+properties:
+  endpoint:
+$ref: /schemas/media/video-interfaces.yaml#
+unevaluatedProperties: false
+
+properties:
+  bus-type:
+enum: [5, 6]
+
+  bus-width:
+enum: [8, 10]
+default: 10
+
+  data-shift:
+enum: [0, 2]
+default: 0
+
+  hsync-active:
+enum: [0, 1]
+default: 1
+
+  vsync-active:
+enum: [0, 1]
+default: 1
+
+  pclk-sample:
+enum: [0, 1]
+default: 1
+
+allOf:
+  - if:
+  properties:
+bus-type:
+  const: 6
+then:
+  properties:
+hsync-active: false
+vsync-active: false
+
+  - if:
+  properties:
+bus-width:
+  const: 10
+then:
+  properties:
+data-shift:
+  const: 0
+
+required:
+  - bus-type
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+  #include 
+  #include 
+
+  i2c {
+  #address-cells = <1>;
+  #size-cells = <0>;
+
+  camera@3c {
+  compatible = "ovti,ov5642";
+  reg = <0x3c>;
+  pinctrl-names = "default";
+  pinctrl-0 = <_ov5642>;
+  clocks = <_ext_camera>;
+  DOVDD-supply = <_reg>;
+  AVDD-supply = <_reg>;
+  DVDD-supply = <_reg>;
+  powerdown-gpios = < 19 GPIO_ACTIVE_HIGH>;
+  reset-gpios = < 20 GPIO_ACTIVE_LOW>;
+
+  port {
+  ov5642_to_parallel: endpoint {
+  bus-type = ;
+  remote-endpoint = <_from_ov5642>;
+  bus-width = <8>;
+  data-shift = <2>; /* lines 9:2 are used */
+  hsync-active = <0>;
+  vsync-active = <0>;
+  pclk-sample = <1>;
+  };
+  };
+  };
+  };
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml 
b/Documentation/devicetree/bindings/trivial-devices.yaml
index cd58179ae337..c665018f55b9 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -311,8 +311,6 @@ properties:
   - nuvoton,w83773g
 # OKI ML86V7667 video decoder
   - oki,ml86v7667
-# OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with 

[git:media_stage/master] media: i2c: imx214: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx214: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:12 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Ricardo Ribalda 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx214.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
index 2f9c8582f940..e2805173f4b1 100644
--- a/drivers/media/i2c/imx214.c
+++ b/drivers/media/i2c/imx214.c
@@ -775,9 +775,6 @@ static int imx214_s_stream(struct v4l2_subdev *subdev, int 
enable)
struct imx214 *imx214 = to_imx214(subdev);
int ret;
 
-   if (imx214->streaming == enable)
-   return 0;
-
if (enable) {
ret = pm_runtime_resume_and_get(imx214->dev);
if (ret < 0)

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5693: Drop the unused streaming flag

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5693: Drop the unused streaming flag
Author:  Laurent Pinchart 
Date:Thu Sep 14 20:45:08 2023 +0300

The streaming flag in the driver's private structure is set but never
used. Drop it.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Daniel Scally 
Reviewed-by: Tommaso Merciai 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5693.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 033cf7f14f19..819425e21349 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -154,7 +154,6 @@ struct ov5693_device {
unsigned int inc_y_odd;
unsigned int vts;
} mode;
-   bool streaming;
 
struct v4l2_subdev sd;
struct media_pad pad;
@@ -996,8 +995,6 @@ static int ov5693_s_stream(struct v4l2_subdev *sd, int 
enable)
if (ret)
goto err_power_down;
 
-   ov5693->streaming = !!enable;
-
if (!enable)
pm_runtime_put(ov5693->dev);
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ov5640: fix vblank unchange issue when work at dvp mode

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ov5640: fix vblank unchange issue when work at dvp mode
Author:  Guoniu.zhou 
Date:Wed Jul 19 15:30:12 2023 +0800

The value of V4L2_CID_VBLANK control is initialized to default vblank
value of 640x480 when driver probe. When OV5640 work at DVP mode, the
control value won't update and lead to sensor can't output data if the
resolution remain the same as last time since incorrect total vertical
size. So update it when there is a new value applied.

Fixes: bce93b827de6 ("media: ov5640: Add VBLANK control")
Signed-off-by: Guoniu.zhou 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5640.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

---

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 5fe85aa2d2ec..1c9cda1e7df5 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2850,12 +2850,22 @@ static int ov5640_try_fmt_internal(struct v4l2_subdev 
*sd,
return 0;
 }
 
+static void __v4l2_ctrl_vblank_update(struct ov5640_dev *sensor, u32 vblank)
+{
+   const struct ov5640_mode_info *mode = sensor->current_mode;
+
+   __v4l2_ctrl_modify_range(sensor->ctrls.vblank, OV5640_MIN_VBLANK,
+OV5640_MAX_VTS - mode->height, 1, vblank);
+
+   __v4l2_ctrl_s_ctrl(sensor->ctrls.vblank, vblank);
+}
+
 static int ov5640_update_pixel_rate(struct ov5640_dev *sensor)
 {
const struct ov5640_mode_info *mode = sensor->current_mode;
enum ov5640_pixel_rate_id pixel_rate_id = mode->pixel_rate;
struct v4l2_mbus_framefmt *fmt = >fmt;
-   const struct ov5640_timings *timings;
+   const struct ov5640_timings *timings = ov5640_timings(sensor, mode);
s32 exposure_val, exposure_max;
unsigned int hblank;
unsigned int i = 0;
@@ -2874,6 +2884,8 @@ static int ov5640_update_pixel_rate(struct ov5640_dev 
*sensor)
__v4l2_ctrl_s_ctrl_int64(sensor->ctrls.pixel_rate,
 ov5640_calc_pixel_rate(sensor));
 
+   __v4l2_ctrl_vblank_update(sensor, timings->vblank_def);
+
return 0;
}
 
@@ -2916,15 +2928,12 @@ static int ov5640_update_pixel_rate(struct ov5640_dev 
*sensor)
__v4l2_ctrl_s_ctrl_int64(sensor->ctrls.pixel_rate, pixel_rate);
__v4l2_ctrl_s_ctrl(sensor->ctrls.link_freq, i);
 
-   timings = ov5640_timings(sensor, mode);
hblank = timings->htot - mode->width;
__v4l2_ctrl_modify_range(sensor->ctrls.hblank,
 hblank, hblank, 1, hblank);
 
vblank = timings->vblank_def;
-   __v4l2_ctrl_modify_range(sensor->ctrls.vblank, OV5640_MIN_VBLANK,
-OV5640_MAX_VTS - mode->height, 1, vblank);
-   __v4l2_ctrl_s_ctrl(sensor->ctrls.vblank, vblank);
+   __v4l2_ctrl_vblank_update(sensor, vblank);
 
exposure_max = timings->crop.height + vblank - 4;
exposure_val = clamp_t(s32, sensor->ctrls.exposure->val,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: platform: use capital "OR" for multiple licenses in SPDX

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: platform: use capital "OR" for multiple licenses in SPDX
Author:  Krzysztof Kozlowski 
Date:Wed Aug 23 10:56:10 2023 +0200

Documentation/process/license-rules.rst and checkpatch expect the SPDX
identifier syntax for multiple licenses to use capital "OR".  Correct it
to keep consistent format and avoid copy-paste issues.

Signed-off-by: Krzysztof Kozlowski 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/verisilicon/rockchip_av1_filmgrain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/platform/verisilicon/rockchip_av1_filmgrain.c 
b/drivers/media/platform/verisilicon/rockchip_av1_filmgrain.c
index f2ae84f0b436..f64dea797eff 100644
--- a/drivers/media/platform/verisilicon/rockchip_av1_filmgrain.c
+++ b/drivers/media/platform/verisilicon/rockchip_av1_filmgrain.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0-only or Apache-2.0
+// SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0
 
 #include "rockchip_av1_filmgrain.h"
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx415: Replace streaming flag with runtime PM check

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx415: Replace streaming flag with runtime PM check
Author:  Laurent Pinchart 
Date:Thu Sep 14 20:46:00 2023 +0300

The streaming flag in the driver private structure is used for the sole
purpose of gating register writes when setting a V4L2 control. This is
better handled by checking if the sensor is powered up using the runtime
PM API. Do so and drop the streaming flag.

Signed-off-by: Laurent Pinchart 
[Sakari Ailus: Runtime PM put when setting analgue gain.]
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx415.c | 34 --
 1 file changed, 16 insertions(+), 18 deletions(-)

---

diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index 9a7ac81edc28..b3fa71a16839 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -353,8 +353,6 @@ struct imx415 {
 
const struct imx415_clk_params *clk_params;
 
-   bool streaming;
-
struct v4l2_subdev subdev;
struct media_pad pad;
 
@@ -542,8 +540,9 @@ static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
struct v4l2_subdev_state *state;
unsigned int vmax;
unsigned int flip;
+   int ret;
 
-   if (!sensor->streaming)
+   if (!pm_runtime_get_if_in_use(sensor->dev))
return 0;
 
state = v4l2_subdev_get_locked_active_state(>subdev);
@@ -554,24 +553,33 @@ static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
/* clamp the exposure value to VMAX. */
vmax = format->height + sensor->vblank->cur.val;
ctrl->val = min_t(int, ctrl->val, vmax);
-   return imx415_write(sensor, IMX415_SHR0, vmax - ctrl->val);
+   ret = imx415_write(sensor, IMX415_SHR0, vmax - ctrl->val);
+   break;
 
case V4L2_CID_ANALOGUE_GAIN:
/* analogue gain in 0.3 dB step size */
-   return imx415_write(sensor, IMX415_GAIN_PCG_0, ctrl->val);
+   ret = imx415_write(sensor, IMX415_GAIN_PCG_0, ctrl->val);
+   break;
 
case V4L2_CID_HFLIP:
case V4L2_CID_VFLIP:
flip = (sensor->hflip->val << IMX415_HREVERSE_SHIFT) |
   (sensor->vflip->val << IMX415_VREVERSE_SHIFT);
-   return imx415_write(sensor, IMX415_REVERSE, flip);
+   ret = imx415_write(sensor, IMX415_REVERSE, flip);
+   break;
 
case V4L2_CID_TEST_PATTERN:
-   return imx415_set_testpattern(sensor, ctrl->val);
+   ret = imx415_set_testpattern(sensor, ctrl->val);
+   break;
 
default:
-   return -EINVAL;
+   ret = -EINVAL;
+   break;
}
+
+   pm_runtime_put(sensor->dev);
+
+   return ret;
 }
 
 static const struct v4l2_ctrl_ops imx415_ctrl_ops = {
@@ -766,8 +774,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_mark_last_busy(sensor->dev);
pm_runtime_put_autosuspend(sensor->dev);
 
-   sensor->streaming = false;
-
goto unlock;
}
 
@@ -779,13 +785,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int 
enable)
if (ret)
goto err_pm;
 
-   /*
-* Set streaming to true to ensure __v4l2_ctrl_handler_setup() will set
-* the controls. The flag is reset to false further down if an error
-* occurs.
-*/
-   sensor->streaming = true;
-
ret = __v4l2_ctrl_handler_setup(>ctrls);
if (ret < 0)
goto err_pm;
@@ -807,7 +806,6 @@ err_pm:
 * likely has no other chance to recover.
 */
pm_runtime_put_sync(sensor->dev);
-   sensor->streaming = false;
 
goto unlock;
 }

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: dt-bindings: ov5693: fix maintainer email address

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: dt-bindings: ov5693: fix maintainer email address
Author:  Tommaso Merciai 
Date:Mon Jul 31 23:52:15 2023 +0200

Switch my mail address from a company mail to a personal one.

Signed-off-by: Tommaso Merciai 
Acked-by: Conor Dooley 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml 
b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml
index 6829a4aadd22..3368b3bd8ef2 100644
--- a/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml
@@ -8,7 +8,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Omnivision OV5693/OV5695 CMOS Sensors
 
 maintainers:
-  - Tommaso Merciai 
+  - Tommaso Merciai 
 
 description: |
   The Omnivision OV5693/OV5695 are high performance, 1/4-inch, 5 megapixel, 
CMOS

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ov13b10: Fix some error checking in probe

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ov13b10: Fix some error checking in probe
Author:  Dan Carpenter 
Date:Wed Jul 19 13:16:10 2023 +0300

The "ret = " assignment was missing, so ov13b10_power_on() is not
checked for errors.  Add the assignment.

Fixes: 6e28afd15228 ("media: ov13b10: add PM control support based on power 
resources")
Signed-off-by: Dan Carpenter 
Reviewed-by: Bingbu Cao 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov13b10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c
index dbc642c5995b..8ebdb32dd3db 100644
--- a/drivers/media/i2c/ov13b10.c
+++ b/drivers/media/i2c/ov13b10.c
@@ -1501,7 +1501,7 @@ static int ov13b10_probe(struct i2c_client *client)
 
full_power = acpi_dev_state_d0(>dev);
if (full_power) {
-   ov13b10_power_on(>dev);
+   ret = ov13b10_power_on(>dev);
if (ret) {
dev_err(>dev, "failed to power on\n");
return ret;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: v4l: Fix documentation for 12-bit packed Bayer

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: v4l: Fix documentation for 12-bit packed Bayer
Author:  Suhrid Subramaniam 
Date:Mon Jul 10 18:31:40 2023 -0700

Fix documentation for R13 and R33 low bits.

Signed-off-by: Suhrid Subramaniam 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 Documentation/userspace-api/media/v4l/pixfmt-srggb12p.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/Documentation/userspace-api/media/v4l/pixfmt-srggb12p.rst 
b/Documentation/userspace-api/media/v4l/pixfmt-srggb12p.rst
index b6e79e2f8ce4..7c3810ff783c 100644
--- a/Documentation/userspace-api/media/v4l/pixfmt-srggb12p.rst
+++ b/Documentation/userspace-api/media/v4l/pixfmt-srggb12p.rst
@@ -60,7 +60,7 @@ Each cell is one byte.
   G\ :sub:`10low`\ (bits 3--0)
-  G\ :sub:`12high`
-  R\ :sub:`13high`
-   -  R\ :sub:`13low`\ (bits 3--2)
+   -  R\ :sub:`13low`\ (bits 7--4)
 
   G\ :sub:`12low`\ (bits 3--0)
 -  -  start + 12:
@@ -82,6 +82,6 @@ Each cell is one byte.
   G\ :sub:`30low`\ (bits 3--0)
-  G\ :sub:`32high`
-  R\ :sub:`33high`
-   -  R\ :sub:`33low`\ (bits 3--2)
+   -  R\ :sub:`33low`\ (bits 7--4)
 
   G\ :sub:`32low`\ (bits 3--0)

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: mt9m001: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: mt9m001: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:20 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/mt9m001.c | 6 --
 1 file changed, 6 deletions(-)

---

diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c
index ce9568e8391c..79192cf79d28 100644
--- a/drivers/media/i2c/mt9m001.c
+++ b/drivers/media/i2c/mt9m001.c
@@ -93,7 +93,6 @@ struct mt9m001 {
struct v4l2_ctrl *autoexposure;
struct v4l2_ctrl *exposure;
};
-   bool streaming;
struct mutex mutex;
struct v4l2_rect rect;  /* Sensor window */
struct clk *clk;
@@ -213,9 +212,6 @@ static int mt9m001_s_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
 
-   if (mt9m001->streaming == enable)
-   goto done;
-
if (enable) {
ret = pm_runtime_resume_and_get(>dev);
if (ret < 0)
@@ -239,8 +235,6 @@ static int mt9m001_s_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   mt9m001->streaming = enable;
-done:
mutex_unlock(>mutex);
 
return 0;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx208: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx208: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:11 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx208.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/imx208.c b/drivers/media/i2c/imx208.c
index a6edcae4ef47..e5c2b4752832 100644
--- a/drivers/media/i2c/imx208.c
+++ b/drivers/media/i2c/imx208.c
@@ -714,10 +714,6 @@ static int imx208_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>imx208_mx);
-   if (imx208->streaming == enable) {
-   mutex_unlock(>imx208_mx);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx258: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx258: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:14 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx258.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c
index e196565e846e..4be0422b7cda 100644
--- a/drivers/media/i2c/imx258.c
+++ b/drivers/media/i2c/imx258.c
@@ -1035,10 +1035,6 @@ static int imx258_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (imx258->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx296: Replace streaming flag with runtime PM check

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx296: Replace streaming flag with runtime PM check
Author:  Laurent Pinchart 
Date:Thu Sep 14 20:46:47 2023 +0300

The streaming flag in the driver private structure is used for the sole
purpose of gating register writes when setting a V4L2 control. This is
better handled by checking if the sensor is powered up using the runtime
PM API. Do so and drop the streaming flag.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Tommaso Merciai 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx296.c | 16 +++-
 1 file changed, 3 insertions(+), 13 deletions(-)

---

diff --git a/drivers/media/i2c/imx296.c b/drivers/media/i2c/imx296.c
index 3b4539b622b4..94aac9d2732f 100644
--- a/drivers/media/i2c/imx296.c
+++ b/drivers/media/i2c/imx296.c
@@ -201,8 +201,6 @@ struct imx296 {
const struct imx296_clk_params *clk_params;
bool mono;
 
-   bool streaming;
-
struct v4l2_subdev subdev;
struct media_pad pad;
 
@@ -321,7 +319,7 @@ static int imx296_s_ctrl(struct v4l2_ctrl *ctrl)
unsigned int vmax;
int ret = 0;
 
-   if (!sensor->streaming)
+   if (!pm_runtime_get_if_in_use(sensor->dev))
return 0;
 
state = v4l2_subdev_get_locked_active_state(>subdev);
@@ -376,6 +374,8 @@ static int imx296_s_ctrl(struct v4l2_ctrl *ctrl)
break;
}
 
+   pm_runtime_put(sensor->dev);
+
return ret;
 }
 
@@ -607,8 +607,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_mark_last_busy(sensor->dev);
pm_runtime_put_autosuspend(sensor->dev);
 
-   sensor->streaming = false;
-
goto unlock;
}
 
@@ -620,13 +618,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int 
enable)
if (ret < 0)
goto err_pm;
 
-   /*
-* Set streaming to true to ensure __v4l2_ctrl_handler_setup() will set
-* the controls. The flag is reset to false further down if an error
-* occurs.
-*/
-   sensor->streaming = true;
-
ret = __v4l2_ctrl_handler_setup(>ctrls);
if (ret < 0)
goto err_pm;
@@ -646,7 +637,6 @@ err_pm:
 * likely has no other chance to recover.
 */
pm_runtime_put_sync(sensor->dev);
-   sensor->streaming = false;
 
goto unlock;
 }

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx415: Use v4l2_subdev_get_fmt()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx415: Use v4l2_subdev_get_fmt()
Author:  Umang Jain 
Date:Wed Aug 30 10:23:23 2023 +0530

The imx415 driver uses the subdev active state, there's
no need to implement the .get_fmt() operation manually. Use
the v4l2_subdev_get_fmt() helper instead.

Signed-off-by: Umang Jain 
Reviewed-by: Michael Riesch 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx415.c | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

---

diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index 3f00172df3cc..9a7ac81edc28 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -842,15 +842,6 @@ static int imx415_enum_frame_size(struct v4l2_subdev *sd,
return 0;
 }
 
-static int imx415_get_format(struct v4l2_subdev *sd,
-struct v4l2_subdev_state *state,
-struct v4l2_subdev_format *fmt)
-{
-   fmt->format = *v4l2_subdev_get_pad_format(sd, state, fmt->pad);
-
-   return 0;
-}
-
 static int imx415_set_format(struct v4l2_subdev *sd,
 struct v4l2_subdev_state *state,
 struct v4l2_subdev_format *fmt)
@@ -913,7 +904,7 @@ static const struct v4l2_subdev_video_ops 
imx415_subdev_video_ops = {
 static const struct v4l2_subdev_pad_ops imx415_subdev_pad_ops = {
.enum_mbus_code = imx415_enum_mbus_code,
.enum_frame_size = imx415_enum_frame_size,
-   .get_fmt = imx415_get_format,
+   .get_fmt = v4l2_subdev_get_fmt,
.set_fmt = imx415_set_format,
.get_selection = imx415_get_selection,
.init_cfg = imx415_init_cfg,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx355: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx355: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:18 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx355.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
index 9c79ae8dc842..43c09941704e 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -1436,10 +1436,6 @@ static int imx355_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (imx355->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: max9286: Fix some redundant of_node_put() calls

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: max9286: Fix some redundant of_node_put() calls
Author:  Christophe JAILLET 
Date:Sat Aug 26 00:13:40 2023 +0200

This is odd to have a of_node_put() just after a for_each_child_of_node()
or a for_each_endpoint_of_node() loop. It should already be called
during the last iteration.

Remove these calls.

Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver")
Signed-off-by: Christophe JAILLET 
Reviewed-by: Jacopo Mondi 
Reviewed-by: Laurent Pinchart 
Reviewed-by: Kieran Bingham 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/max9286.c | 2 --
 1 file changed, 2 deletions(-)

---

diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index 20e7c7cf5eeb..f27a69b1b727 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -1450,7 +1450,6 @@ static int max9286_parse_dt(struct max9286_priv *priv)
 
i2c_mux_mask |= BIT(id);
}
-   of_node_put(node);
of_node_put(i2c_mux);
 
/* Parse the endpoints */
@@ -1514,7 +1513,6 @@ static int max9286_parse_dt(struct max9286_priv *priv)
priv->source_mask |= BIT(ep.port);
priv->nsources++;
}
-   of_node_put(node);
 
of_property_read_u32(dev->of_node, "maxim,bus-width", >bus_width);
switch (priv->bus_width) {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: og01a1b: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: og01a1b: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:21 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/og01a1b.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c
index ccf6731ea2e2..956ad3e996b6 100644
--- a/drivers/media/i2c/og01a1b.c
+++ b/drivers/media/i2c/og01a1b.c
@@ -732,9 +732,6 @@ static int og01a1b_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (og01a1b->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: hi846: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: hi846: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:10 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/hi846.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/hi846.c b/drivers/media/i2c/hi846.c
index 8a8ae89a8453..7fbcc3ff044b 100644
--- a/drivers/media/i2c/hi846.c
+++ b/drivers/media/i2c/hi846.c
@@ -1607,9 +1607,6 @@ static int hi846_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (hi846->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
 
if (enable) {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ivsc: ace: probe ace device after IPU bridge is initialized.

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ivsc: ace: probe ace device after IPU bridge is initialized.
Author:  Wentong Wu 
Date:Tue Aug 29 13:24:28 2023 +0800

During probe ivsc ace device, acpi_dev_clear_dependencies() will be
called to clear the consumer and supplier relationship between camera
sensor device and ivsc device. But IPU bridge will setup the connection
swnodes for ivsc device and camera sensor device based on this consumer
and supplier relationship. This patch defers ivsc ace's probe to make
sure IPU bridge is initialized before this consumer and supplier
relationship between camera sensor device and IVSC device is cleared.

Signed-off-by: Wentong Wu 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/intel/ivsc/mei_ace.c | 3 +++
 1 file changed, 3 insertions(+)

---

diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c 
b/drivers/media/pci/intel/ivsc/mei_ace.c
index d4ecc2b4a7f0..3622271c71c8 100644
--- a/drivers/media/pci/intel/ivsc/mei_ace.c
+++ b/drivers/media/pci/intel/ivsc/mei_ace.c
@@ -406,6 +406,9 @@ static int mei_ace_setup_dev_link(struct mei_ace *ace)
if (!csi_dev) {
ret = -EPROBE_DEFER;
goto err;
+   } else if (!dev_fwnode(csi_dev)) {
+   ret = -EPROBE_DEFER;
+   goto err_put;
}
 
/* setup link between mei_ace and mei_csi */

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx334: add support for test pattern generator

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx334: add support for test pattern generator
Author:  Shravan Chippa 
Date:Fri Aug 4 20:45:41 2023 +0530

Add support for the imx334's test pattern generator.
By default the test pattern generator is disabled, so add support for
enabling and disabling horizontal and vertical colour bars.

Signed-off-by: Shravan Chippa 
Acked-by: Daniele Alessandrelli 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx334.c | 57 +-
 1 file changed, 56 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index d722c9b7cd31..91c79af70734 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -56,6 +56,24 @@
 #define IMX334_REG_MIN 0x00
 #define IMX334_REG_MAX 0xf
 
+/* Test Pattern Control */
+#define IMX334_REG_TP  0x329e
+#define IMX334_TP_COLOR_HBARS  0xA
+#define IMX334_TP_COLOR_VBARS  0xB
+
+#define IMX334_TPG_EN_DOUT 0x329c
+#define IMX334_TP_ENABLE   0x1
+#define IMX334_TP_DISABLE  0x0
+
+#define IMX334_TPG_COLORW  0x32a0
+#define IMX334_TPG_COLORW_120P 0x13
+
+#define IMX334_TP_CLK_EN   0x3148
+#define IMX334_TP_CLK_EN_VAL   0x10
+#define IMX334_TP_CLK_DIS_VAL  0x0
+
+#define IMX334_DIG_CLP_MODE0x3280
+
 /**
  * struct imx334_reg - imx334 sensor register
  * @address: Register address
@@ -430,6 +448,18 @@ static const struct imx334_reg mode_3840x2160_regs[] = {
{0x3a29, 0x00},
 };
 
+static const char * const imx334_test_pattern_menu[] = {
+   "Disabled",
+   "Vertical Color Bars",
+   "Horizontal Color Bars",
+};
+
+static const int imx334_test_pattern_val[] = {
+   IMX334_TP_DISABLE,
+   IMX334_TP_COLOR_HBARS,
+   IMX334_TP_COLOR_VBARS,
+};
+
 static const struct imx334_reg raw10_framefmt_regs[] = {
{0x3050, 0x00},
{0x319d, 0x00},
@@ -716,6 +746,26 @@ static int imx334_set_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_HBLANK:
ret = 0;
break;
+   case V4L2_CID_TEST_PATTERN:
+   if (ctrl->val) {
+   imx334_write_reg(imx334, IMX334_TP_CLK_EN, 1,
+IMX334_TP_CLK_EN_VAL);
+   imx334_write_reg(imx334, IMX334_DIG_CLP_MODE, 1, 0x0);
+   imx334_write_reg(imx334, IMX334_TPG_COLORW, 1,
+IMX334_TPG_COLORW_120P);
+   imx334_write_reg(imx334, IMX334_REG_TP, 1,
+imx334_test_pattern_val[ctrl->val]);
+   imx334_write_reg(imx334, IMX334_TPG_EN_DOUT, 1,
+IMX334_TP_ENABLE);
+   } else {
+   imx334_write_reg(imx334, IMX334_DIG_CLP_MODE, 1, 0x1);
+   imx334_write_reg(imx334, IMX334_TP_CLK_EN, 1,
+IMX334_TP_CLK_DIS_VAL);
+   imx334_write_reg(imx334, IMX334_TPG_EN_DOUT, 1,
+IMX334_TP_DISABLE);
+   }
+   ret = 0;
+   break;
default:
dev_err(imx334->dev, "Invalid control %d", ctrl->id);
ret = -EINVAL;
@@ -1222,7 +1272,7 @@ static int imx334_init_controls(struct imx334 *imx334)
u32 lpfr;
int ret;
 
-   ret = v4l2_ctrl_handler_init(ctrl_hdlr, 6);
+   ret = v4l2_ctrl_handler_init(ctrl_hdlr, 7);
if (ret)
return ret;
 
@@ -1282,6 +1332,11 @@ static int imx334_init_controls(struct imx334 *imx334)
if (imx334->hblank_ctrl)
imx334->hblank_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
 
+   v4l2_ctrl_new_std_menu_items(ctrl_hdlr, _ctrl_ops,
+V4L2_CID_TEST_PATTERN,
+ARRAY_SIZE(imx334_test_pattern_menu) - 1,
+0, 0, imx334_test_pattern_menu);
+
if (ctrl_hdlr->error) {
dev_err(imx334->dev, "control init failed: %d",
ctrl_hdlr->error);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: v4l2-mc: Make v4l2_pipeline_pm_{get, put} deprecated

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: v4l2-mc: Make v4l2_pipeline_pm_{get,put} deprecated
Author:  Sakari Ailus 
Date:Wed Aug 23 12:03:42 2023 +0300

The v4l2_pipeline_pm_get() and v4l2_pipeline_pm_put() functions were
needed to control sub-devices' power states before runtime PM. These
functions should no longer be used, and instead sub-device drivers should
use runtime PM.

Signed-off-by: Sakari Ailus 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Hans Verkuil 

 include/media/v4l2-mc.h | 6 ++
 1 file changed, 6 insertions(+)

---

diff --git a/include/media/v4l2-mc.h b/include/media/v4l2-mc.h
index b39586dfba35..ed0a44b6eada 100644
--- a/include/media/v4l2-mc.h
+++ b/include/media/v4l2-mc.h
@@ -143,6 +143,9 @@ int v4l2_create_fwnode_links(struct v4l2_subdev *src_sd,
  * v4l2_pipeline_pm_get - Increase the use count of a pipeline
  * @entity: The root entity of a pipeline
  *
+ * THIS FUNCTION IS DEPRECATED. DO NOT USE IN NEW DRIVERS. USE RUNTIME PM
+ * ON SUB-DEVICE DRIVERS INSTEAD.
+ *
  * Update the use count of all entities in the pipeline and power entities on.
  *
  * This function is intended to be called in video node open. It uses
@@ -157,6 +160,9 @@ int v4l2_pipeline_pm_get(struct media_entity *entity);
  * v4l2_pipeline_pm_put - Decrease the use count of a pipeline
  * @entity: The root entity of a pipeline
  *
+ * THIS FUNCTION IS DEPRECATED. DO NOT USE IN NEW DRIVERS. USE RUNTIME PM
+ * ON SUB-DEVICE DRIVERS INSTEAD.
+ *
  * Update the use count of all entities in the pipeline and power entities off.
  *
  * This function is intended to be called in video node release. It uses

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx334: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx334: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:16 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx334.c | 9 -
 1 file changed, 9 deletions(-)

---

diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index 91c79af70734..1196fe93506b 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -138,7 +138,6 @@ struct imx334_mode {
  * @mutex: Mutex for serializing sensor controls
  * @menu_skip_mask: Menu skip mask for link_freq_ctrl
  * @cur_code: current selected format code
- * @streaming: Flag indicating streaming state
  */
 struct imx334 {
struct device *dev;
@@ -161,7 +160,6 @@ struct imx334 {
struct mutex mutex;
unsigned long menu_skip_mask;
u32 cur_code;
-   bool streaming;
 };
 
 static const s64 link_freq[] = {
@@ -1051,11 +1049,6 @@ static int imx334_set_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
 
-   if (imx334->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
-
if (enable) {
ret = pm_runtime_resume_and_get(imx334->dev);
if (ret < 0)
@@ -1069,8 +1062,6 @@ static int imx334_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(imx334->dev);
}
 
-   imx334->streaming = enable;
-
mutex_unlock(>mutex);
 
return 0;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ivsc: Improve Kconfig help text

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ivsc: Improve Kconfig help text
Author:  Sakari Ailus 
Date:Fri Aug 4 09:23:22 2023 +0300

Improve the Kconfig help text to convey the ACE is for changing camera
sensor ownership and CSI for configuring the CSI-2 rx and tx.

Suggested-by: Laurent Pinchart 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/pci/intel/ivsc/Kconfig | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/pci/intel/ivsc/Kconfig 
b/drivers/media/pci/intel/ivsc/Kconfig
index 212753450576..0acea4678fc0 100644
--- a/drivers/media/pci/intel/ivsc/Kconfig
+++ b/drivers/media/pci/intel/ivsc/Kconfig
@@ -10,6 +10,12 @@ config INTEL_VSC
help
  This adds support for Intel Visual Sensing Controller (IVSC).
 
- Enables the IVSC firmware services required for controlling
- camera sensor ownership and CSI-2 link through Image Processing
- Unit(IPU) driver of Intel.
+ The IVSC support is split into two devices, ACE (Algorithm
+ Context Engine) and CSI (Camera Serial Interface), each of which
+ have their own drivers. The ACE is used to select the ownership
+ of the sensor between the IVSC and the host CPU while the CSI is
+ used to both select the routing destination for the data the
+ sensor transmits over the CSI-2 bus between the IVSC and the
+ host CPU and to configure the CSI-2 bus itself.
+
+ The modules will be called ivsc-ace and ivsc-csi.

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: Documentation: Mention CCS tools

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: Documentation: Mention CCS tools
Author:  Sakari Ailus 
Date:Fri Sep 15 01:01:24 2023 +0300

CCS tools is a useful set of programs and libraries for working with CCS
static data. Do mention that in context of the CCS driver.

Signed-off-by: Sakari Ailus 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Hans Verkuil 

 Documentation/driver-api/media/drivers/ccs/ccs.rst | 8 
 1 file changed, 8 insertions(+)

---

diff --git a/Documentation/driver-api/media/drivers/ccs/ccs.rst 
b/Documentation/driver-api/media/drivers/ccs/ccs.rst
index 7389204afcb8..0468b9413a31 100644
--- a/Documentation/driver-api/media/drivers/ccs/ccs.rst
+++ b/Documentation/driver-api/media/drivers/ccs/ccs.rst
@@ -78,6 +78,14 @@ For SMIA (non-++) compliant devices the static data file 
name is
  or vv denotes MIPI and SMIA manufacturer IDs respectively,  model ID
 and  or rr revision number.
 
+CCS tools
+~
+
+`CCS tools `_ is a set of
+tools for working with CCS static data files. CCS tools includes a
+definition of the human-readable CCS static data YAML format and includes a
+program to convert it to a binary.
+
 Register definition generator
 -
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx219: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx219: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:13 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Dave Stevenson 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx219.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index a1136fdfbed2..5715bbbc0820 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -979,9 +979,6 @@ static int imx219_set_stream(struct v4l2_subdev *sd, int 
enable)
 
state = v4l2_subdev_lock_and_get_active_state(sd);
 
-   if (imx219->streaming == enable)
-   goto unlock;
-
if (enable) {
/*
 * Apply default & customized values

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx335: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx335: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:17 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx335.c | 9 -
 1 file changed, 9 deletions(-)

---

diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
index 482a0b7f040a..ec729126274b 100644
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -119,7 +119,6 @@ struct imx335_mode {
  * @vblank: Vertical blanking in lines
  * @cur_mode: Pointer to current selected sensor mode
  * @mutex: Mutex for serializing sensor controls
- * @streaming: Flag indicating streaming state
  */
 struct imx335 {
struct device *dev;
@@ -140,7 +139,6 @@ struct imx335 {
u32 vblank;
const struct imx335_mode *cur_mode;
struct mutex mutex;
-   bool streaming;
 };
 
 static const s64 link_freq[] = {
@@ -705,11 +703,6 @@ static int imx335_set_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
 
-   if (imx335->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
-
if (enable) {
ret = pm_runtime_resume_and_get(imx335->dev);
if (ret)
@@ -723,8 +716,6 @@ static int imx335_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(imx335->dev);
}
 
-   imx335->streaming = enable;
-
mutex_unlock(>mutex);
 
return 0;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: ov13b10: Add 1364x768 register settings

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ov13b10: Add 1364x768 register settings
Author:  Hao Yao 
Date:Fri Sep 15 16:45:27 2023 +0800

This commit adds support for:

- 1364x768 at 120 FPS

Signed-off-by: Hao Yao 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov13b10.c | 58 -
 1 file changed, 57 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c
index 8ebdb32dd3db..c8e0818476ab 100644
--- a/drivers/media/i2c/ov13b10.c
+++ b/drivers/media/i2c/ov13b10.c
@@ -31,6 +31,7 @@
 #define OV13B10_REG_VTS0x380e
 #define OV13B10_VTS_30FPS  0x0c7c
 #define OV13B10_VTS_60FPS  0x063e
+#define OV13B10_VTS_120FPS 0x0320
 #define OV13B10_VTS_MAX0x7fff
 
 /* HBLANK control - read only */
@@ -468,6 +469,50 @@ static const struct ov13b10_reg mode_2080x1170_regs[] = {
{0x5001, 0x0d},
 };
 
+static const struct ov13b10_reg mode_1364x768_120fps_regs[] = {
+   {0x0305, 0xaf},
+   {0x3011, 0x7c},
+   {0x3501, 0x03},
+   {0x3502, 0x00},
+   {0x3662, 0x88},
+   {0x3714, 0x28},
+   {0x3739, 0x10},
+   {0x37c2, 0x14},
+   {0x37d9, 0x06},
+   {0x37e2, 0x0c},
+   {0x37e4, 0x00},
+   {0x3800, 0x02},
+   {0x3801, 0xe4},
+   {0x3802, 0x03},
+   {0x3803, 0x48},
+   {0x3804, 0x0d},
+   {0x3805, 0xab},
+   {0x3806, 0x09},
+   {0x3807, 0x60},
+   {0x3808, 0x05},
+   {0x3809, 0x54},
+   {0x380a, 0x03},
+   {0x380b, 0x00},
+   {0x380c, 0x04},
+   {0x380d, 0x8e},
+   {0x380e, 0x03},
+   {0x380f, 0x20},
+   {0x3811, 0x07},
+   {0x3813, 0x07},
+   {0x3814, 0x03},
+   {0x3816, 0x03},
+   {0x3820, 0x8b},
+   {0x3c8c, 0x18},
+   {0x4008, 0x00},
+   {0x4009, 0x05},
+   {0x4050, 0x00},
+   {0x4051, 0x05},
+   {0x4501, 0x08},
+   {0x4505, 0x04},
+   {0x5000, 0xfd},
+   {0x5001, 0x0d},
+};
+
 static const char * const ov13b10_test_pattern_menu[] = {
"Disabled",
"Vertical Color Bar Type 1",
@@ -568,7 +613,18 @@ static const struct ov13b10_mode supported_modes[] = {
.regs = mode_2080x1170_regs,
},
.link_freq_index = OV13B10_LINK_FREQ_INDEX_0,
-   }
+   },
+   {
+   .width = 1364,
+   .height = 768,
+   .vts_def = OV13B10_VTS_120FPS,
+   .vts_min = OV13B10_VTS_120FPS,
+   .link_freq_index = OV13B10_LINK_FREQ_INDEX_0,
+   .reg_list = {
+   .num_of_regs = ARRAY_SIZE(mode_1364x768_120fps_regs),
+   .regs = mode_1364x768_120fps_regs,
+   },
+   },
 };
 
 struct ov13b10 {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: v4l2-subdev: Document and enforce .s_stream() requirements

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: v4l2-subdev: Document and enforce .s_stream() requirements
Author:  Laurent Pinchart 
Date:Mon Sep 18 15:48:38 2023 +0300

The subdev .s_stream() operation must not be called to start an already
started subdev, or stop an already stopped one. This requirement has
never been formally documented. Fix it, and catch possible offenders
with a WARN_ON() in the call_s_stream() wrapper.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/v4l2-core/v4l2-subdev.c | 17 -
 include/media/v4l2-subdev.h   |  4 +++-
 2 files changed, 19 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c 
b/drivers/media/v4l2-core/v4l2-subdev.c
index b92348ad61f6..32b7d9cd43e6 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -359,6 +359,18 @@ static int call_s_stream(struct v4l2_subdev *sd, int 
enable)
 {
int ret;
 
+   /*
+* The .s_stream() operation must never be called to start or stop an
+* already started or stopped subdev. Catch offenders but don't return
+* an error yet to avoid regressions.
+*
+* As .s_stream() is mutually exclusive with the .enable_streams() and
+* .disable_streams() operation, we can use the enabled_streams field
+* to store the subdev streaming state.
+*/
+   if (WARN_ON(!!sd->enabled_streams == !!enable))
+   return 0;
+
 #if IS_REACHABLE(CONFIG_LEDS_CLASS)
if (!IS_ERR_OR_NULL(sd->privacy_led)) {
if (enable)
@@ -372,9 +384,12 @@ static int call_s_stream(struct v4l2_subdev *sd, int 
enable)
 
if (!enable && ret < 0) {
dev_warn(sd->dev, "disabling streaming failed (%d)\n", ret);
-   return 0;
+   ret = 0;
}
 
+   if (!ret)
+   sd->enabled_streams = enable ? BIT(0) : 0;
+
return ret;
 }
 
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 820e38ec3dc9..5f59ff0796b7 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -446,7 +446,9 @@ enum v4l2_subdev_pre_streamon_flags {
  * @s_stream: start (enabled == 1) or stop (enabled == 0) streaming on the
  * sub-device. Failure on stop will remove any resources acquired in
  * streaming start, while the error code is still returned by the driver.
- * Also see call_s_stream wrapper in v4l2-subdev.c.
+ * The caller shall track the subdev state, and shall not start or stop an
+ * already started or stopped subdev. Also see call_s_stream wrapper in
+ * v4l2-subdev.c.
  *
  * @g_pixelaspect: callback to return the pixelaspect ratio.
  *

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: hi556: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: hi556: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:09 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/hi556.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
index fd56ba138739..2b00426c5826 100644
--- a/drivers/media/i2c/hi556.c
+++ b/drivers/media/i2c/hi556.c
@@ -976,9 +976,6 @@ static int hi556_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (hi556->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: staging: ipu3-imgu: Initialise height_per_slice in the stripes

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: staging: ipu3-imgu: Initialise height_per_slice in the stripes
Author:  Jean-Michel Hautbois 
Date:Thu Sep 16 19:25:04 2021 +0200

While playing with low resolutions for the grid, it appeared that
height_per_slice is not initialised if we are not using both stripes for
the calculations. This pattern occurs three times:
- for the awb_fr processing block
- for the af processing block
- for the awb processing block

The idea of this small portion of code is to reduce complexity in
loading the statistics, it could be done also when only one stripe is
used. Fix it by getting this initialisation code outside of the else()
test case.

Signed-off-by: Jean-Michel Hautbois 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/staging/media/ipu3/ipu3-css-params.c | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

---

diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c 
b/drivers/staging/media/ipu3/ipu3-css-params.c
index 76ad802d694e..34f574b0b521 100644
--- a/drivers/staging/media/ipu3/ipu3-css-params.c
+++ b/drivers/staging/media/ipu3/ipu3-css-params.c
@@ -2425,16 +2425,16 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int 
pipe,
acc->awb_fr.stripes[1].grid_cfg.width,
b_w_log2);
acc->awb_fr.stripes[1].grid_cfg.x_end = end;
-
-   /*
-* To reduce complexity of debubbling and loading
-* statistics fix grid_height_per_slice to 1 for both
-* stripes.
-*/
-   for (i = 0; i < stripes; i++)
-   acc->awb_fr.stripes[i].grid_cfg.height_per_slice = 1;
}
 
+   /*
+* To reduce complexity of debubbling and loading
+* statistics fix grid_height_per_slice to 1 for both
+* stripes.
+*/
+   for (i = 0; i < stripes; i++)
+   acc->awb_fr.stripes[i].grid_cfg.height_per_slice = 1;
+
if (imgu_css_awb_fr_ops_calc(css, pipe, >awb_fr))
return -EINVAL;
 
@@ -2597,15 +2597,15 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int 
pipe,
imgu_css_grid_end(acc->af.stripes[1].grid_cfg.x_start,
  acc->af.stripes[1].grid_cfg.width,
  b_w_log2);
-
-   /*
-* To reduce complexity of debubbling and loading statistics
-* fix grid_height_per_slice to 1 for both stripes
-*/
-   for (i = 0; i < stripes; i++)
-   acc->af.stripes[i].grid_cfg.height_per_slice = 1;
}
 
+   /*
+* To reduce complexity of debubbling and loading statistics
+* fix grid_height_per_slice to 1 for both stripes
+*/
+   for (i = 0; i < stripes; i++)
+   acc->af.stripes[i].grid_cfg.height_per_slice = 1;
+
if (imgu_css_af_ops_calc(css, pipe, >af))
return -EINVAL;
 
@@ -2677,15 +2677,15 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int 
pipe,
imgu_css_grid_end(acc->awb.stripes[1].grid.x_start,
  acc->awb.stripes[1].grid.width,
  b_w_log2);
-
-   /*
-* To reduce complexity of debubbling and loading statistics
-* fix grid_height_per_slice to 1 for both stripes
-*/
-   for (i = 0; i < stripes; i++)
-   acc->awb.stripes[i].grid.height_per_slice = 1;
}
 
+   /*
+* To reduce complexity of debubbling and loading statistics
+* fix grid_height_per_slice to 1 for both stripes
+*/
+   for (i = 0; i < stripes; i++)
+   acc->awb.stripes[i].grid.height_per_slice = 1;
+
if (imgu_css_awb_ops_calc(css, pipe, >awb))
return -EINVAL;
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: mt9v032: Drop CONFIG_OF ifdeffery

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: mt9v032: Drop CONFIG_OF ifdeffery
Author:  Biju Das 
Date:Sun Sep 10 17:54:32 2023 +0100

Drop of_match_ptr() from mt9v032_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of mt9v032_driver on non-OF
system and shouldn't be an issue.

Add mod_devicetable.h include.

It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.

Signed-off-by: Biju Das 
Reviewed-by: Jacopo Mondi 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/mt9v032.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
index 0f448aa27e53..1c6f6cea1204 100644
--- a/drivers/media/i2c/mt9v032.c
+++ b/drivers/media/i2c/mt9v032.c
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1275,7 +1276,6 @@ static const struct i2c_device_id mt9v032_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, mt9v032_id);
 
-#if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id mt9v032_of_match[] = {
{ .compatible = "aptina,mt9v022", .data = 
_models[MT9V032_MODEL_V022_COLOR] },
{ .compatible = "aptina,mt9v022m", .data = 
_models[MT9V032_MODEL_V022_MONO] },
@@ -1288,12 +1288,11 @@ static const struct of_device_id mt9v032_of_match[] = {
{ /* Sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mt9v032_of_match);
-#endif
 
 static struct i2c_driver mt9v032_driver = {
.driver = {
.name = "mt9v032",
-   .of_match_table = of_match_ptr(mt9v032_of_match),
+   .of_match_table = mt9v032_of_match,
},
.probe  = mt9v032_probe,
.remove = mt9v032_remove,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov08d10: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov08d10: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:23 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov08d10.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c
index 7d55d4ca24de..ef811711549c 100644
--- a/drivers/media/i2c/ov08d10.c
+++ b/drivers/media/i2c/ov08d10.c
@@ -1103,9 +1103,6 @@ static int ov08d10_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (ov08d10->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov13b10: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov13b10: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:26 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov13b10.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c
index c8e0818476ab..32c598ed7752 100644
--- a/drivers/media/i2c/ov13b10.c
+++ b/drivers/media/i2c/ov13b10.c
@@ -1217,10 +1217,6 @@ static int ov13b10_set_stream(struct v4l2_subdev *sd, 
int enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (ov13b->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov8856: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov8856: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:35 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov8856.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
index f053c3a7676a..5447a3361976 100644
--- a/drivers/media/i2c/ov8856.c
+++ b/drivers/media/i2c/ov8856.c
@@ -2042,9 +2042,6 @@ static int ov8856_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (ov8856->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5670: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5670: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:31 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5670.c | 2 --
 1 file changed, 2 deletions(-)

---

diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c
index 29e773a997dd..afd84c8e5ee7 100644
--- a/drivers/media/i2c/ov5670.c
+++ b/drivers/media/i2c/ov5670.c
@@ -2471,8 +2471,6 @@ static int ov5670_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (ov5670->streaming == enable)
-   goto unlock_and_return;
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5675: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5675: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:32 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5675.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
index d5a2a5f82312..f608ee0c0cec 100644
--- a/drivers/media/i2c/ov5675.c
+++ b/drivers/media/i2c/ov5675.c
@@ -949,9 +949,6 @@ static int ov5675_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (ov5675->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov4689: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov4689: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:29 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Mikhail Rudenko 
[Sakari Ailus: remove now-redundant "streaming" from comment.]
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov4689.c | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

---

diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
index fda217d2cb10..3bd972a822e7 100644
--- a/drivers/media/i2c/ov4689.c
+++ b/drivers/media/i2c/ov4689.c
@@ -99,8 +99,7 @@ struct ov4689 {
 
u32 clock_rate;
 
-   struct mutex mutex; /* lock to protect streaming, ctrls and cur_mode */
-   bool streaming;
+   struct mutex mutex; /* lock to protect ctrls and cur_mode */
struct v4l2_ctrl_handler ctrl_handler;
struct v4l2_ctrl *exposure;
 
@@ -468,10 +467,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
 
mutex_lock(>mutex);
 
-   on = !!on;
-   if (on == ov4689->streaming)
-   goto unlock_and_return;
-
if (on) {
ret = pm_runtime_resume_and_get(>dev);
if (ret < 0)
@@ -504,8 +499,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
pm_runtime_put(>dev);
}
 
-   ov4689->streaming = on;
-
 unlock_and_return:
mutex_unlock(>mutex);
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov08x40: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov08x40: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:57 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov08x40.c | 40 
 1 file changed, 40 deletions(-)

---

diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c
index 1ea402550837..b41b6866a0ab 100644
--- a/drivers/media/i2c/ov08x40.c
+++ b/drivers/media/i2c/ov08x40.c
@@ -2432,9 +2432,6 @@ struct ov08x40 {
 
/* Mutex for serialized access */
struct mutex mutex;
-
-   /* Streaming on/off */
-   bool streaming;
 };
 
 #define to_ov08x40(_sd)container_of(_sd, struct ov08x40, sd)
@@ -2933,7 +2930,6 @@ static int ov08x40_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov08x->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
@@ -2946,37 +2942,6 @@ err_unlock:
return ret;
 }
 
-static int __maybe_unused ov08x40_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov08x40 *ov08x = to_ov08x40(sd);
-
-   if (ov08x->streaming)
-   ov08x40_stop_streaming(ov08x);
-
-   return 0;
-}
-
-static int __maybe_unused ov08x40_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov08x40 *ov08x = to_ov08x40(sd);
-   int ret;
-
-   if (ov08x->streaming) {
-   ret = ov08x40_start_streaming(ov08x);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   ov08x40_stop_streaming(ov08x);
-   ov08x->streaming = false;
-   return ret;
-}
-
 /* Verify chip ID */
 static int ov08x40_identify_module(struct ov08x40 *ov08x)
 {
@@ -3290,10 +3255,6 @@ static void ov08x40_remove(struct i2c_client *client)
pm_runtime_set_suspended(>dev);
 }
 
-static const struct dev_pm_ops ov08x40_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov08x40_suspend, ov08x40_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id ov08x40_acpi_ids[] = {
{"OVTI08F4"},
@@ -3306,7 +3267,6 @@ MODULE_DEVICE_TABLE(acpi, ov08x40_acpi_ids);
 static struct i2c_driver ov08x40_i2c_driver = {
.driver = {
.name = "ov08x40",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(ov08x40_acpi_ids),
},
.probe = ov08x40_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov08x40: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov08x40: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:24 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov08x40.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c
index 637da4df6901..1ea402550837 100644
--- a/drivers/media/i2c/ov08x40.c
+++ b/drivers/media/i2c/ov08x40.c
@@ -2915,10 +2915,6 @@ static int ov08x40_set_stream(struct v4l2_subdev *sd, 
int enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (ov08x->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov7740: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov7740: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:34 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov7740.c | 7 ---
 1 file changed, 7 deletions(-)

---

diff --git a/drivers/media/i2c/ov7740.c b/drivers/media/i2c/ov7740.c
index 78d04ce68971..356a45e65b81 100644
--- a/drivers/media/i2c/ov7740.c
+++ b/drivers/media/i2c/ov7740.c
@@ -118,7 +118,6 @@ struct ov7740 {
struct v4l2_ctrl *contrast;
 
struct mutex mutex; /* To serialize asynchronus callbacks */
-   bool streaming; /* Streaming on/off */
 
struct gpio_desc *resetb_gpio;
struct gpio_desc *pwdn_gpio;
@@ -616,10 +615,6 @@ static int ov7740_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (ov7740->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);
@@ -633,8 +628,6 @@ static int ov7740_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov7740->streaming = enable;
-
mutex_unlock(>mutex);
return ret;
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx214: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx214: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:48 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Ricardo Ribalda 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx214.c | 37 -
 1 file changed, 37 deletions(-)

---

diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
index e2805173f4b1..4f77ea02cc27 100644
--- a/drivers/media/i2c/imx214.c
+++ b/drivers/media/i2c/imx214.c
@@ -58,8 +58,6 @@ struct imx214 {
 * and start streaming.
 */
struct mutex mutex;
-
-   bool streaming;
 };
 
 struct reg_8 {
@@ -790,7 +788,6 @@ static int imx214_s_stream(struct v4l2_subdev *subdev, int 
enable)
pm_runtime_put(imx214->dev);
}
 
-   imx214->streaming = enable;
return 0;
 
 err_rpm_put:
@@ -906,39 +903,6 @@ done:
return ret;
 }
 
-static int __maybe_unused imx214_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct imx214 *imx214 = to_imx214(sd);
-
-   if (imx214->streaming)
-   imx214_stop_streaming(imx214);
-
-   return 0;
-}
-
-static int __maybe_unused imx214_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct imx214 *imx214 = to_imx214(sd);
-   int ret;
-
-   if (imx214->streaming) {
-   ret = imx214_start_streaming(imx214);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   imx214_stop_streaming(imx214);
-   imx214->streaming = 0;
-   return ret;
-}
-
 static int imx214_probe(struct i2c_client *client)
 {
struct device *dev = >dev;
@@ -1099,7 +1063,6 @@ static const struct of_device_id imx214_of_match[] = {
 MODULE_DEVICE_TABLE(of, imx214_of_match);
 
 static const struct dev_pm_ops imx214_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(imx214_suspend, imx214_resume)
SET_RUNTIME_PM_OPS(imx214_power_off, imx214_power_on, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov13858: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov13858: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:25 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov13858.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c
index 35652b362347..b90ce338a47a 100644
--- a/drivers/media/i2c/ov13858.c
+++ b/drivers/media/i2c/ov13858.c
@@ -1467,10 +1467,6 @@ static int ov13858_set_stream(struct v4l2_subdev *sd, 
int enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (ov13858->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov9734: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov9734: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:37 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov9734.c | 4 
 1 file changed, 4 deletions(-)

---

diff --git a/drivers/media/i2c/ov9734.c b/drivers/media/i2c/ov9734.c
index b6244772bc59..a5f91499bce4 100644
--- a/drivers/media/i2c/ov9734.c
+++ b/drivers/media/i2c/ov9734.c
@@ -660,10 +660,6 @@ static int ov9734_set_stream(struct v4l2_subdev *sd, int 
enable)
int ret = 0;
 
mutex_lock(>mutex);
-   if (ov9734->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] Documentation: media: camera-sensor: Fix typo and vocabulary selection

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: Documentation: media: camera-sensor: Fix typo and vocabulary selection
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:38 2023 +0300

Drop an unneeded double colon, and use 'shall' instead of 'must' for
consistency with the rest of the file.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 Documentation/driver-api/media/camera-sensor.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/Documentation/driver-api/media/camera-sensor.rst 
b/Documentation/driver-api/media/camera-sensor.rst
index 93f4f2536c25..96cfbc261b6e 100644
--- a/Documentation/driver-api/media/camera-sensor.rst
+++ b/Documentation/driver-api/media/camera-sensor.rst
@@ -13,7 +13,7 @@ Handling clocks
 
 Camera sensors have an internal clock tree including a PLL and a number of
 divisors. The clock tree is generally configured by the driver based on a few
-input parameters that are specific to the hardware:: the external clock 
frequency
+input parameters that are specific to the hardware: the external clock 
frequency
 and the link frequency. The two parameters generally are obtained from system
 firmware. **No other frequencies should be used in any circumstances.**
 
@@ -123,7 +123,7 @@ Power management
 Always use runtime PM to manage the power states of your device. Camera sensor
 drivers are in no way special in this respect: they are responsible for
 controlling the power state of the device they otherwise control as well. In
-general, the device must be powered on at least when its registers are being
+general, the device shall be powered on at least when its registers are being
 accessed and when it is streaming.
 
 Existing camera sensor drivers may rely on the old

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: hi847: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: hi847: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:46 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/hi847.c | 52 ---
 1 file changed, 52 deletions(-)

---

diff --git a/drivers/media/i2c/hi847.c b/drivers/media/i2c/hi847.c
index 47aa2cd06e32..4075c389804c 100644
--- a/drivers/media/i2c/hi847.c
+++ b/drivers/media/i2c/hi847.c
@@ -2184,9 +2184,6 @@ struct hi847 {
 
/* To serialize asynchronus callbacks */
struct mutex mutex;
-
-   /* Streaming on/off */
-   bool streaming;
 };
 
 static u64 to_pixel_rate(u32 f_index)
@@ -2618,9 +2615,6 @@ static int hi847_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (hi847->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);
@@ -2640,52 +2634,11 @@ static int hi847_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   hi847->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
 }
 
-static int __maybe_unused hi847_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct hi847 *hi847 = to_hi847(sd);
-
-   mutex_lock(>mutex);
-   if (hi847->streaming)
-   hi847_stop_streaming(hi847);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused hi847_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct hi847 *hi847 = to_hi847(sd);
-   int ret;
-
-   mutex_lock(>mutex);
-   if (hi847->streaming) {
-   ret = hi847_start_streaming(hi847);
-   if (ret)
-   goto error;
-   }
-
-   mutex_unlock(>mutex);
-
-   return 0;
-
-error:
-   hi847_stop_streaming(hi847);
-   hi847->streaming = 0;
-   mutex_unlock(>mutex);
-   return ret;
-}
-
 static int hi847_set_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
@@ -2979,10 +2932,6 @@ probe_error_v4l2_ctrl_handler_free:
return ret;
 }
 
-static const struct dev_pm_ops hi847_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(hi847_suspend, hi847_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id hi847_acpi_ids[] = {
{"HYV0847"},
@@ -2995,7 +2944,6 @@ MODULE_DEVICE_TABLE(acpi, hi847_acpi_ids);
 static struct i2c_driver hi847_i2c_driver = {
.driver = {
.name = "hi847",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(hi847_acpi_ids),
},
.probe = hi847_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5647: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5647: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:30 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5647.c | 6 --
 1 file changed, 6 deletions(-)

---

diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 8de398423b7c..dcfe3129c63a 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -109,7 +109,6 @@ struct ov5647 {
struct v4l2_ctrl*hblank;
struct v4l2_ctrl*vblank;
struct v4l2_ctrl*exposure;
-   boolstreaming;
 };
 
 static inline struct ov5647 *to_sensor(struct v4l2_subdev *sd)
@@ -898,10 +897,6 @@ static int ov5647_s_stream(struct v4l2_subdev *sd, int 
enable)
int ret;
 
mutex_lock(>lock);
-   if (sensor->streaming == enable) {
-   mutex_unlock(>lock);
-   return 0;
-   }
 
if (enable) {
ret = pm_runtime_resume_and_get(>dev);
@@ -922,7 +917,6 @@ static int ov5647_s_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   sensor->streaming = enable;
mutex_unlock(>lock);
 
return 0;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] Documentation: media: camera-sensor: Move power management section

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: Documentation: media: camera-sensor: Move power management section
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:40 2023 +0300

Move the power management section up, just after clocks, as it relates
to internal system resources and not features exposed to applications.
The text itself is otherwise unchanged.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 Documentation/driver-api/media/camera-sensor.rst | 70 
 1 file changed, 35 insertions(+), 35 deletions(-)

---

diff --git a/Documentation/driver-api/media/camera-sensor.rst 
b/Documentation/driver-api/media/camera-sensor.rst
index 3510a57ecb9a..8ab166a2138d 100644
--- a/Documentation/driver-api/media/camera-sensor.rst
+++ b/Documentation/driver-api/media/camera-sensor.rst
@@ -43,6 +43,41 @@ hasn't been modified directly or indirectly by another 
driver, or supported by
 the board's clock tree to begin with. Changes to the Common Clock Framework API
 are required to ensure reliability.
 
+Power management
+
+
+Always use runtime PM to manage the power states of your device. Camera sensor
+drivers are in no way special in this respect: they are responsible for
+controlling the power state of the device they otherwise control as well. In
+general, the device shall be powered on at least when its registers are being
+accessed and when it is streaming.
+
+Existing camera sensor drivers may rely on the old
+struct v4l2_subdev_core_ops->s_power() callback for bridge or ISP drivers to
+manage their power state. This is however **deprecated**. If you feel you need
+to begin calling an s_power from an ISP or a bridge driver, instead please add
+runtime PM support to the sensor driver you are using. Likewise, new drivers
+should not use s_power.
+
+Please see examples in e.g. ``drivers/media/i2c/ov8856.c`` and
+``drivers/media/i2c/ccs/ccs-core.c``. The two drivers work in both ACPI
+and DT based systems.
+
+Control framework
+~
+
+``v4l2_ctrl_handler_setup()`` function may not be used in the device's runtime
+PM ``runtime_resume`` callback, as it has no way to figure out the power state
+of the device. This is because the power state of the device is only changed
+after the power state transition has taken place. The ``s_ctrl`` callback can 
be
+used to obtain device's power state after the power state transition:
+
+.. c:function:: int pm_runtime_get_if_in_use(struct device *dev);
+
+The function returns a non-zero value if it succeeded getting the power count 
or
+runtime PM was disabled, in either of which cases the driver may proceed to
+access the device.
+
 Frame size
 --
 
@@ -118,41 +153,6 @@ rate) on device level in firmware or hardware. This means 
lower level controls
 implemented by raw cameras may not be used on uAPI (or even kAPI) to control 
the
 frame interval on these devices.
 
-Power management
-
-
-Always use runtime PM to manage the power states of your device. Camera sensor
-drivers are in no way special in this respect: they are responsible for
-controlling the power state of the device they otherwise control as well. In
-general, the device shall be powered on at least when its registers are being
-accessed and when it is streaming.
-
-Existing camera sensor drivers may rely on the old
-struct v4l2_subdev_core_ops->s_power() callback for bridge or ISP drivers to
-manage their power state. This is however **deprecated**. If you feel you need
-to begin calling an s_power from an ISP or a bridge driver, instead please add
-runtime PM support to the sensor driver you are using. Likewise, new drivers
-should not use s_power.
-
-Please see examples in e.g. ``drivers/media/i2c/ov8856.c`` and
-``drivers/media/i2c/ccs/ccs-core.c``. The two drivers work in both ACPI
-and DT based systems.
-
-Control framework
-~
-
-``v4l2_ctrl_handler_setup()`` function may not be used in the device's runtime
-PM ``runtime_resume`` callback, as it has no way to figure out the power state
-of the device. This is because the power state of the device is only changed
-after the power state transition has taken place. The ``s_ctrl`` callback can 
be
-used to obtain device's power state after the power state transition:
-
-.. c:function:: int pm_runtime_get_if_in_use(struct device *dev);
-
-The function returns a non-zero value if it succeeded getting the power count 
or
-runtime PM was disabled, in either of which cases the driver may proceed to
-access the device.
-
 Rotation, orientation and flipping
 --
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx219: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx219: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:49 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Reviewed-by: Dave Stevenson 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx219.c | 41 -
 1 file changed, 41 deletions(-)

---

diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 5715bbbc0820..a431dace0f33 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -479,9 +479,6 @@ struct imx219 {
/* Current mode */
const struct imx219_mode *mode;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* Two or Four lanes */
u8 lanes;
 };
@@ -991,8 +988,6 @@ static int imx219_set_stream(struct v4l2_subdev *sd, int 
enable)
imx219_stop_streaming(imx219);
}
 
-   imx219->streaming = enable;
-
 unlock:
v4l2_subdev_unlock_state(state);
return ret;
@@ -1044,41 +1039,6 @@ static int imx219_power_off(struct device *dev)
return 0;
 }
 
-static int __maybe_unused imx219_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct imx219 *imx219 = to_imx219(sd);
-
-   if (imx219->streaming)
-   imx219_stop_streaming(imx219);
-
-   return 0;
-}
-
-static int __maybe_unused imx219_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct imx219 *imx219 = to_imx219(sd);
-   struct v4l2_subdev_state *state;
-   int ret;
-
-   if (imx219->streaming) {
-   state = v4l2_subdev_lock_and_get_active_state(sd);
-   ret = imx219_start_streaming(imx219, state);
-   v4l2_subdev_unlock_state(state);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   imx219_stop_streaming(imx219);
-   imx219->streaming = false;
-
-   return ret;
-}
-
 static int imx219_get_regulators(struct imx219 *imx219)
 {
struct i2c_client *client = v4l2_get_subdevdata(>sd);
@@ -1464,7 +1424,6 @@ static const struct of_device_id imx219_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, imx219_dt_ids);
 
 static const struct dev_pm_ops imx219_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(imx219_suspend, imx219_resume)
SET_RUNTIME_PM_OPS(imx219_power_off, imx219_power_on, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov2740: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov2740: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:59 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov2740.c | 42 --
 1 file changed, 42 deletions(-)

---

diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
index 59356dd9afd8..3a9700fbbe8c 100644
--- a/drivers/media/i2c/ov2740.c
+++ b/drivers/media/i2c/ov2740.c
@@ -339,9 +339,6 @@ struct ov2740 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* NVM data inforamtion */
struct nvm_data *nvm;
 
@@ -813,47 +810,11 @@ static int ov2740_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov2740->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
 }
 
-static int ov2740_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov2740 *ov2740 = to_ov2740(sd);
-
-   mutex_lock(>mutex);
-   if (ov2740->streaming)
-   ov2740_stop_streaming(ov2740);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int ov2740_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov2740 *ov2740 = to_ov2740(sd);
-   int ret = 0;
-
-   mutex_lock(>mutex);
-   if (!ov2740->streaming)
-   goto exit;
-
-   ret = ov2740_start_streaming(ov2740);
-   if (ret) {
-   ov2740->streaming = false;
-   ov2740_stop_streaming(ov2740);
-   }
-
-exit:
-   mutex_unlock(>mutex);
-   return ret;
-}
-
 static int ov2740_set_format(struct v4l2_subdev *sd,
 struct v4l2_subdev_state *sd_state,
 struct v4l2_subdev_format *fmt)
@@ -1197,8 +1158,6 @@ probe_error_v4l2_ctrl_handler_free:
return ret;
 }
 
-static DEFINE_SIMPLE_DEV_PM_OPS(ov2740_pm_ops, ov2740_suspend, ov2740_resume);
-
 static const struct acpi_device_id ov2740_acpi_ids[] = {
{"INT3474"},
{}
@@ -1209,7 +1168,6 @@ MODULE_DEVICE_TABLE(acpi, ov2740_acpi_ids);
 static struct i2c_driver ov2740_i2c_driver = {
.driver = {
.name = "ov2740",
-   .pm = pm_sleep_ptr(_pm_ops),
.acpi_match_table = ov2740_acpi_ids,
},
.probe = ov2740_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: hi846: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: hi846: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:45 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

Now that the runtime PM operations are not called from the system PM
handlers, the sensor is guaranteed not to be streaming when the runtime
PM resume handler is called, and to have been stopped already when the
runtime PM suspend handler is called. Drop the manual stream start/stop
from the runtime PM handlers.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/hi846.c | 25 +
 1 file changed, 1 insertion(+), 24 deletions(-)

---

diff --git a/drivers/media/i2c/hi846.c b/drivers/media/i2c/hi846.c
index 7fbcc3ff044b..825fc8dc48f5 100644
--- a/drivers/media/i2c/hi846.c
+++ b/drivers/media/i2c/hi846.c
@@ -1675,9 +1675,6 @@ static int __maybe_unused hi846_suspend(struct device 
*dev)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct hi846 *hi846 = to_hi846(sd);
 
-   if (hi846->streaming)
-   hi846_stop_streaming(hi846);
-
return hi846_power_off(hi846);
 }
 
@@ -1686,26 +1683,8 @@ static int __maybe_unused hi846_resume(struct device 
*dev)
struct i2c_client *client = to_i2c_client(dev);
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct hi846 *hi846 = to_hi846(sd);
-   int ret;
-
-   ret = hi846_power_on(hi846);
-   if (ret)
-   return ret;
-
-   if (hi846->streaming) {
-   ret = hi846_start_streaming(hi846);
-   if (ret) {
-   dev_err(dev, "%s: start streaming failed: %d\n",
-   __func__, ret);
-   goto error;
-   }
-   }
 
-   return 0;
-
-error:
-   hi846_power_off(hi846);
-   return ret;
+   return hi846_power_on(hi846);
 }
 
 static int hi846_set_format(struct v4l2_subdev *sd,
@@ -2168,8 +2147,6 @@ static void hi846_remove(struct i2c_client *client)
 }
 
 static const struct dev_pm_ops hi846_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-   pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(hi846_suspend, hi846_resume, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov2740: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov2740: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:28 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov2740.c | 3 ---
 1 file changed, 3 deletions(-)

---

diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
index 41d4f85470fd..59356dd9afd8 100644
--- a/drivers/media/i2c/ov2740.c
+++ b/drivers/media/i2c/ov2740.c
@@ -794,9 +794,6 @@ static int ov2740_set_stream(struct v4l2_subdev *sd, int 
enable)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
 
-   if (ov2740->streaming == enable)
-   return 0;
-
mutex_lock(>mutex);
if (enable) {
ret = pm_runtime_resume_and_get(>dev);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov9282: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov9282: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:36 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov9282.c | 9 -
 1 file changed, 9 deletions(-)

---

diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index 068c7449f50e..bf6dfce1b5dd 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -165,7 +165,6 @@ struct ov9282_mode {
  * @cur_mode: Pointer to current selected sensor mode
  * @code: Mbus code currently selected
  * @mutex: Mutex for serializing sensor controls
- * @streaming: Flag indicating streaming state
  */
 struct ov9282 {
struct device *dev;
@@ -188,7 +187,6 @@ struct ov9282 {
const struct ov9282_mode *cur_mode;
u32 code;
struct mutex mutex;
-   bool streaming;
 };
 
 static const s64 link_freq[] = {
@@ -1037,11 +1035,6 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int 
enable)
 
mutex_lock(>mutex);
 
-   if (ov9282->streaming == enable) {
-   mutex_unlock(>mutex);
-   return 0;
-   }
-
if (enable) {
ret = pm_runtime_resume_and_get(ov9282->dev);
if (ret)
@@ -1055,8 +1048,6 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(ov9282->dev);
}
 
-   ov9282->streaming = enable;
-
mutex_unlock(>mutex);
 
return 0;

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov2685: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov2685: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:27 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov2685.c | 7 ---
 1 file changed, 7 deletions(-)

---

diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
index de0d34e43969..396583826ae9 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -91,7 +91,6 @@ struct ov2685 {
struct gpio_desc*reset_gpio;
struct regulator_bulk_data supplies[OV2685_NUM_SUPPLIES];
 
-   boolstreaming;
struct mutexmutex;
struct v4l2_subdev  subdev;
struct media_padpad;
@@ -513,10 +512,6 @@ static int ov2685_s_stream(struct v4l2_subdev *sd, int on)
 
mutex_lock(>mutex);
 
-   on = !!on;
-   if (on == ov2685->streaming)
-   goto unlock_and_return;
-
if (on) {
ret = pm_runtime_resume_and_get(>client->dev);
if (ret < 0)
@@ -539,8 +534,6 @@ static int ov2685_s_stream(struct v4l2_subdev *sd, int on)
pm_runtime_put(>client->dev);
}
 
-   ov2685->streaming = on;
-
 unlock_and_return:
mutex_unlock(>mutex);
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ccs: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ccs: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:43 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ccs/ccs-core.c | 37 -
 1 file changed, 37 deletions(-)

---

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 569bf9b67539..6a8116454f87 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -3152,42 +3152,6 @@ static const struct v4l2_subdev_internal_ops 
ccs_internal_ops = {
  * I2C Driver
  */
 
-static int __maybe_unused ccs_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *subdev = i2c_get_clientdata(client);
-   struct ccs_sensor *sensor = to_ccs_sensor(subdev);
-   bool streaming = sensor->streaming;
-   int rval;
-
-   rval = pm_runtime_resume_and_get(dev);
-   if (rval < 0)
-   return rval;
-
-   if (sensor->streaming)
-   ccs_stop_streaming(sensor);
-
-   /* save state for resume */
-   sensor->streaming = streaming;
-
-   return 0;
-}
-
-static int __maybe_unused ccs_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *subdev = i2c_get_clientdata(client);
-   struct ccs_sensor *sensor = to_ccs_sensor(subdev);
-   int rval = 0;
-
-   pm_runtime_put(dev);
-
-   if (sensor->streaming)
-   rval = ccs_start_streaming(sensor);
-
-   return rval;
-}
-
 static int ccs_get_hwconfig(struct ccs_sensor *sensor, struct device *dev)
 {
struct ccs_hwconfig *hwcfg = >hwcfg;
@@ -3720,7 +3684,6 @@ static const struct of_device_id ccs_of_table[] = {
 MODULE_DEVICE_TABLE(of, ccs_of_table);
 
 static const struct dev_pm_ops ccs_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ccs_suspend, ccs_resume)
SET_RUNTIME_PM_OPS(ccs_power_off, ccs_power_on, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx319: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx319: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:51 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx319.c | 40 
 1 file changed, 40 deletions(-)

---

diff --git a/drivers/media/i2c/imx319.c b/drivers/media/i2c/imx319.c
index 935bcbacd62e..5378f607f340 100644
--- a/drivers/media/i2c/imx319.c
+++ b/drivers/media/i2c/imx319.c
@@ -138,8 +138,6 @@ struct imx319 {
 */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
/* True if the device has been identified */
bool identified;
 };
@@ -2184,8 +2182,6 @@ static int imx319_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   imx319->streaming = enable;
-
/* vflip and hflip cannot change during streaming */
__v4l2_ctrl_grab(imx319->vflip, enable);
__v4l2_ctrl_grab(imx319->hflip, enable);
@@ -2202,37 +2198,6 @@ err_unlock:
return ret;
 }
 
-static int __maybe_unused imx319_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct imx319 *imx319 = to_imx319(sd);
-
-   if (imx319->streaming)
-   imx319_stop_streaming(imx319);
-
-   return 0;
-}
-
-static int __maybe_unused imx319_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct imx319 *imx319 = to_imx319(sd);
-   int ret;
-
-   if (imx319->streaming) {
-   ret = imx319_start_streaming(imx319);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   imx319_stop_streaming(imx319);
-   imx319->streaming = 0;
-   return ret;
-}
-
 static const struct v4l2_subdev_core_ops imx319_subdev_core_ops = {
.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
.unsubscribe_event = v4l2_event_subdev_unsubscribe,
@@ -2538,10 +2503,6 @@ static void imx319_remove(struct i2c_client *client)
mutex_destroy(>mutex);
 }
 
-static const struct dev_pm_ops imx319_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(imx319_suspend, imx319_resume)
-};
-
 static const struct acpi_device_id imx319_acpi_ids[] __maybe_unused = {
{ "SONY319A" },
{ /* sentinel */ }
@@ -2551,7 +2512,6 @@ MODULE_DEVICE_TABLE(acpi, imx319_acpi_ids);
 static struct i2c_driver imx319_i2c_driver = {
.driver = {
.name = "imx319",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(imx319_acpi_ids),
},
.probe = imx319_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx208: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx208: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:47 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx208.c | 43 ---
 1 file changed, 43 deletions(-)

---

diff --git a/drivers/media/i2c/imx208.c b/drivers/media/i2c/imx208.c
index e5c2b4752832..a9b0aea1ae3b 100644
--- a/drivers/media/i2c/imx208.c
+++ b/drivers/media/i2c/imx208.c
@@ -290,9 +290,6 @@ struct imx208 {
 */
struct mutex imx208_mx;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* OTP data */
bool otp_read;
char otp_data[IMX208_OTP_SIZE];
@@ -734,7 +731,6 @@ static int imx208_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   imx208->streaming = enable;
mutex_unlock(>imx208_mx);
 
/* vflip and hflip cannot change during streaming */
@@ -750,40 +746,6 @@ err_rpm_put:
return ret;
 }
 
-static int __maybe_unused imx208_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct imx208 *imx208 = to_imx208(sd);
-
-   if (imx208->streaming)
-   imx208_stop_streaming(imx208);
-
-   return 0;
-}
-
-static int __maybe_unused imx208_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct imx208 *imx208 = to_imx208(sd);
-   int ret;
-
-   if (imx208->streaming) {
-   ret = imx208_start_streaming(imx208);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   imx208_stop_streaming(imx208);
-   imx208->streaming = 0;
-
-   return ret;
-}
-
 /* Verify chip ID */
 static const struct v4l2_subdev_video_ops imx208_video_ops = {
.s_stream = imx208_set_stream,
@@ -1077,10 +1039,6 @@ static void imx208_remove(struct i2c_client *client)
mutex_destroy(>imx208_mx);
 }
 
-static const struct dev_pm_ops imx208_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(imx208_suspend, imx208_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id imx208_acpi_ids[] = {
{ "INT3478" },
@@ -1093,7 +1051,6 @@ MODULE_DEVICE_TABLE(acpi, imx208_acpi_ids);
 static struct i2c_driver imx208_i2c_driver = {
.driver = {
.name = "imx208",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(imx208_acpi_ids),
},
.probe = imx208_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5695: Drop check for reentrant .s_stream()

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5695: Drop check for reentrant .s_stream()
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:33 2023 +0300

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5695.c | 6 --
 1 file changed, 6 deletions(-)

---

diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c
index 8d1c3a673c23..c8f57ce1578d 100644
--- a/drivers/media/i2c/ov5695.c
+++ b/drivers/media/i2c/ov5695.c
@@ -108,7 +108,6 @@ struct ov5695 {
struct v4l2_ctrl*vblank;
struct v4l2_ctrl*test_pattern;
struct mutexmutex;
-   boolstreaming;
const struct ov5695_mode *cur_mode;
 };
 
@@ -935,9 +934,6 @@ static int ov5695_s_stream(struct v4l2_subdev *sd, int on)
int ret = 0;
 
mutex_lock(>mutex);
-   on = !!on;
-   if (on == ov5695->streaming)
-   goto unlock_and_return;
 
if (on) {
ret = pm_runtime_resume_and_get(>dev);
@@ -955,8 +951,6 @@ static int ov5695_s_stream(struct v4l2_subdev *sd, int on)
pm_runtime_put(>dev);
}
 
-   ov5695->streaming = on;
-
 unlock_and_return:
mutex_unlock(>mutex);
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: hi556: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: hi556: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:44 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/hi556.c | 47 ---
 1 file changed, 47 deletions(-)

---

diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
index 2b00426c5826..e6e7049108e7 100644
--- a/drivers/media/i2c/hi556.c
+++ b/drivers/media/i2c/hi556.c
@@ -577,9 +577,6 @@ struct hi556 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* True if the device has been identified */
bool identified;
 };
@@ -995,50 +992,11 @@ static int hi556_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   hi556->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
 }
 
-static int __maybe_unused hi556_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct hi556 *hi556 = to_hi556(sd);
-
-   mutex_lock(>mutex);
-   if (hi556->streaming)
-   hi556_stop_streaming(hi556);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused hi556_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct hi556 *hi556 = to_hi556(sd);
-   int ret;
-
-   mutex_lock(>mutex);
-   if (hi556->streaming) {
-   ret = hi556_start_streaming(hi556);
-   if (ret)
-   goto error;
-   }
-
-   mutex_unlock(>mutex);
-
-   return 0;
-
-error:
-   hi556_stop_streaming(hi556);
-   hi556->streaming = 0;
-   mutex_unlock(>mutex);
-   return ret;
-}
-
 static int hi556_set_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
@@ -1328,10 +1286,6 @@ probe_error_v4l2_ctrl_handler_free:
return ret;
 }
 
-static const struct dev_pm_ops hi556_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(hi556_suspend, hi556_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id hi556_acpi_ids[] = {
{"INT3537"},
@@ -1344,7 +1298,6 @@ MODULE_DEVICE_TABLE(acpi, hi556_acpi_ids);
 static struct i2c_driver hi556_i2c_driver = {
.driver = {
.name = "hi556",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(hi556_acpi_ids),
},
.probe = hi556_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5670: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5670: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:17:01 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5670.c | 34 --
 1 file changed, 34 deletions(-)

---

diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c
index afd84c8e5ee7..e80db3ecd4f8 100644
--- a/drivers/media/i2c/ov5670.c
+++ b/drivers/media/i2c/ov5670.c
@@ -1882,8 +1882,6 @@ struct ov5670 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
/* True if the device has been identified */
bool identified;
 };
@@ -2484,7 +2482,6 @@ static int ov5670_set_stream(struct v4l2_subdev *sd, int 
enable)
ret = ov5670_stop_streaming(ov5670);
pm_runtime_put(>dev);
}
-   ov5670->streaming = enable;
goto unlock_and_return;
 
 error:
@@ -2539,34 +2536,6 @@ static int __maybe_unused ov5670_runtime_suspend(struct 
device *dev)
return 0;
 }
 
-static int __maybe_unused ov5670_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov5670 *ov5670 = to_ov5670(sd);
-
-   if (ov5670->streaming)
-   ov5670_stop_streaming(ov5670);
-
-   return 0;
-}
-
-static int __maybe_unused ov5670_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov5670 *ov5670 = to_ov5670(sd);
-   int ret;
-
-   if (ov5670->streaming) {
-   ret = ov5670_start_streaming(ov5670);
-   if (ret) {
-   ov5670_stop_streaming(ov5670);
-   return ret;
-   }
-   }
-
-   return 0;
-}
-
 static const struct v4l2_subdev_core_ops ov5670_core_ops = {
.log_status = v4l2_ctrl_subdev_log_status,
.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
@@ -2769,8 +2738,6 @@ static int ov5670_probe(struct i2c_client *client)
goto error_handler_free;
}
 
-   ov5670->streaming = false;
-
/* Set the device's state to active if it's in D0 state. */
if (full_power)
pm_runtime_set_active(>dev);
@@ -2825,7 +2792,6 @@ static void ov5670_remove(struct i2c_client *client)
 }
 
 static const struct dev_pm_ops ov5670_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov5670_suspend, ov5670_resume)
SET_RUNTIME_PM_OPS(ov5670_runtime_suspend, ov5670_runtime_resume, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: imx355: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: imx355: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:52 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/imx355.c | 41 -
 1 file changed, 41 deletions(-)

---

diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
index 43c09941704e..9c58c1a80cba 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -123,9 +123,6 @@ struct imx355 {
 * Protect access to sensor v4l2 controls.
 */
struct mutex mutex;
-
-   /* Streaming on/off */
-   bool streaming;
 };
 
 static const struct imx355_reg imx355_global_regs[] = {
@@ -1454,8 +1451,6 @@ static int imx355_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   imx355->streaming = enable;
-
/* vflip and hflip cannot change during streaming */
__v4l2_ctrl_grab(imx355->vflip, enable);
__v4l2_ctrl_grab(imx355->hflip, enable);
@@ -1472,37 +1467,6 @@ err_unlock:
return ret;
 }
 
-static int __maybe_unused imx355_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct imx355 *imx355 = to_imx355(sd);
-
-   if (imx355->streaming)
-   imx355_stop_streaming(imx355);
-
-   return 0;
-}
-
-static int __maybe_unused imx355_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct imx355 *imx355 = to_imx355(sd);
-   int ret;
-
-   if (imx355->streaming) {
-   ret = imx355_start_streaming(imx355);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   imx355_stop_streaming(imx355);
-   imx355->streaming = 0;
-   return ret;
-}
-
 /* Verify chip ID */
 static int imx355_identify_module(struct imx355 *imx355)
 {
@@ -1825,10 +1789,6 @@ static void imx355_remove(struct i2c_client *client)
mutex_destroy(>mutex);
 }
 
-static const struct dev_pm_ops imx355_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(imx355_suspend, imx355_resume)
-};
-
 static const struct acpi_device_id imx355_acpi_ids[] __maybe_unused = {
{ "SONY355A" },
{ /* sentinel */ }
@@ -1838,7 +1798,6 @@ MODULE_DEVICE_TABLE(acpi, imx355_acpi_ids);
 static struct i2c_driver imx355_i2c_driver = {
.driver = {
.name = "imx355",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(imx355_acpi_ids),
},
.probe = imx355_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ar0521: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ar0521: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:42 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Acked-by: Krzysztof Hałasa 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ar0521.c | 30 +-
 1 file changed, 1 insertion(+), 29 deletions(-)

---

diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c
index a4e39871e8f7..701f36345f1e 100644
--- a/drivers/media/i2c/ar0521.c
+++ b/drivers/media/i2c/ar0521.c
@@ -133,8 +133,6 @@ struct ar0521_dev {
u16 mult2;
u16 vt_pix;
} pll;
-
-   bool streaming;
 };
 
 static inline struct ar0521_dev *to_ar0521_dev(struct v4l2_subdev *sd)
@@ -991,12 +989,9 @@ static int ar0521_s_stream(struct v4l2_subdev *sd, int 
enable)
int ret;
 
mutex_lock(>lock);
-
ret = ar0521_set_stream(sensor, enable);
-   if (!ret)
-   sensor->streaming = enable;
-
mutex_unlock(>lock);
+
return ret;
 }
 
@@ -1023,28 +1018,6 @@ static const struct v4l2_subdev_ops ar0521_subdev_ops = {
.pad = _pad_ops,
 };
 
-static int __maybe_unused ar0521_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ar0521_dev *sensor = to_ar0521_dev(sd);
-
-   if (sensor->streaming)
-   ar0521_set_stream(sensor, 0);
-
-   return 0;
-}
-
-static int __maybe_unused ar0521_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ar0521_dev *sensor = to_ar0521_dev(sd);
-
-   if (sensor->streaming)
-   return ar0521_set_stream(sensor, 1);
-
-   return 0;
-}
-
 static int ar0521_probe(struct i2c_client *client)
 {
struct v4l2_fwnode_endpoint ep = {
@@ -1183,7 +1156,6 @@ static void ar0521_remove(struct i2c_client *client)
 }
 
 static const struct dev_pm_ops ar0521_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ar0521_suspend, ar0521_resume)
SET_RUNTIME_PM_OPS(ar0521_power_off, ar0521_power_on, NULL)
 };
 static const struct of_device_id ar0521_dt_ids[] = {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov08d10: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov08d10: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:56 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov08d10.c | 49 -
 1 file changed, 49 deletions(-)

---

diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c
index ef811711549c..3d49e3fa8e56 100644
--- a/drivers/media/i2c/ov08d10.c
+++ b/drivers/media/i2c/ov08d10.c
@@ -536,9 +536,6 @@ struct ov08d10 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* lanes index */
u8 nlanes;
 
@@ -1122,8 +1119,6 @@ static int ov08d10_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov08d10->streaming = enable;
-
/* vflip and hflip cannot change during streaming */
__v4l2_ctrl_grab(ov08d10->vflip, enable);
__v4l2_ctrl_grab(ov08d10->hflip, enable);
@@ -1133,45 +1128,6 @@ static int ov08d10_set_stream(struct v4l2_subdev *sd, 
int enable)
return ret;
 }
 
-static int __maybe_unused ov08d10_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct ov08d10 *ov08d10 = to_ov08d10(sd);
-
-   mutex_lock(>mutex);
-   if (ov08d10->streaming)
-   ov08d10_stop_streaming(ov08d10);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused ov08d10_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct ov08d10 *ov08d10 = to_ov08d10(sd);
-   int ret;
-
-   mutex_lock(>mutex);
-
-   if (ov08d10->streaming) {
-   ret = ov08d10_start_streaming(ov08d10);
-   if (ret) {
-   ov08d10->streaming = false;
-   ov08d10_stop_streaming(ov08d10);
-   mutex_unlock(>mutex);
-   return ret;
-   }
-   }
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
 static int ov08d10_set_format(struct v4l2_subdev *sd,
  struct v4l2_subdev_state *sd_state,
  struct v4l2_subdev_format *fmt)
@@ -1498,10 +1454,6 @@ probe_error_v4l2_ctrl_handler_free:
return ret;
 }
 
-static const struct dev_pm_ops ov08d10_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov08d10_suspend, ov08d10_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id ov08d10_acpi_ids[] = {
{ "OVTI08D1" },
@@ -1514,7 +1466,6 @@ MODULE_DEVICE_TABLE(acpi, ov08d10_acpi_ids);
 static struct i2c_driver ov08d10_i2c_driver = {
.driver = {
.name = "ov08d10",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(ov08d10_acpi_ids),
},
.probe = ov08d10_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] Documentation: media: camera-sensor: Use link to upstream DT bindings

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: Documentation: media: camera-sensor: Use link to upstream DT bindings
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:39 2023 +0300

The Documentation/devicetree/bindings/clock/clock-bindings.txt file is
deprecated and points to clock-bindings.yaml, which is not hosted in the
kernel source tree. Use an HTTPS link to refer to the YAML binding
document.

While at it, drop "currently" from the paragraph, as the whole file
refers to the current recommended practices except where explicitly
noted.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 Documentation/driver-api/media/camera-sensor.rst | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

---

diff --git a/Documentation/driver-api/media/camera-sensor.rst 
b/Documentation/driver-api/media/camera-sensor.rst
index 96cfbc261b6e..3510a57ecb9a 100644
--- a/Documentation/driver-api/media/camera-sensor.rst
+++ b/Documentation/driver-api/media/camera-sensor.rst
@@ -32,10 +32,11 @@ can rely on this frequency being used.
 Devicetree
 ~~
 
-The currently preferred way to achieve this is using ``assigned-clocks``,
-``assigned-clock-parents`` and ``assigned-clock-rates`` properties. See
-``Documentation/devicetree/bindings/clock/clock-bindings.txt`` for more
-information. The driver then gets the frequency using ``clk_get_rate()``.
+The preferred way to achieve this is using ``assigned-clocks``,
+``assigned-clock-parents`` and ``assigned-clock-rates`` properties. See the
+`clock device tree bindings 
`_
+for more information. The driver then gets the frequency using
+``clk_get_rate()``.
 
 This approach has the drawback that there's no guarantee that the frequency
 hasn't been modified directly or indirectly by another driver, or supported by

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov9734: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov9734: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:17:04 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov9734.c | 46 --
 1 file changed, 46 deletions(-)

---

diff --git a/drivers/media/i2c/ov9734.c b/drivers/media/i2c/ov9734.c
index a5f91499bce4..ee3315299605 100644
--- a/drivers/media/i2c/ov9734.c
+++ b/drivers/media/i2c/ov9734.c
@@ -337,9 +337,6 @@ struct ov9734 {
 
/* To serialize asynchronus callbacks */
struct mutex mutex;
-
-   /* Streaming on/off */
-   bool streaming;
 };
 
 static inline struct ov9734 *to_ov9734(struct v4l2_subdev *subdev)
@@ -679,49 +676,11 @@ static int ov9734_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov9734->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
 }
 
-static int __maybe_unused ov9734_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct ov9734 *ov9734 = to_ov9734(sd);
-
-   mutex_lock(>mutex);
-   if (ov9734->streaming)
-   ov9734_stop_streaming(ov9734);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused ov9734_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct ov9734 *ov9734 = to_ov9734(sd);
-   int ret = 0;
-
-   mutex_lock(>mutex);
-   if (!ov9734->streaming)
-   goto exit;
-
-   ret = ov9734_start_streaming(ov9734);
-   if (ret) {
-   ov9734->streaming = false;
-   ov9734_stop_streaming(ov9734);
-   }
-
-exit:
-   mutex_unlock(>mutex);
-   return ret;
-}
-
 static int ov9734_set_format(struct v4l2_subdev *sd,
 struct v4l2_subdev_state *sd_state,
 struct v4l2_subdev_format *fmt)
@@ -1007,10 +966,6 @@ probe_error_v4l2_ctrl_handler_free:
return ret;
 }
 
-static const struct dev_pm_ops ov9734_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov9734_suspend, ov9734_resume)
-};
-
 static const struct acpi_device_id ov9734_acpi_ids[] = {
{ "OVTI9734", },
{}
@@ -1021,7 +976,6 @@ MODULE_DEVICE_TABLE(acpi, ov9734_acpi_ids);
 static struct i2c_driver ov9734_i2c_driver = {
.driver = {
.name = "ov9734",
-   .pm = _pm_ops,
.acpi_match_table = ov9734_acpi_ids,
},
.probe = ov9734_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov5675: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov5675: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:17:02 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov5675.c | 41 -
 1 file changed, 41 deletions(-)

---

diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
index f608ee0c0cec..e63d9d402d34 100644
--- a/drivers/media/i2c/ov5675.c
+++ b/drivers/media/i2c/ov5675.c
@@ -513,9 +513,6 @@ struct ov5675 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* True if the device has been identified */
bool identified;
 };
@@ -968,7 +965,6 @@ static int ov5675_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov5675->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
@@ -1024,42 +1020,6 @@ static int ov5675_power_on(struct device *dev)
return 0;
 }
 
-static int __maybe_unused ov5675_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov5675 *ov5675 = to_ov5675(sd);
-
-   mutex_lock(>mutex);
-   if (ov5675->streaming)
-   ov5675_stop_streaming(ov5675);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused ov5675_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov5675 *ov5675 = to_ov5675(sd);
-   int ret;
-
-   mutex_lock(>mutex);
-   if (ov5675->streaming) {
-   ret = ov5675_start_streaming(ov5675);
-   if (ret) {
-   ov5675->streaming = false;
-   ov5675_stop_streaming(ov5675);
-   mutex_unlock(>mutex);
-   return ret;
-   }
-   }
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
 static int ov5675_set_format(struct v4l2_subdev *sd,
 struct v4l2_subdev_state *sd_state,
 struct v4l2_subdev_format *fmt)
@@ -1406,7 +1366,6 @@ probe_power_off:
 }
 
 static const struct dev_pm_ops ov5675_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov5675_suspend, ov5675_resume)
SET_RUNTIME_PM_OPS(ov5675_power_off, ov5675_power_on, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: og01a1b: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: og01a1b: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:53 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/og01a1b.c | 47 -
 1 file changed, 47 deletions(-)

---

diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c
index 956ad3e996b6..51378ba16a5d 100644
--- a/drivers/media/i2c/og01a1b.c
+++ b/drivers/media/i2c/og01a1b.c
@@ -434,9 +434,6 @@ struct og01a1b {
 
/* To serialize asynchronus callbacks */
struct mutex mutex;
-
-   /* Streaming on/off */
-   bool streaming;
 };
 
 static u64 to_pixel_rate(u32 f_index)
@@ -751,50 +748,11 @@ static int og01a1b_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   og01a1b->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
 }
 
-static int __maybe_unused og01a1b_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct og01a1b *og01a1b = to_og01a1b(sd);
-
-   mutex_lock(>mutex);
-   if (og01a1b->streaming)
-   og01a1b_stop_streaming(og01a1b);
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused og01a1b_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct og01a1b *og01a1b = to_og01a1b(sd);
-   int ret;
-
-   mutex_lock(>mutex);
-   if (og01a1b->streaming) {
-   ret = og01a1b_start_streaming(og01a1b);
-   if (ret) {
-   og01a1b->streaming = false;
-   og01a1b_stop_streaming(og01a1b);
-   mutex_unlock(>mutex);
-   return ret;
-   }
-   }
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
 static int og01a1b_set_format(struct v4l2_subdev *sd,
  struct v4l2_subdev_state *sd_state,
  struct v4l2_subdev_format *fmt)
@@ -1092,10 +1050,6 @@ probe_error_v4l2_ctrl_handler_free:
return ret;
 }
 
-static const struct dev_pm_ops og01a1b_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(og01a1b_suspend, og01a1b_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id og01a1b_acpi_ids[] = {
{"OVTI01AC"},
@@ -1108,7 +1062,6 @@ MODULE_DEVICE_TABLE(acpi, og01a1b_acpi_ids);
 static struct i2c_driver og01a1b_i2c_driver = {
.driver = {
.name = "og01a1b",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(og01a1b_acpi_ids),
},
.probe = og01a1b_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov02a10: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov02a10: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:55 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov02a10.c | 2 --
 1 file changed, 2 deletions(-)

---

diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c
index 741d977a76f3..848e47a464ac 100644
--- a/drivers/media/i2c/ov02a10.c
+++ b/drivers/media/i2c/ov02a10.c
@@ -570,8 +570,6 @@ unlock_and_return:
 }
 
 static const struct dev_pm_ops ov02a10_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-   pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(ov02a10_power_off, ov02a10_power_on, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov01a10: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov01a10: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:54 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov01a10.c | 57 +++--
 1 file changed, 3 insertions(+), 54 deletions(-)

---

diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
index b43c1c96f47b..bbd5740d2280 100644
--- a/drivers/media/i2c/ov01a10.c
+++ b/drivers/media/i2c/ov01a10.c
@@ -287,9 +287,6 @@ struct ov01a10 {
struct v4l2_ctrl *exposure;
 
const struct ov01a10_mode *cur_mode;
-
-   /* streaming state */
-   bool streaming;
 };
 
 static inline struct ov01a10 *to_ov01a10(struct v4l2_subdev *subdev)
@@ -683,55 +680,12 @@ static int ov01a10_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
goto unlock;
}
-
-   goto done;
-   }
-
-   ov01a10_stop_streaming(ov01a10);
-   pm_runtime_put(>dev);
-done:
-   ov01a10->streaming = enable;
-unlock:
-   v4l2_subdev_unlock_state(state);
-
-   return ret;
-}
-
-static int __maybe_unused ov01a10_suspend(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct ov01a10 *ov01a10 = to_ov01a10(sd);
-   struct v4l2_subdev_state *state;
-
-   state = v4l2_subdev_lock_and_get_active_state(sd);
-   if (ov01a10->streaming)
-   ov01a10_stop_streaming(ov01a10);
-
-   v4l2_subdev_unlock_state(state);
-
-   return 0;
-}
-
-static int __maybe_unused ov01a10_resume(struct device *dev)
-{
-   struct i2c_client *client = to_i2c_client(dev);
-   struct v4l2_subdev *sd = i2c_get_clientdata(client);
-   struct ov01a10 *ov01a10 = to_ov01a10(sd);
-   struct v4l2_subdev_state *state;
-   int ret = 0;
-
-   state = v4l2_subdev_lock_and_get_active_state(sd);
-   if (!ov01a10->streaming)
-   goto exit;
-
-   ret = ov01a10_start_streaming(ov01a10);
-   if (ret) {
-   ov01a10->streaming = false;
+   } else {
ov01a10_stop_streaming(ov01a10);
+   pm_runtime_put(>dev);
}
 
-exit:
+unlock:
v4l2_subdev_unlock_state(state);
 
return ret;
@@ -971,10 +925,6 @@ err_handler_free:
return ret;
 }
 
-static const struct dev_pm_ops ov01a10_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov01a10_suspend, ov01a10_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id ov01a10_acpi_ids[] = {
{ "OVTI01A0" },
@@ -987,7 +937,6 @@ MODULE_DEVICE_TABLE(acpi, ov01a10_acpi_ids);
 static struct i2c_driver ov01a10_i2c_driver = {
.driver = {
.name = "ov01a10",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(ov01a10_acpi_ids),
},
.probe = ov01a10_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov13858: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov13858: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:16:58 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov13858.c | 40 
 1 file changed, 40 deletions(-)

---

diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c
index b90ce338a47a..4c419014dd7b 100644
--- a/drivers/media/i2c/ov13858.c
+++ b/drivers/media/i2c/ov13858.c
@@ -1044,9 +1044,6 @@ struct ov13858 {
 
/* Mutex for serialized access */
struct mutex mutex;
-
-   /* Streaming on/off */
-   bool streaming;
 };
 
 #define to_ov13858(_sd)container_of(_sd, struct ov13858, sd)
@@ -1485,7 +1482,6 @@ static int ov13858_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov13858->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
@@ -1498,37 +1494,6 @@ err_unlock:
return ret;
 }
 
-static int __maybe_unused ov13858_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov13858 *ov13858 = to_ov13858(sd);
-
-   if (ov13858->streaming)
-   ov13858_stop_streaming(ov13858);
-
-   return 0;
-}
-
-static int __maybe_unused ov13858_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov13858 *ov13858 = to_ov13858(sd);
-   int ret;
-
-   if (ov13858->streaming) {
-   ret = ov13858_start_streaming(ov13858);
-   if (ret)
-   goto error;
-   }
-
-   return 0;
-
-error:
-   ov13858_stop_streaming(ov13858);
-   ov13858->streaming = false;
-   return ret;
-}
-
 /* Verify chip ID */
 static int ov13858_identify_module(struct ov13858 *ov13858)
 {
@@ -1783,10 +1748,6 @@ static const struct i2c_device_id ov13858_id_table[] = {
 
 MODULE_DEVICE_TABLE(i2c, ov13858_id_table);
 
-static const struct dev_pm_ops ov13858_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov13858_suspend, ov13858_resume)
-};
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id ov13858_acpi_ids[] = {
{"OVTID858"},
@@ -1799,7 +1760,6 @@ MODULE_DEVICE_TABLE(acpi, ov13858_acpi_ids);
 static struct i2c_driver ov13858_i2c_driver = {
.driver = {
.name = "ov13858",
-   .pm = _pm_ops,
.acpi_match_table = ACPI_PTR(ov13858_acpi_ids),
},
.probe = ov13858_probe,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov13b10: Drop stream handling in runtime PM handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov13b10: Drop stream handling in runtime PM handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:17:00 2023 +0300

The sensor is guaranteed not to be streaming when the runtime PM resume
handler is called, as the resume handler is only called from the
.s_stream() operation when starting streaming. Similarly, the sensor has
been stopped when the runtime PM suspend handler is called. There is
thus no need for manual stream start/stop from the runtime PM handlers.
Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov13b10.c | 34 +-
 1 file changed, 1 insertion(+), 33 deletions(-)

---

diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c
index 32c598ed7752..970d2caeb3d6 100644
--- a/drivers/media/i2c/ov13b10.c
+++ b/drivers/media/i2c/ov13b10.c
@@ -650,9 +650,6 @@ struct ov13b10 {
/* Mutex for serialized access */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* True if the device has been identified */
bool identified;
 };
@@ -1235,7 +1232,6 @@ static int ov13b10_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov13b->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
@@ -1250,12 +1246,6 @@ err_unlock:
 
 static int ov13b10_suspend(struct device *dev)
 {
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov13b10 *ov13b = to_ov13b10(sd);
-
-   if (ov13b->streaming)
-   ov13b10_stop_streaming(ov13b);
-
ov13b10_power_off(dev);
 
return 0;
@@ -1263,29 +1253,7 @@ static int ov13b10_suspend(struct device *dev)
 
 static int ov13b10_resume(struct device *dev)
 {
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov13b10 *ov13b = to_ov13b10(sd);
-   int ret;
-
-   ret = ov13b10_power_on(dev);
-   if (ret)
-   goto pm_fail;
-
-   if (ov13b->streaming) {
-   ret = ov13b10_start_streaming(ov13b);
-   if (ret)
-   goto stop_streaming;
-   }
-
-   return 0;
-
-stop_streaming:
-   ov13b10_stop_streaming(ov13b);
-   ov13b10_power_off(dev);
-pm_fail:
-   ov13b->streaming = false;
-
-   return ret;
+   return ov13b10_power_on(dev);
 }
 
 static const struct v4l2_subdev_video_ops ov13b10_video_ops = {

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: ov8856: Drop system suspend and resume handlers

2023-09-21 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: ov8856: Drop system suspend and resume handlers
Author:  Laurent Pinchart 
Date:Thu Sep 14 21:17:03 2023 +0300

Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.

The streaming field of the driver's private structure is now unused,
drop it as well.

Signed-off-by: Laurent Pinchart 
Signed-off-by: Sakari Ailus 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/ov8856.c | 44 
 1 file changed, 44 deletions(-)

---

diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
index 5447a3361976..a0f673a24e52 100644
--- a/drivers/media/i2c/ov8856.c
+++ b/drivers/media/i2c/ov8856.c
@@ -1438,9 +1438,6 @@ struct ov8856 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
 
-   /* Streaming on/off */
-   bool streaming;
-
/* lanes index */
u8 nlanes;
 
@@ -2061,7 +2058,6 @@ static int ov8856_set_stream(struct v4l2_subdev *sd, int 
enable)
pm_runtime_put(>dev);
}
 
-   ov8856->streaming = enable;
mutex_unlock(>mutex);
 
return ret;
@@ -2122,45 +2118,6 @@ static int ov8856_power_off(struct device *dev)
return 0;
 }
 
-static int __maybe_unused ov8856_suspend(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov8856 *ov8856 = to_ov8856(sd);
-
-   mutex_lock(>mutex);
-   if (ov8856->streaming)
-   ov8856_stop_streaming(ov8856);
-
-   ov8856_power_off(dev);
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
-static int __maybe_unused ov8856_resume(struct device *dev)
-{
-   struct v4l2_subdev *sd = dev_get_drvdata(dev);
-   struct ov8856 *ov8856 = to_ov8856(sd);
-   int ret;
-
-   mutex_lock(>mutex);
-
-   ov8856_power_on(dev);
-   if (ov8856->streaming) {
-   ret = ov8856_start_streaming(ov8856);
-   if (ret) {
-   ov8856->streaming = false;
-   ov8856_stop_streaming(ov8856);
-   mutex_unlock(>mutex);
-   return ret;
-   }
-   }
-
-   mutex_unlock(>mutex);
-
-   return 0;
-}
-
 static int ov8856_set_format(struct v4l2_subdev *sd,
 struct v4l2_subdev_state *sd_state,
 struct v4l2_subdev_format *fmt)
@@ -2498,7 +2455,6 @@ probe_power_off:
 }
 
 static const struct dev_pm_ops ov8856_pm_ops = {
-   SET_SYSTEM_SLEEP_PM_OPS(ov8856_suspend, ov8856_resume)
SET_RUNTIME_PM_OPS(ov8856_power_off, ov8856_power_on, NULL)
 };
 

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


  1   2   >