642b70d5 | 22-May-2025 |
Frank Li <Frank.Li@nxp.com> |
media: imx8mq-mipi-csi2: Add support for i.MX8QXP
Add support for i.MX8QXP, which has a dedicated control and status register (CSR) space. Enable obtaining the second register space and initializing
media: imx8mq-mipi-csi2: Add support for i.MX8QXP
Add support for i.MX8QXP, which has a dedicated control and status register (CSR) space. Enable obtaining the second register space and initializing PHY and link settings accordingly.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-10-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
382d53e9 | 22-May-2025 |
Guoniu.zhou <guoniu.zhou@nxp.com> |
media: imx8mq-mipi-csi2: Add imx8mq_plat_data for different compatible strings
Introduce `imx8mq_plat_data` along with enable/disable callback operations to facilitate support for new chips. No func
media: imx8mq-mipi-csi2: Add imx8mq_plat_data for different compatible strings
Introduce `imx8mq_plat_data` along with enable/disable callback operations to facilitate support for new chips. No functional changes.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-9-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
85927846 | 22-May-2025 |
Robert Chiras <robert.chiras@nxp.com> |
media: imx8-isi: Add support for i.MX8QM and i.MX8QXP
Add compatibles and platform data for i.MX8QM and i.MX8QXP platforms. i.MX8QM's IER register layout is difference with i.MX8QXP.
Signed-off-by:
media: imx8-isi: Add support for i.MX8QM and i.MX8QXP
Add compatibles and platform data for i.MX8QM and i.MX8QXP platforms. i.MX8QM's IER register layout is difference with i.MX8QXP.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-7-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
dee8521f | 22-May-2025 |
Frank Li <Frank.Li@nxp.com> |
media: nxp: imx8-isi: Use dev_err_probe() to simplify code
Use dev_err_probe() simplify code. No functional changes intended.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signe
media: nxp: imx8-isi: Use dev_err_probe() to simplify code
Use dev_err_probe() simplify code. No functional changes intended.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-6-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
73a40554 | 22-May-2025 |
Frank Li <Frank.Li@nxp.com> |
media: nxp: imx8-isi: Remove redundant check for dma_set_mask_and_coherent()
dma_set_mask_and_coherent() never return failure when mask bigger than 32bit.
See commit f7ae20f2fc4e ("docs: dma: corre
media: nxp: imx8-isi: Remove redundant check for dma_set_mask_and_coherent()
dma_set_mask_and_coherent() never return failure when mask bigger than 32bit.
See commit f7ae20f2fc4e ("docs: dma: correct dma_set_mask() sample code")
So remove return value check for dma_set_mask_and_coherent().
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-5-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
60b8de2b | 22-May-2025 |
Frank Li <Frank.Li@nxp.com> |
media: nxp: imx8-isi: Use devm_clk_bulk_get_all() to fetch clocks
Use devm_clk_bulk_get_all() helper to simplify clock handle code.
No functional changes intended.
Signed-off-by: Frank Li <Frank.L
media: nxp: imx8-isi: Use devm_clk_bulk_get_all() to fetch clocks
Use devm_clk_bulk_get_all() helper to simplify clock handle code.
No functional changes intended.
Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-4-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
66ede6d7 | 22-May-2025 |
Frank Li <Frank.Li@nxp.com> |
media: nxp: imx8-isi: Remove unused offset in mxc_isi_reg and use BIT() macro for mask
Preserve clarity by removing the unused 'offset' field in struct mxc_isi_reg, as it duplicates information alre
media: nxp: imx8-isi: Remove unused offset in mxc_isi_reg and use BIT() macro for mask
Preserve clarity by removing the unused 'offset' field in struct mxc_isi_reg, as it duplicates information already indicated by the mask and remains unused.
Improve readability by replacing hex value masks with the BIT() macro.
No functional change.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-3-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
2021b8d5 | 22-May-2025 |
Frank Li <Frank.Li@nxp.com> |
media: nxp: imx8-isi: Allow num_sources to be greater than num_sink
Allow num_sources (drvdata: num_channels) to be greater than num_sink (drvdata: num_ports + 1).
ISI support stream multiplexing,
media: nxp: imx8-isi: Allow num_sources to be greater than num_sink
Allow num_sources (drvdata: num_channels) to be greater than num_sink (drvdata: num_ports + 1).
ISI support stream multiplexing, such as differentiates multiple cameras from a single 2-lane MIPI input, or duplicates input stream into multiple outputs. So num_channels may be greater than num_ports at some platform.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250522-8qxp_camera-v5-2-d4be869fdb7e@nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
038d27ac | 06-Jun-2025 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: imx-mipi-csis: Use CSI-2 data type macros from mipi-csi2.h
The imx-mipi-csis defines custom macros for the CSI-2 data types, duplicating the centralized macros defines in mipi-csi2.h. Replace
media: imx-mipi-csis: Use CSI-2 data type macros from mipi-csi2.h
The imx-mipi-csis defines custom macros for the CSI-2 data types, duplicating the centralized macros defines in mipi-csi2.h. Replace them with the latter.
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250606090533.10711-1-laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
910efa64 | 23-Oct-2024 |
Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> |
media: nxp: imx8-isi: better handle the m2m usage_count
Currently, if streamon/streamoff calls are imbalanced we can either end up with a negative ISI m2m usage_count (if streamoff() is called more
media: nxp: imx8-isi: better handle the m2m usage_count
Currently, if streamon/streamoff calls are imbalanced we can either end up with a negative ISI m2m usage_count (if streamoff() is called more times than streamon()) in which case we'll not be able to restart the ISI pipe next time, or the usage_count never gets to 0 and the pipe is never switched off.
To avoid that, add a 'streaming' flag to mxc_isi_m2m_ctx_queue_data and use it in the streamon/streamoff to avoid incrementing/decrementing the usage_count uselessly, if called multiple times from the same context.
Fixes: cf21f328fcafac ("media: nxp: Add i.MX8 ISI driver") Cc: stable@vger.kernel.org Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241023085643.978729-1-laurentiu.palcu@oss.nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
fd5b6cd7 | 21-Apr-2025 |
Ming Qian <ming.qian@oss.nxp.com> |
media: imx-jpeg: Check decoding is ongoing for motion-jpeg
As the first frame in "repeat-mode" is the pattern, the pattern done interrupt is ignored by the driver. With small resolution bitstreams,
media: imx-jpeg: Check decoding is ongoing for motion-jpeg
As the first frame in "repeat-mode" is the pattern, the pattern done interrupt is ignored by the driver. With small resolution bitstreams, the interrupts might fire too quickly and hardware combine two irqs to once because irq handle have latency. Thus the driver might miss the frame decode done interrupt from the first actual frame.
In order to avoid the driver wait for the frame done interrupt that has been combined to the pattern done interrupt and been ignored, driver will check the curr_desc and slot_status registers to figure out if the decoding of actual frame is finished or not.
Firstly we check the curr_desc register, - if it is still pointing to the pattern descriptor, the second actual frame is not started, we can wait for its frame-done interrupt. - if the curr_desc has pointed to the frame descriptor, then we check the ongoing bit of slot_status register. - if the ongoing bit is set to 1, the decoding of the actual frame is not finished, we can wait for its frame-done interrupt. - if the ongoing bit is set to 0, the decoding of the actual frame is finished, we can't wait for the second interrupt, but mark it as done.
But there is still a small problem, that the curr_desc and slot_status registers are not synchronous. curr_desc is updated when the next_descpt_ptr is loaded, but the ongoing bit of slot_status is set after the 32 bytes descriptor is loaded, there will be a short time interval in between, which may cause fake false. Consider read register is quite slow compared with IP read 32byte from memory, read twice slot_status can avoid this situation.
Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
f65fbf8c | 21-Apr-2025 |
Ming Qian <ming.qian@oss.nxp.com> |
media: imx-jpeg: Change the pattern size to 128x64
In order to decode a motion-jpeg bitstream, which doesn't provide a DHT, the driver will first decode a pattern jpeg and use the DHT found in the p
media: imx-jpeg: Change the pattern size to 128x64
In order to decode a motion-jpeg bitstream, which doesn't provide a DHT, the driver will first decode a pattern jpeg and use the DHT found in the pattern to decode the first actual frame. This mode is called "repeat-mode" and it utilizes linked descriptors.
The smallest supported resolution of 64x64 was used for that pattern to not cause unneeded performance delay. This choice, however, can cause a corrupted decoded picture of the first frame after the pattern, when the resolution of that frame is larger than the pattern and is not aligned to 64.
By altering the pattern size to 128x64, this corruption can be avoided. That size has been confirmed to be safe by the hardware designers. Additionally, a DMA buffer needs to be allocated to store the decoded picture of the pattern image.
Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
7500bb9c | 21-Apr-2025 |
Ming Qian <ming.qian@oss.nxp.com> |
media: imx-jpeg: Cleanup after an allocation error
When allocation failures are not cleaned up by the driver, further allocation errors will be false-positives, which will cause buffers to remain un
media: imx-jpeg: Cleanup after an allocation error
When allocation failures are not cleaned up by the driver, further allocation errors will be false-positives, which will cause buffers to remain uninitialized and cause NULL pointer dereferences. Ensure proper cleanup of failed allocations to prevent these issues.
Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
faa8051b | 21-Apr-2025 |
Ming Qian <ming.qian@oss.nxp.com> |
media: imx-jpeg: Reset slot data pointers when freed
Ensure that the slot data pointers are reset to NULL and handles are set to 0 after freeing the coherent memory. This makes he function mxc_jpeg_
media: imx-jpeg: Reset slot data pointers when freed
Ensure that the slot data pointers are reset to NULL and handles are set to 0 after freeing the coherent memory. This makes he function mxc_jpeg_alloc_slot_data() and mxc_jpeg_free_slot_data() safe to be called multiple times.
Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|
ab2fd4a0 | 12-Oct-2024 |
Guoniu.zhou <guoniu.zhou@nxp.com> |
media: nxp: imx8-isi: Add i.MX8ULP support
Add ISI support for i.MX8ULP.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: htt
media: nxp: imx8-isi: Add i.MX8ULP support
Add ISI support for i.MX8ULP.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241012084732.1036652-2-guoniu.zhou@oss.nxp.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
show more ...
|