Age | Commit message (Collapse) | Author | Files | Lines |
|
CAL uses get_frame_desc to get the VC and DT for the incoming CSI-2
stream, but does it in a bit hacky way. Clean this up by implementing
.get_frame_desc to camera-rx, and calling that from cal.c.
No functional change intended.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Change TI CAL driver to use subdev state. No functional changes
(intended).
This allows us to get rid of the 'formats' field, as the formats are
kept in the state, and also the 'mutex' as we already have state locking.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
We don't do a proper job at freeing resources in cal_camerarx_create's
error paths.
Fix these, and also switch the phy allcation from kzalloc to
devm_kzalloc to simplify the code further.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Clean up the CAL drivers uses of mbus formats:
- Switch all YUV formats from 2X8 formats to 1X16, as those are what
should be used for CSI-2 bus.
- Drop 24 and 32 bit formats, as the driver doesn't support them (see
cal_ctx_pix_proc_config()).
- Switch RGB565_2X8_LE to RGB565_1X16 (for the same reason as for the
YUV formats) and drop RGB565_2X8_BE as it cannot be supported with
CSI-2.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
The imx8mq-mipi-csi2 MIPI CSI-2 receiver driver is used and maintained.
There is no reason to keep it in staging. The accompanying CSI bridge
driver that uses it is in drivers/media/platform/nxp as well.
One TODO is to get rid of csi_state's "state" and "lock" variables.
Especially make sure suspend/resume is working without them. That can
very well be worked on from the new location.
Also add a MAINTAINERS section for the imx8mq-mipi-csi2 mipi receiver
driver.
Signed-off-by: Martin Kepplinger <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
This patch fixes the following checkpatch.pl warning:
WARNING: Avoid multiple line dereference
in file ipu3-css.c
Signed-off-by: Nikolay Kyx <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
struct i2c_driver::probe_new is about to go away. Switch the driver to
use the probe callback with the same prototype.
Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
When capturing 1600x900, system could crash when system memory usage is
tight.
The way to reproduce this issue:
1. Use 1600x900 to display on host
2. Mount ISO through 'Virtual media' on OpenBMC's web
3. Run script as below on host to do sha continuously
#!/bin/bash
while [ [1] ];
do
find /media -type f -printf '"%h/%f"\n' | xargs sha256sum
done
4. Open KVM on OpenBMC's web
The size of macro block captured is 8x8. Therefore, we should make sure
the height of src-buf is 8 aligned to fix this issue.
Signed-off-by: Jammy Huang <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
i2c_driver::probe()
struct i2c_driver::probe_new() is about to go away. Since I converted
all drivers below drivers/media use struct i2c_driver::probe, three more
drivers were added in the following commits that use .probe_new():
commit 6363db1c9d45 ("media: i2c: add DS90UB953 driver")
commit c158d0d4ff15 ("media: i2c: add DS90UB913 driver")
commit afe267f2d368 ("media: i2c: add DS90UB960 driver")
Switch these driver to use the probe callback.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[hverkuil: use proper commit description style]
|
|
Smatch warns:
drivers/media/i2c/ds90ub960.c:1671 ub960_rxport_add_serializer():
err: 'rxport->ser.client' dereferencing possible ERR_PTR()
i2c_new_client_device() returns error pointers on failure and in
dev_dbg statement we are dereferencing error pointer which is a bug.
Fix this by using IS_ERR() which checks for error pointers.
Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver")
Signed-off-by: Harshit Mogalapalli <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Remove .owner field if calls are used which set it automatically.
to silence the warning:
./drivers/media/i2c/ds90ub953.c:1390:3-8: No need to set .owner here. The core will do it.
Reported-by: Abaci Robot <[email protected]>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5902
Signed-off-by: Yang Li <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
In gl861_i2c_master_xfer, msg is controlled by user. When msg[i].buf
is null and msg[i].len is zero, former checks on msg[i].buf would be
passed. Malicious data finally reach gl861_i2c_master_xfer. If accessing
msg[i].buf[0] without sanity check, null ptr deref would happen.
We add check on msg[i].len to prevent crash.
Similar commit:
commit 0ed554fd769a
("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()")
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
If opera1_xilinx_rw fails, the mac address is not initialized.
And opera1_read_mac_address does not handle this failure, which leads to
the uninit-value in dvb_usb_adapter_dvb_init.
Fix this by handling the failure of opera1_xilinx_rw.
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
In az6007_i2c_xfer, msg is controlled by user. When msg[i].buf
is null and msg[i].len is zero, former checks on msg[i].buf would be
passed. Malicious data finally reach az6007_i2c_xfer. If accessing
msg[i].buf[0] without sanity check, null ptr deref would happen.
We add check on msg[i].len to prevent crash.
Similar commit:
commit 0ed554fd769a
("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()")
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
In anysee_master_xfer, msg is controlled by user. When msg[i].buf
is null and msg[i].len is zero, former checks on msg[i].buf would be
passed. Malicious data finally reach anysee_master_xfer. If accessing
msg[i].buf[0] without sanity check, null ptr deref would happen.
We add check on msg[i].len to prevent crash.
Similar commit:
commit 0ed554fd769a
("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()")
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[hverkuil: add spaces around +]
|
|
In af9005_i2c_xfer, msg is controlled by user. When msg[i].buf
is null and msg[i].len is zero, former checks on msg[i].buf would be
passed. Malicious data finally reach af9005_i2c_xfer. If accessing
msg[i].buf[0] without sanity check, null ptr deref would happen.
We add check on msg[i].len to prevent crash.
Similar commit:
commit 0ed554fd769a
("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()")
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
In dw2102_i2c_transfer, msg is controlled by user. When msg[i].buf
is null and msg[i].len is zero, former checks on msg[i].buf would be
passed. Malicious data finally reach dw2102_i2c_transfer. If accessing
msg[i].buf[0] without sanity check, null ptr deref would happen.
We add check on msg[i].len to prevent crash.
Similar commit:
commit 950e252cb469
("[media] dw2102: limit messages to buffer size")
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[hverkuil: retained the line wrap]
|
|
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
devm_platform_ioremap_resource_byname()
Use devm_platform_ioremap_resource() and
devm_platform_ioremap_resource_byname() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Reviewed-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
In af9035_i2c_master_xfer, msg is controlled by user. When msg[i].buf
is null and msg[i].len is zero, former checks on msg[i].buf would be
passed. Malicious data finally reach af9035_i2c_master_xfer. If accessing
msg[i].buf[0] without sanity check, null ptr deref would happen.
We add check on msg[i].len to prevent crash.
Similar commit:
commit 0ed554fd769a
("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()")
Signed-off-by: Zhang Shurong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
make second_timeout avoid double assignment.
Signed-off-by: Minjie Du <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
There is a spelling mistake in a fmdbg message. Fix it.
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[hverkuil: split overly long line over two lines]
|
|
source.codeaurora.org is no longer accessible and so the reference links
in the documentation are not useful. The content was mirrored over to
Code Linaro so lets update the references to point there instead.
Signed-off-by: Jeffrey Hugo <[email protected]>
Reviewed-by: Bryan O'Donoghue <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
If cx24120_message_send() returns error, we should keep local struct
unchanged.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 5afc9a25be8d ("[media] Add support for TechniSat Skystar S2")
Signed-off-by: Daniil Dulov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Use put_device to release the object get through of_find_device_by_node,
avoiding resource leaks.
Signed-off-by: Lu Hongfei <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
'read' is freed when it is known to be NULL, but not when a read error
occurs.
Revert the logic to avoid a small leak, should a m920x_read() call fail.
Fixes: a2ab06d7c4d6 ("media: m920x: don't use stack on USB reads")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Add the error code of a failed i2c transfer to the error message.
Signed-off-by: Alexander Stein <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Variable loopdiv can be assigned 0, then it is used as a denominator,
without checking it for 0.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 713d54a8bd81 ("[media] DiB7090: add support for the dib7090 based")
Signed-off-by: Daniil Dulov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[hverkuil: (bw != NULL) -> bw]
|
|
Pointer variables of void * type do not require type cast.
Signed-off-by: Yu Zhe <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Pointer variables of void * type do not require type cast.
Signed-off-by: Yu Zhe <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Pointer variables of void * type do not require type cast.
Signed-off-by: Yu Zhe <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
The previous commit 4b208f8b561f ("[media] siano: register media controller
earlier")moves siano_media_device_register before smscore_register_device,
and adds corresponding error handling code if smscore_register_device
fails. However, it misses the following error handling code of
smsusb_init_device.
Fix this by moving error handling code at the end of smsusb_init_device
and adding a goto statement in the following error handling parts.
Fixes: 4b208f8b561f ("[media] siano: register media controller earlier")
Signed-off-by: Dongliang Mu <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
remove unnecessary void* type casting.
Signed-off-by: Dong Chuanjian <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Signed-off-by: ye xingchen <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Signed-off-by: ye xingchen <[email protected]>
Reviewed-by: Tommaso Merciai <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
|
|
If fwnode_graph_get_remote_endpoint() fails, 'fwnode' is known to be NULL,
so fwnode_handle_put() is a no-op.
Release the reference taken from a previous fwnode_graph_get_port_parent()
call instead.
Also handle fwnode_graph_get_port_parent() failures.
In order to fix these issues, add an error handling path to the function
and the needed gotos.
Fixes: ca50c197bd96 ("[media] v4l: fwnode: Support generic fwnode for parsing standardised properties")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add driver for TI DS90UB953 FPD-Link III Serializer.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add driver for TI DS90UB913 FPD-Link III Serializer.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add driver for TI DS90UB960 FPD-Link III Deserializer.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add DT bindings for TI DS90UB960 FPD-Link III Deserializer.
Signed-off-by: Tomi Valkeinen <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|