- Mar 07, 2025
-
-
Arnd Bergmann authored
The errno.h header is not always included indirectly, leading to rare randconfig build warnings. drivers/media/pci/mgb4/mgb4_regs.c:20:11: error: use of undeclared identifier 'EINVAL' 20 | return -EINVAL; Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dan Carpenter authored
The num_clks is set this way: hdmirx_dev->num_clks = devm_clk_bulk_get_all(dev, &hdmirx_dev->clks); if (hdmirx_dev->num_clks < 1) return -ENODEV; The devm_clk_bulk_get_all() function returns negative error codes so the hdmirx_dev->num_cks variable needs to be signed for the error handling to work. Fixes: 7b59b132 ("media: platform: synopsys: Add support for HDMI input driver") Signed-off-by:
Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Nathan Chancellor authored
The build fails for 32-bit targets with: arm-linux-gnueabi-ld: drivers/media/platform/synopsys/hdmirx/snps_hdmirx.o: in function `hdmirx_get_timings': snps_hdmirx.c:(.text.hdmirx_get_timings+0x46c): undefined reference to `__aeabi_uldivmod' bt->pixelclock is __u64, which causes the compiler to emit a libcall for 64-bit division. Use the optimized kernel helper, div_u64(), to resolve this. Fixes: 7b59b132 ("media: platform: synopsys: Add support for HDMI input driver") Signed-off-by:
Nathan Chancellor <nathan@kernel.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
- Mar 06, 2025
-
-
Matthew Majewski authored
Move the v4l2_info() call displaying the video device name after the device is actually registered. This fixes a bug where the driver was always displaying "/dev/video0" since it was reading from the vfd before it was registered. Fixes: cf7f3477 ("media: vim2m: Register video device after setting up internals") Cc: stable@vger.kernel.org Signed-off-by:
Matthew Majewski <mattwmajewski@gmail.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Ricardo Ribalda authored
vivid-osd depends on CONFIG_FB, which can be a large dependency. Introduce CONFIG_VIDEO_VIVID_OSD to control enabling support for testing output overlay. Suggested-by:
Slawomir Rosek <srosek@google.com> Co-developed-by:
Slawomir Rosek <srosek@google.com> Signed-off-by:
Slawomir Rosek <srosek@google.com> Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: add newline to squash checkpatch warning]
-
Ricardo Ribalda authored
Most references to fb_info are already within vivid-osd.c. This patch moves the remaining references into vivid-osd.c. We also take this opportunity to make the function names in vivid-osd more consistent. This is a preparation patch to make CONFIG_FB optional for vivid. Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dmitry Osipenko authored
Move cached EDID that takes 512 bytes to the bottom of struct snps_hdmirx_dev to improve CPU's cache locality of the struct. Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dmitry Osipenko authored
HDMI audio CODEC is unsupported in the current version of the driver. Support may come later. Remove HDMI CODEC bits that were left out by accident to keep code consistent. Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dmitry Osipenko authored
Remove second v4l2-common.h header inclusion. Reported-by:
kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202503061231.PHF6hEL2-lkp@intel.com/ Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Robin Murphy authored
Depending on IOMMU_DMA is suspicious, since the low-level DMA ops internals and MSI helpers is provides are not of interest to general drivers. In practice it mostly seems to be serving as a dependency on ARM64 here, so do that properly. The venus driver looks like it won't actually be useful at runtime without the IOMMU API, so add that too. Signed-off-by:
Robin Murphy <robin.murphy@arm.com> Reviewed-by:
Robert Foss <robert.foss@linaro.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Ricardo Ribalda authored
The datasheet recommends 55MHz frequency sampling, with a max of 69 MHz. (Kudos to Kosta Stefanov for the calculations). Replace z with a 32 bit uint, and make the range of the variable explicit. Found by cocci: drivers/media/dvb-frontends/tda10048.c:345:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. Reviewed-by:
Kosta Stefanov <costa.stephanoff@gmail.com> Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Jiasheng Jiang authored
Add check for the return value of clk_enable() to gurantee the success. Fixes: 002e8f0d ("media: stm32-dma2d: STM32 DMA2D driver") Cc: stable@vger.kernel.org Signed-off-by:
Jiasheng Jiang <jiashengjiangcool@gmail.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dan Carpenter authored
This loop was recently converted to use for_each_of_graph_port() which automatically does __cleanup__ on the "port" iterator variable. Delete the calls to of_node_put(port) to avoid a double put bug. Fixes: 393194cd ("media: xilinx-tpg: use new of_graph functions") Cc: stable@vger.kernel.org Signed-off-by:
Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Yuan Can authored
The smsdvb_module_init() returns without checking the retval from smscore_register_hotplug(). If the smscore_register_hotplug() failed, the module failed to install, leaving the smsdvb_debugfs not unregistered. Fixes: 3f6b87cf ("[media] siano: allow showing the complete statistics via debugfs") Cc: stable@vger.kernel.org Signed-off-by:
Yuan Can <yuancan@huawei.com> Acked-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Markus Elfring authored
An of_node_put(i2c_bus) call was immediately used after a pointer check for an of_find_i2c_adapter_by_node() call in this function implementation. Thus call such a function only once instead directly before the check. This issue was transformed by using the Coccinelle software. Signed-off-by:
Markus Elfring <elfring@users.sourceforge.net> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Markus Elfring authored
An of_node_put(ep) call was immediately used after a return value check for a v4l2_fwnode_endpoint_parse() call in this function implementation. Thus call such a function only once instead directly before the check. This issue was transformed by using the Coccinelle software. Signed-off-by:
Markus Elfring <elfring@users.sourceforge.net> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Fei Shao authored
Revise the description of MediaTek video decoder to improve wording, fix typos, simplify diagram, and extend the pipeline architecture used in newer MediaTek SoCs (MT8186 and MT8188). Signed-off-by:
Fei Shao <fshao@chromium.org> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Fei Shao authored
On MediaTek platforms with Multimedia MMU (M4U), a multimedia hardware can be assigned with a local arbiter (LARB) which has a maximum of 32 ports for MediaTek's IOMMU infrastructure. That means there can be at most 32 items in the iommus property in theory. Instead of relaxing the max item count every time a newly introduced device tree hits the limit, bump the number to 32 as an one-time effort. On the other hand, all existing and foreseeable JPEG decoder nodes at this point have at least 2 IOMMUs, so set minItems to 2 accordingly. Signed-off-by:
Fei Shao <fshao@chromium.org> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Karina Yankevich authored
In v4l2_detect_gtf(), it seems safer to cast the 32-bit image_width variable to the 64-bit type u64 before multiplying to avoid a possible overflow. The resulting object code even seems to look better, at least on x86_64. Found by Linux Verification Center (linuxtesting.org) with Svace. [Sergey: rewrote the patch subject/descripition] Fixes: c9bc9f50 ("[media] v4l2-dv-timings: fix overflow in gtf timings calculation") Cc: stable@vger.kernel.org Signed-off-by:
Karina Yankevich <k.yankevich@omp.ru> Signed-off-by:
Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
John Keeping authored
The arguments to rga_lookup_draw_pos() are passed in the wrong order, rotate mode should be before mirror mode. Fixes: 558c248f ("media: rockchip: rga: split src and dst buffer setup") Cc: stable@vger.kernel.org Signed-off-by:
John Keeping <jkeeping@inmusicbrands.com> Reviewed-by:
Michael Tretter <m.tretter@pengutronix.de> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Michael Tretter authored
Returned buffers shouldn't contain V4L2_FIELD_ANY as field. Set the field to V4L2_FIELD_NONE, if it isn't set. Signed-off-by:
Michael Tretter <m.tretter@pengutronix.de> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Santiago Ruano Rincón authored
Fix checkpatch error "ERROR: that open brace { should be on the previous line" in ia_css_sdis.host.c:253 and :258. Signed-off-by:
Santiago Ruano Rincón <santiagorr@riseup.net> Reviewed-by:
Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Santiago Ruano Rincón authored
Fix checkpatch error "ERROR: open brace '{' following function definitions go on the next line" in sdis_1.0/ia_css_sdis.host.c:239. Signed-off-by:
Santiago Ruano Rincón <santiagorr@riseup.net> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Laurent Pinchart authored
Many functions operate on data structures that are read only, both in the implementation and by design. Mark them as const to increase readability and avoid future mistakes. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Vitaliy Shevtsov authored
[Why] There are several ns_to_ktime() calls that require using nanoseconds. It is better to replace them with us_to_ktime() to make code clear, getting rid of multiplication by 1000. Also the timer function code may have an integer wrap-around issue. Since both tx_custom_low_usecs and tx_custom_high_usecs can be set to up to 9999999 from the user space via cec_pin_error_inj_parse_line(), this may cause usecs to be overflowed when adap->monitor_pin_cnt is zero and usecs is multiplied by 1000. [How] Take advantage of using an appropriate helper func us_to_ktime() instead of ns_to_ktime() to improve readability and to make the code clearer. And this also mitigates possible integer wrap-arounds when usecs value is too large and it is multiplied by 1000. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by:
Vitaliy Shevtsov <v.shevtsov@mt-integration.ru> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dongcheng Yan authored
Lontium LT9611UXE is a HDMI to MIPI CSI-2 bridge. The device supports modes up to 4k@60fps, obtains the video information and switches the current mode once the video signal changes. Signed-off-by:
Dongcheng Yan <dongcheng.yan@intel.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: fix smatch warning: missing error code 'ret'] [hverkuil: fix coccinelle IRQF_ONESHOT warning]
-
- Mar 05, 2025
-
-
Nikita Zhandarovich authored
Syzbot reported [1] a warning prompted by a check in call_s_stream() that checks whether .s_stream() operation is warranted for unstarted or stopped subdevs. Add a simple fix in vimc_streamer_pipeline_terminate() ensuring that entities skip a call to .s_stream() unless they have been previously properly started. [1] Syzbot report: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5933 at drivers/media/v4l2-core/v4l2-subdev.c:460 call_s_stream+0x2df/0x350 drivers/media/v4l2-core/v4l2-subdev.c:460 Modules linked in: CPU: 0 UID: 0 PID: 5933 Comm: syz-executor330 Not tainted 6.13.0-rc2-syzkaller-00362-g2d8308bf5b67 #0 ... Call Trace: <TASK> vimc_streamer_pipeline_terminate+0x218/0x320 drivers/media/test-drivers/vimc/vimc-streamer.c:62 vimc_streamer_pipeline_init drivers/media/test-drivers/vimc/vimc-streamer.c:101 [inline] vimc_streamer_s_stream+0x650/0x9a0 drivers/media/test-drivers/vimc/vimc-streamer.c:203 vimc_capture_start_streaming+0xa1/0x130 drivers/media/test-drivers/vimc/vimc-capture.c:256 vb2_start_streaming+0x15f/0x5a0 drivers/media/common/videobuf2/videobuf2-core.c:1789 vb2_core_streamon+0x2a7/0x450 drivers/media/common/videobuf2/videobuf2-core.c:2348 vb2_streamon drivers/media/common/videobuf2/videobuf2-v4l2.c:875 [inline] vb2_ioctl_streamon+0xf4/0x170 drivers/media/common/videobuf2/videobuf2-v4l2.c:1118 __video_do_ioctl+0xaf0/0xf00 drivers/media/v4l2-core/v4l2-ioctl.c:3122 video_usercopy+0x4d2/0x1620 drivers/media/v4l2-core/v4l2-ioctl.c:3463 v4l2_ioctl+0x1ba/0x250 drivers/media/v4l2-core/v4l2-dev.c:366 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2b85c01b19 ... Reported-by:
<syzbot+5bcd7c809d365e14c4df@syzkaller.appspotmail.com> Closes: https://syzkaller.appspot.com/bug?extid=5bcd7c809d365e14c4df Fixes: adc589d2 ("media: vimc: Add vimc-streamer for stream control") Cc: stable@vger.kernel.org Signed-off-by:
Nikita Zhandarovich <n.zhandarovich@fintech.ru> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Colin Ian King authored
There is a spelling mistake in a dprink message. Fix it. Signed-off-by:
Colin Ian King <colin.i.king@gmail.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Aakarsh Jain authored
There is a possibility of getting page fault if the overall buffer size is not aligned to 256bytes. Since MFC does read operation only and it won't corrupt the data values even if it reads the extra bytes. Corrected luma and chroma plane sizes for V4L2_PIX_FMT_NV12M and V4L2_PIX_FMT_NV21M pixel format. Suggested-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Aakarsh Jain <aakarsh.jain@samsung.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Acked-by:
Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Dr. David Alan Gilbert authored
omap3isp_print_status() was added in 2011 by commit 448de7e7 ("[media] omap3isp: OMAP3 ISP core") but has remained unused. Remove it (and it's associated #defines). Signed-off-by:
Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Shreeya Patel authored
Add initial support for the Synopsys DesignWare HDMI RX Controller Driver used by Rockchip RK3588. The driver supports: - HDMI 1.4b and 2.0 modes (HDMI 4k@60Hz) - RGB888, YUV422, YUV444 and YCC420 pixel formats - CEC - EDID configuration The hardware also has Audio and HDCP capabilities, but these are not yet supported by the driver. Co-developed-by:
Dingxian Wen <shawn.wen@rock-chips.com> Signed-off-by:
Dingxian Wen <shawn.wen@rock-chips.com> Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com> Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Shreeya Patel authored
Document bindings for the Synopsys DesignWare HDMI RX Controller. Reviewed-by:
Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com> Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Shreeya Patel authored
Add an entry for Synopsys DesignWare HDMI Receiver Controller Driver. Reviewed-by:
Christopher Obbard <chris.obbard@collabora.com> Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com> Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Hans Verkuil authored
Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Hans Verkuil authored
Standardize reporting of rectangles to (t,l)/wxh. Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Ricardo Ribalda authored
Now that vidioc_s_ctrl is gone we want to remove that string from all the codebase. Besides, it isn't the correct name of this function anyway. It's clearly a left-over from the past. Suggested-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Ricardo Ribalda authored
We use this logic in a couple of places. Refactor into a function. No functional change expected from this patch. Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Ricardo Ribalda authored
All the drivers either use the control framework or provide a vidiod_ext_ctrl. We can remove this callback. Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Ricardo Ribalda authored
The driver has been converted to the control framework in the past: commit 88b6ffed ("[media] cx231xx-417: convert to the control framework"). This function is never called, the core will only use the control framework instead. Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Tested-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Ricardo Ribalda authored
All the drivers either use the control framework or provide a vidioc_g_ext_ctrls callback. We can remove this callback. Thanks for your service! Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-