- 11 Jan, 2024 1 commit
-
-
Arnd Bergmann authored
The recently added driver uses the firmware loader mechanism but causes a link failure when that is in a loadable module while thp7312 itself is built-in: arm-linux-gnueabi-ld: drivers/media/i2c/thp7312.o: in function `thp7312_probe': thp7312.c:(.text+0x4164): undefined reference to `firmware_upload_register' Select the required Kconfig symbol. Note that the driver specifically needs the firmware upload interface that is controlled by CONFIG_FW_UPLOAD, but there is no link failure when that is disabled because the interfaces are stubbed out here. Link: https://lore.kernel.org/linux-media/20240103155811.4092035-1-arnd@kernel.org Fixes: 7a52ab41 ("media: i2c: Add driver for THine THP7312") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
- 14 Dec, 2023 1 commit
-
-
Arnd Bergmann authored
With clang-16, building without COMMON_CLK triggers a range check on udelay() because of a constant division-by-zero calculation: ld.lld: error: undefined symbol: __bad_udelay >>> referenced by mt9m114.c >>> drivers/media/i2c/mt9m114.o:(mt9m114_power_on) in archive vmlinux.a In this configuration, the driver already fails to probe, before this function gets called, so it's enough to suppress the assertion. Do this by using fsleep(), which turns long delays into sleep() calls in place of the link failure. This is probably a good idea regardless to avoid overly long dynamic udelay() calls on a slow clock. Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Fixes: 24d756e9 ("media: i2c: Add driver for onsemi MT9M114 camera sensor") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
- 13 Dec, 2023 38 commits
-
-
Benjamin Gaignard authored
Rename min_buffers_needed into min_queued_buffers and update the documentation about it. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: Drop the change where min_queued_buffers + 1 buffers would be] [hverkuil: allocated. Now this patch only renames this field instead of making] [hverkuil: a functional change as well.] [hverkuil: Renamed 3 remaining min_buffers_needed occurrences.]
-
Laurent Pinchart authored
Use the newly added storage for frame interval in the subdev state to simplify the driver. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
The routing ioctls documentation incorrectly describes the 'which' field, due to a bad copy & paste. Fix it. Fixes: ea73eda5 ("media: Documentation: Add GS_ROUTING documentation") Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
Multiple subdev ioctls that take a 'which' field do not document the error returned when the field has an invalid value. Expand the documentation to fix this. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
Invalid values for the 'which' field of structures passed to multiple subdev ioctls result in an EINVAL error being returned. The documentation of the corresponding ioctls indicates this with sentences such as the following: the ``which`` field references a non-existing format This is confusing. Clarify the documentation. Suggested-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
Subdev states store all standard pad configuration data, except for frame intervals. Fix it by adding interval fields in the v4l2_subdev_pad_config and v4l2_subdev_stream_config structures, with corresponding accessor functions and a helper function to implement the .get_frame_interval() operation. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
Due to a historical mishap, the v4l2_subdev_frame_interval structure is the only part of the V4L2 subdev userspace API that doesn't contain a 'which' field. This prevents trying frame intervals using the subdev 'TRY' state mechanism. Adding a 'which' field is simple as the structure has 8 reserved fields. This would however break userspace as the field is currently set to 0, corresponding to V4L2_SUBDEV_FORMAT_TRY, while the corresponding ioctls currently operate on the 'ACTIVE' state. We thus need to add a new subdev client cap, V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH, to indicate that userspace is aware of this new field. All drivers that implement the subdev .get_frame_interval() and .set_frame_interval() operations are updated to return -EINVAL when operating on the TRY state, preserving the current behaviour. While at it, fix a bad copy&paste in the documentation of the struct v4l2_subdev_frame_interval_enum 'which' field. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # for imx-media Reviewed-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for tegra-video Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
The subdev .[gs]_frame_interval are video operations, but they operate on pads (and even on streams). Not only is this confusing, it causes practical issues for drivers as the operations don't receive a subdev state pointer, requiring manual state handling. To improve the situation, turn the operations into pad operations, and extend them to receive a state pointer like other pad operations. While at it, rename the operations to .[gs]et_frame_interval at the same time to match the naming scheme of other pad operations. This isn't strictly necessary, but given that all drivers using those operations need to be modified, handling the rename separately would generate more churn for very little gain (if at all). Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # for imx-media Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for tegra-video Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
The subdev state locking macros and macros to get the active state are currently behind CONFIG_MEDIA_CONTROLLER. This makes sense, as there can be no subdev state without MC. However, we have code paths common to MC and non-MC cases which call subdev operations that have subdev state as a parameter. In the non-MC case the state parameter would always be NULL. Thus it makes sense to allow, e.g.: v4l2_subdev_call_state_active(sd, pad, get_fmt, fmt) which for non-MC case would call the subdev passing NULL as the state. This currently fails: https://lore.kernel.org/oe-kbuild-all/202312061101.PLrz5NnJ-lkp@intel.com/ Fix the issue by moving the related macros to be outside CONFIG_MEDIA_CONTROLLER. The v4l2_subdev_lock_state() and v4l2_subdev_unlock_state() macros will crash if given NULL as the state, but the other macros behave correctly even when there's no active state, and they will only call the lock/unlock macros if there is a state. An alternative fix would be to make another version of v4l2_subdev_call_state_try() with ifdefs, which would not use any state macros and would always pass NULL as the state. But having two version of a macro/function is always more confusing than having just one, so I went this way. So, this fixes the v4l2_subdev_call_state_active() macro. But we also have v4l2_subdev_call_state_try(). It would be possible to fix that macro by additionally creating "no-op" variants of the state alloc and free functions. However, v4l2_subdev_call_state_try() is only used by a single driver (stm32-dcmi), which selects MC, and the macro is supposed to be removed as soon as the users have been converted away from the macro. Thus I have not touched the state alloc/free functions, and I think it makes sense to keep alloc/free functions available only if there's actually something that can be allocated or freed. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Link: https://lore.kernel.org/r/20231208-v4l2-state-mc-fix-v1-1-a0c8162557c6@ideasonboard.comSigned-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
Add allocation of DPB buffers based on MFC requirement so, codec buffers allocations has been moved after state MFCINST_HEAD_PRODUCED. It is taken care that codec buffer allocation is performed in process context from userspace IOCTL call. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
In MFCv12, some section of firmware gets updated at each MFC run. Hence we need to reload original firmware for each run at the start. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
Context bit is set for hardware execution if there is a buffer in source and destination queue before calling try_run in the init_buffers function. Now there will be a new context created and hardware will be invoked for the buffer queued instead of waiting for another buffer to be queued from userspace to set this context bit for hw execution. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
Add dmabuf support for mfc encoder Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
MFC driver had restriction on max resolution of 1080p, updated it for UHD. Added corresponding support to set recommended profile and level for H264 in UHD scenario. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
In MFCv12, the rc configs are changed with support for CBR loose, CBR tight and Variable Bitrate (VBR) added. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
YV12 and I420 format (3-plane) support is added. Stride information is added to all formats and planes since it is necessary for YV12/I420 which are different from width. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
Add support for MFCv12, with a new register file and necessary hw control, decoder, encoder and structural changes. Add luma dbp, chroma dpb and mv sizes for each codec as per the UM for MFCv12, along with appropriate alignment. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
Renames macro IS_MFCV10 to IS_MFCV10_PLUS so that the MFCv10 code can be resued for MFCv12 support. Since some part of MFCv10 specific code holds good for MFCv12 also. Cc: linux-fsd@tesla.com Signed-off-by:
Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Reviewed-by:
Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Aakarsh Jain authored
Add Tesla FSD MFC(MFC v12) compatible. Cc: linux-fsd@tesla.com Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Jacopo Mondi authored
Add a driver for the OmniVision OV64A40 image sensor. Co-developed-by:
Lee Jackson <lee.jackson@arducam.com> Signed-off-by:
Lee Jackson <lee.jackson@arducam.com> Signed-off-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Jacopo Mondi authored
Add bindings for OmniVision OV64A40. Co-developed-by:
Lee Jackson <lee.jackson@arducam.com> Signed-off-by:
Lee Jackson <lee.jackson@arducam.com> Signed-off-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Acked-by:
Conor Dooley <conor.dooley@microchip.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Umang Jain authored
In addition to the existing 2592x1940 12-bit mode, introduce support for 2592x1940 10-bit mode. Following are the register set which control the 10/12 bit mode setting: MDBIT 0x319d ADBIT 0x3050 ADBIT1 0x341c 0x341d Signed-off-by:
Umang Jain <umang.jain@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Kieran Bingham authored
The V4L2_CID_HBLANK control is marked as readonly and can only be a single value. Set the minimum and maximum value to match the mode value. Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Kieran Bingham authored
Support reporting of the Sensor Native and Active pixel array areas through the Selection API. The implementation reports a single target crop only for the mode that is presently exposed by the driver. Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Kieran Bingham authored
Provide support for enabling and disabling regulator supplies to control power to the camera sensor. While updating the power on function, document that a sleep is represented as 'T4' in the datasheet power on sequence. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Kieran Bingham authored
The existing imx335_parse_hw_config function has two paths that can be taken without reporting to the user the reason for failing to accept the hardware configuration. Extend the error reporting paths to identify failures when probing the device. Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Kieran Bingham authored
The use of \n as a line ending throughout the driver is inconsistent. While it is possible for logging messages to automatically have newlines added by the kernel printk mechanisms, this is specifically to support continued lines with PR_CONT and the lack of a new line character indicates that the text is a fragment of a continuation line. As each of these lines are whole and not fragments, explicitly define the newline for consistency. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Kieran Bingham authored
Add the bindings for the supply references used on the IMX335. Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Marco Felsch <m.felsch@pengutronix.de> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by:
Conor Dooley <conor.dooley@microchip.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
André Apitzsch authored
Set effective and active sensor pixel sizes as shown in product brief[1]. [1]: https://www.mouser.com/datasheet/2/897/ProductBrief_IMX214_20150428-1289331.pdfReviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
André Apitzsch <git@apitzsch.eu> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
André Apitzsch authored
Obtain rotation and orientation information from system firmware and register the appropriate controls. While at it, update number of pre-allocated control slots. Reviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
André Apitzsch <git@apitzsch.eu> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
André Apitzsch authored
Code refinement. While at it, don't destroy the mutex not initialized yet if the controls are initialized incorrectly. Reviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
André Apitzsch <git@apitzsch.eu> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
André Apitzsch authored
Code refinement, no functional changes. Reviewed-by:
Ricardo Ribalda <ribalda@chromium.org> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
André Apitzsch <git@apitzsch.eu> [Sakari Ailus: The control handler remains in the context struct still.] Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sebastian Reichel authored
Introduce new driver for GalaxyCore GC0308, which is a cheap 640x480 with an on-chip ISP sensor sold since 2010. Data is provided via parallel bus. Reviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Sebastian Reichel <sre@kernel.org> [Sakari Ailus: Changed MAINTAINERS to match GC2145 entry.] Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sebastian Reichel authored
"gc" prefixed i2c media drivers are most likely GalaxyCore camera sensor drivers, so add it to the list. Signed-off-by:
Sebastian Reichel <sre@kernel.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sebastian Reichel authored
Add DT binding for GalaxyCore GC0308 camera sensor. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Sebastian Reichel <sre@kernel.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Krzysztof Kozlowski authored
The data lanes and link frequency were set to match existing Linux driver limitations, however bindings should be independent of chosen Linux driver support. Decouple these properties from the driver to match what is actually supported by the hardware. This also fixes DTS example: ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short Fixes: 066a94e2 ("media: dt-bindings: media: Use graph and video-interfaces schemas") Acked-by:
Conor Dooley <conor.dooley@microchip.com> Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
LP-11 and LP-111 are CSI-2 bus states, not modes. Fix this. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
BT.601 is not actually a bus specification, leaving parallel bus without a specification to refer to. Fix this. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-