7b1ec3e3 | 27-Nov-2024 |
Naushir Patuck <naush@raspberrypi.com> |
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 <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
697a252b | 27-Nov-2024 |
Naushir Patuck <naush@raspberrypi.com> |
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 <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
a4781bf8 | 27-Nov-2024 |
Naushir Patuck <naush@raspberrypi.com> |
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 <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
8771b7f3 | 13-May-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
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 <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202405112243.2MLRT7li-lkp@intel.com/ Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
b6041c9e | 08-May-2024 |
Dan Carpenter <dan.carpenter@linaro.org> |
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 <dan.carpenter@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/fbbe7862-2820-44eb-81cb-7f33b99cca35@moroto.mountain Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
0cc50ced | 06-May-2024 |
Ricardo Ribalda <ribalda@chromium.org> |
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20240506-fix-broad-v2-2-e6a2a5c0d609@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
05b0b079 | 06-May-2024 |
Ricardo Ribalda <ribalda@chromium.org> |
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 <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20240506-fix-broad-v2-1-e6a2a5c0d609@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
79390f96 | 01-May-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: bcm2835-unicam: Include v4l2-subdev.h
The unicam driver uses the v4l2_subdev structure. Include the corresponding header instead of relying on indirect includes.
Closes: https://lore.kernel.
media: bcm2835-unicam: Include v4l2-subdev.h
The unicam driver uses the v4l2_subdev structure. Include the corresponding header instead of relying on indirect includes.
Closes: https://lore.kernel.org/oe-kbuild-all/202404302324.8aTC84kE-lkp@intel.com/
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|