* [PATCH AUTOSEL 5.4 034/350] media: am437x-vpfe: Setting STD to current value is not an error
[not found] <20191210210402.8367-1-sashal@kernel.org>
@ 2019-12-10 20:58 ` Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 035/350] media: cedrus: fill in bus_info for media device Sasha Levin
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Benoit Parrot, Lad Prabhakar, Hans Verkuil, Mauro Carvalho Chehab,
Sasha Levin, linux-media
From: Benoit Parrot <bparrot@ti.com>
[ Upstream commit 13aa21cfe92ce9ebb51824029d89f19c33f81419 ]
VIDIOC_S_STD should not return an error if the value is identical
to the current one.
This error was highlighted by the v4l2-compliance test.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/am437x/am437x-vpfe.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 2b42ba1f59494..e13dbf27a9c24 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -1830,6 +1830,10 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id)
if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD))
return -ENODATA;
+ /* if trying to set the same std then nothing to do */
+ if (vpfe_standards[vpfe->std_index].std_id == std_id)
+ return 0;
+
/* If streaming is started, return error */
if (vb2_is_busy(&vpfe->buffer_queue)) {
vpfe_err(vpfe, "%s device busy\n", __func__);
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH AUTOSEL 5.4 035/350] media: cedrus: fill in bus_info for media device
[not found] <20191210210402.8367-1-sashal@kernel.org>
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 034/350] media: am437x-vpfe: Setting STD to current value is not an error Sasha Levin
@ 2019-12-10 20:58 ` Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 036/350] media: seco-cec: Add a missing 'release_region()' in an error handling path Sasha Levin
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hans Verkuil, Jernej Skrabec, Mauro Carvalho Chehab, Sasha Levin,
linux-media, devel, linux-arm-kernel
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[ Upstream commit ae0688f659adb17ae6ae5710c886b20b5406e5c4 ]
Fixes this compliance warning:
$ v4l2-compliance -m0
v4l2-compliance SHA: b514d615166bdc0901a4c71261b87db31e89f464, 32 bits
Compliance test for cedrus device /dev/media0:
Media Driver Info:
Driver name : cedrus
Model : cedrus
Serial :
Bus info :
Media version : 5.3.0
Hardware revision: 0x00000000 (0)
Driver version : 5.3.0
Required ioctls:
warn: v4l2-test-media.cpp(51): empty bus_info
test MEDIA_IOC_DEVICE_INFO: OK
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/sunxi/cedrus/cedrus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index 2d3ea8b74dfdc..3439f6ad63380 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -357,6 +357,8 @@ static int cedrus_probe(struct platform_device *pdev)
dev->mdev.dev = &pdev->dev;
strscpy(dev->mdev.model, CEDRUS_NAME, sizeof(dev->mdev.model));
+ strscpy(dev->mdev.bus_info, "platform:" CEDRUS_NAME,
+ sizeof(dev->mdev.bus_info));
media_device_init(&dev->mdev);
dev->mdev.ops = &cedrus_m2m_media_ops;
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH AUTOSEL 5.4 036/350] media: seco-cec: Add a missing 'release_region()' in an error handling path
[not found] <20191210210402.8367-1-sashal@kernel.org>
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 034/350] media: am437x-vpfe: Setting STD to current value is not an error Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 035/350] media: cedrus: fill in bus_info for media device Sasha Levin
@ 2019-12-10 20:58 ` Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 037/350] media: vim2m: Fix abort issue Sasha Levin
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Christophe JAILLET, Hans Verkuil, Mauro Carvalho Chehab,
Sasha Levin, linux-media
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ Upstream commit a9cc4cbcdfd378b65fd4e398800cfa14e3855042 ]
At the beginning of the probe function, we have a call to
'request_muxed_region(BRA_SMB_BASE_ADDR, 7, "CEC00001")()'
A corresponding 'release_region()' is performed in the remove function but
is lacking in the error handling path.
Add it.
Fixes: b03c2fb97adc ("media: add SECO cec driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/seco-cec/seco-cec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/seco-cec/seco-cec.c b/drivers/media/platform/seco-cec/seco-cec.c
index 9cd60fe1867c9..a86b6e8f91969 100644
--- a/drivers/media/platform/seco-cec/seco-cec.c
+++ b/drivers/media/platform/seco-cec/seco-cec.c
@@ -675,6 +675,7 @@ err_notifier:
err_delete_adapter:
cec_delete_adapter(secocec->cec_adap);
err:
+ release_region(BRA_SMB_BASE_ADDR, 7);
dev_err(dev, "%s device probe failed\n", dev_name(dev));
return ret;
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH AUTOSEL 5.4 037/350] media: vim2m: Fix abort issue
[not found] <20191210210402.8367-1-sashal@kernel.org>
` (2 preceding siblings ...)
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 036/350] media: seco-cec: Add a missing 'release_region()' in an error handling path Sasha Levin
@ 2019-12-10 20:58 ` Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 038/350] media: vim2m: Fix BUG_ON in vim2m_device_release() Sasha Levin
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jernej Skrabec, Hans Verkuil, Mauro Carvalho Chehab, Sasha Levin,
linux-media
From: Jernej Skrabec <jernej.skrabec@siol.net>
[ Upstream commit c362f77a243bfd1daec21b6c36491c061ee2f31b ]
Currently, if start streaming -> stop streaming -> start streaming
sequence is executed, driver will end job prematurely, if ctx->translen
is higher than 1, because "aborting" flag is still set from previous
stop streaming command.
Fix that by clearing "aborting" flag in start streaming handler.
Fixes: 96d8eab5d0a1 ("V4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/vim2m.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index acd3bd48c7e21..2d79cdc130c58 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -1073,6 +1073,9 @@ static int vim2m_start_streaming(struct vb2_queue *q, unsigned int count)
if (!q_data)
return -EINVAL;
+ if (V4L2_TYPE_IS_OUTPUT(q->type))
+ ctx->aborting = 0;
+
q_data->sequence = 0;
return 0;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH AUTOSEL 5.4 038/350] media: vim2m: Fix BUG_ON in vim2m_device_release()
[not found] <20191210210402.8367-1-sashal@kernel.org>
` (3 preceding siblings ...)
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 037/350] media: vim2m: Fix abort issue Sasha Levin
@ 2019-12-10 20:58 ` Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 039/350] media: max2175: Fix build error without CONFIG_REGMAP_I2C Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 040/350] media: ov6650: Fix control handler not freed on init error Sasha Levin
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Kefeng Wang, Hulk Robot, Laurent Pinchart, Hans Verkuil,
Mauro Carvalho Chehab, Sasha Levin, linux-media
From: Kefeng Wang <wangkefeng.wang@huawei.com>
[ Upstream commit 2455d417c03aa0cbafed04c46cbb354643238318 ]
If v4l2_m2m_init() fails, m2m_dev pointer will be set ERR_PTR(-ENOMEM),
then kfree m2m_dev will trigger BUG_ON, see below, fix it by setting m2m_dev
to NULL.
vim2m vim2m.0: Failed to init mem2mem device
------------[ cut here ]------------
kernel BUG at mm/slub.c:3944!
invalid opcode: 0000 [#1] SMP PTI
CPU: 11 PID: 9061 Comm: insmod Tainted: G E 5.2.0-rc2 #81
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
RIP: 0010:kfree+0x11a/0x160
Call Trace:
vim2m_device_release+0x3f/0x50 [vim2m]
device_release+0x27/0x80
kobject_release+0x68/0x190
vim2m_probe+0x20f/0x280 [vim2m]
platform_drv_probe+0x37/0x90
really_probe+0xef/0x3d0
driver_probe_device+0x110/0x120
device_driver_attach+0x4f/0x60
__driver_attach+0x9a/0x140
? device_driver_attach+0x60/0x60
bus_for_each_dev+0x76/0xc0
? klist_add_tail+0x57/0x70
bus_add_driver+0x141/0x210
driver_register+0x5b/0xe0
vim2m_init+0x29/0x1000 [vim2m]
do_one_initcall+0x46/0x1f4
? __slab_alloc+0x1c/0x30
? kmem_cache_alloc_trace+0x167/0x1b0
do_init_module+0x5b/0x21f
load_module+0x1add/0x1fb0
? __do_sys_finit_module+0xe9/0x110
__do_sys_finit_module+0xe9/0x110
do_syscall_64+0x5b/0x1c0
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Fixes: ea6c7e34f3b2 ("media: vim2m: replace devm_kzalloc by kzalloc")
Reported-by: Hulk Robot <hulkci@huawei.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/vim2m.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index 2d79cdc130c58..e17792f837f82 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -1346,6 +1346,7 @@ static int vim2m_probe(struct platform_device *pdev)
if (IS_ERR(dev->m2m_dev)) {
v4l2_err(&dev->v4l2_dev, "Failed to init mem2mem device\n");
ret = PTR_ERR(dev->m2m_dev);
+ dev->m2m_dev = NULL;
goto error_dev;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH AUTOSEL 5.4 039/350] media: max2175: Fix build error without CONFIG_REGMAP_I2C
[not found] <20191210210402.8367-1-sashal@kernel.org>
` (4 preceding siblings ...)
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 038/350] media: vim2m: Fix BUG_ON in vim2m_device_release() Sasha Levin
@ 2019-12-10 20:58 ` Sasha Levin
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 040/350] media: ov6650: Fix control handler not freed on init error Sasha Levin
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: YueHaibing, Hulk Robot, Sakari Ailus, Mauro Carvalho Chehab,
Sasha Levin, linux-media
From: YueHaibing <yuehaibing@huawei.com>
[ Upstream commit 36756fbff1e4a31d71d262ae6a04a20b38efa874 ]
If CONFIG_REGMAP_I2C is not set, building fails:
drivers/media/i2c/max2175.o: In function `max2175_probe':
max2175.c:(.text+0x1404): undefined reference to `__devm_regmap_init_i2c'
Select REGMAP_I2C to fix this.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: b47b79d8a231 ("[media] media: i2c: max2175: Add MAX2175 support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/i2c/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 7eee1812bba36..fcffcc31d168a 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -1113,6 +1113,7 @@ comment "SDR tuner chips"
config SDR_MAX2175
tristate "Maxim 2175 RF to Bits tuner"
depends on VIDEO_V4L2 && MEDIA_SDR_SUPPORT && I2C
+ select REGMAP_I2C
help
Support for Maxim 2175 tuner. It is an advanced analog/digital
radio receiver with RF-to-Bits front-end designed for SDR solutions.
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH AUTOSEL 5.4 040/350] media: ov6650: Fix control handler not freed on init error
[not found] <20191210210402.8367-1-sashal@kernel.org>
` (5 preceding siblings ...)
2019-12-10 20:58 ` [PATCH AUTOSEL 5.4 039/350] media: max2175: Fix build error without CONFIG_REGMAP_I2C Sasha Levin
@ 2019-12-10 20:58 ` Sasha Levin
6 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2019-12-10 20:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Janusz Krzysztofik, Sakari Ailus, Mauro Carvalho Chehab,
Sasha Levin, linux-media
From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
[ Upstream commit c404af950d14b71bfbf574a752b6c29d726baaba ]
Since commit afd9690c72c3 ("[media] ov6650: convert to the control
framework"), if an error occurs during initialization of a control
handler, resources possibly allocated to the handler are not freed
before device initialiaton is aborted. Fix it.
Fixes: afd9690c72c3 ("[media] ov6650: convert to the control framework")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/i2c/ov6650.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c
index 5b9af5e5b7f13..68776b0710f98 100644
--- a/drivers/media/i2c/ov6650.c
+++ b/drivers/media/i2c/ov6650.c
@@ -989,8 +989,10 @@ static int ov6650_probe(struct i2c_client *client,
V4L2_CID_GAMMA, 0, 0xff, 1, 0x12);
priv->subdev.ctrl_handler = &priv->hdl;
- if (priv->hdl.error)
- return priv->hdl.error;
+ if (priv->hdl.error) {
+ ret = priv->hdl.error;
+ goto ectlhdlfree;
+ }
v4l2_ctrl_auto_cluster(2, &priv->autogain, 0, true);
v4l2_ctrl_auto_cluster(3, &priv->autowb, 0, true);
@@ -1008,8 +1010,10 @@ static int ov6650_probe(struct i2c_client *client,
priv->subdev.internal_ops = &ov6650_internal_ops;
ret = v4l2_async_register_subdev(&priv->subdev);
- if (ret)
- v4l2_ctrl_handler_free(&priv->hdl);
+ if (!ret)
+ return 0;
+ectlhdlfree:
+ v4l2_ctrl_handler_free(&priv->hdl);
return ret;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread