| 7b1ec3e3 | 27-Nov-2024 |
Naushir Patuck <[email protected]> |
media: bcm2835-unicam: Fix for possible dummy buffer overrun
The Unicam hardware has been observed to cause a buffer overrun when using the dummy buffer as a circular buffer. The conditions that cau
media: bcm2835-unicam: Fix for possible dummy buffer overrun
The Unicam hardware has been observed to cause a buffer overrun when using the dummy buffer as a circular buffer. The conditions that cause the overrun are not fully known, but it seems to occur when the memory bus is heavily loaded.
To avoid the overrun, program the hardware with a buffer size of 0 when using the dummy buffer. This will cause overrun into the allocated dummy buffer, but avoid out of bounds writes.
Signed-off-by: Naushir Patuck <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
show more ...
|
| 697a252b | 27-Nov-2024 |
Naushir Patuck <[email protected]> |
media: bcm2835-unicam: Disable trigger mode operation
The imx219/imx708 sensors frequently generate a single corrupt frame (image or embedded data) when the sensor first starts. This can either be a
media: bcm2835-unicam: Disable trigger mode operation
The imx219/imx708 sensors frequently generate a single corrupt frame (image or embedded data) when the sensor first starts. This can either be a missing line, or invalid samples within the line. This only occurrs using the upstream Unicam kernel driver.
Disabling trigger mode elimiates this corruption. Since trigger mode is a legacy feature copied from the firmware driver and not expected to be needed, remove it. Tested on the Raspberry Pi cameras and shows no ill effects.
Signed-off-by: Naushir Patuck <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
show more ...
|
| a4781bf8 | 27-Nov-2024 |
Naushir Patuck <[email protected]> |
media: bcm2835-unicam: Allow setting of unpacked formats
When matching formats via try_fmt/set_fmt ioctls, test for the unpacked formats as well as packed formats. This allows userland clients setup
media: bcm2835-unicam: Allow setting of unpacked formats
When matching formats via try_fmt/set_fmt ioctls, test for the unpacked formats as well as packed formats. This allows userland clients setup unpacking to 16-bits from the 10/12/14-packed CSI2 formats.
Signed-off-by: Naushir Patuck <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
show more ...
|
| 8771b7f3 | 12-May-2024 |
Laurent Pinchart <[email protected]> |
media: bcm2835-unicam: Depend on COMMON_CLK
The bcm2835-unicam driver calls the clk_set_min_rate() function, which is declared but not implemented on platforms that don't provide COMMON_CLK. This ca
media: bcm2835-unicam: Depend on COMMON_CLK
The bcm2835-unicam driver calls the clk_set_min_rate() function, which is declared but not implemented on platforms that don't provide COMMON_CLK. This causes linkage failures with some configurations.
Fix it by depending on COMMON_CLK. This only slightly restricts compilation testing, but not usage of the driver as all platforms on which the hardware can be found provide COMMON_CLK.
Fixes: 392cd78d495f ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Dave Stevenson <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| b6041c9e | 08-May-2024 |
Dan Carpenter <[email protected]> |
media: bcm2835-unicam: Fix a NULL vs IS_ERR() check
The media_pad_remote_pad_unique() function returns error pointers, not NULL. Update the check accordingly.
Fixes: 392cd78d495f ("media: bcm2835-
media: bcm2835-unicam: Fix a NULL vs IS_ERR() check
The media_pad_remote_pad_unique() function returns error pointers, not NULL. Update the check accordingly.
Fixes: 392cd78d495f ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Laurent Pinchart <[email protected]>
show more ...
|
| 0cc50ced | 06-May-2024 |
Ricardo Ribalda <[email protected]> |
media: bcm2835-unicam: Do not print error when irq not found
platform_get_irq() already prints an error for us.
Fix this cocci warning: drivers/media/platform/broadcom/bcm2835-unicam.c:2664:2-9: li
media: bcm2835-unicam: Do not print error when irq not found
platform_get_irq() already prints an error for us.
Fix this cocci warning: drivers/media/platform/broadcom/bcm2835-unicam.c:2664:2-9: line 2664 is redundant because platform_get_irq() already prints an error
Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Ricardo Ribalda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Laurent Pinchart <[email protected]>
show more ...
|
| 05b0b079 | 06-May-2024 |
Ricardo Ribalda <[email protected]> |
media: bcm2835-unicam: Do not replace IRQ retcode during probe
platform_get_irq() cannot return the value 0. It will either return a non-zero irq or a errcode.
If a errcode is returned, we need to
media: bcm2835-unicam: Do not replace IRQ retcode during probe
platform_get_irq() cannot return the value 0. It will either return a non-zero irq or a errcode.
If a errcode is returned, we need to populate the error code upwards. It will give a more accurate reason of why it failed to the caller, who might decide to retry later.
Signed-off-by: Ricardo Ribalda <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Laurent Pinchart <[email protected]>
show more ...
|