summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2024-12-13media: verisilicon: av1: Store chroma and mv offsetsBenjamin Gaignard
Store the chroma and motion vector offsets for each frame so that they can be used later when the resolution changes. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: verisilicon: Fix IMX8 native pixel-format step valuesBenjamin Gaignard
The Hantro decoder non post-processed pixel-format steps are different from the post-processed ones. Fix the steps according to the hardware limitations. Since reference frame pixel-format issues have been fixed, it is possible to use V4L2_PIX_FMT_NV15_4L4 rather V4L2_PIX_FMT_P010_4L4 for 10bit streams. Fluster VP9 score goes up to 207/305. HEVC score is still 141/147. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: verisilicon: Store reference frames pixels formatBenjamin Gaignard
The Hantro decoder always produces tiled pixel-formats, but when the post-processor is used, the destination pixel-format is a non-tiled pixel-format. This causes an incorrect computation of the reference frame size and offsets. Get and save the correct tiled pixel-format for 8 and 10 bit streams to solve these computation issues. Fluster VP9 score increase to 166/305 (vs 145/305). HEVC score is still 141/147. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: mediatek: vcodec: mark vdec_vp9_slice_map_counts_eob_coef noinlineArnd Bergmann
With KASAN enabled, clang fails to optimize the inline version of vdec_vp9_slice_map_counts_eob_coef() properly, leading to kilobytes of temporary values spilled to the stack: drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c:1526:12: error: stack frame size (2160) exceeds limit (2048) in 'vdec_vp9_slice_update_prob' [-Werror,-Wframe-larger-than] This seems to affect all versions of clang including the latest (clang-20), but the degree of stack overhead is different per release. Marking the function as noinline_for_stack is harmless here and avoids the problem completely. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()Chun-Kuang Hu
Use the cmdq_pkt_create() and cmdq_pkt_destroy() common functions instead of implementing specific mdp3 versions. Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: platform: mtk-mdp3: Remove mask parameter from MM_REG_POLL macroNícolas F. R. A. Prado
Just like was done with MM_REG_WRITE, remove the mask from the MM_REG_POLL macro, leaving MM_REG_POLL_MASK to be used when a mask is required, and update the call sites accordingly. In this case, all calls require a mask, so MM_REG_POLL remains unused, but at least this makes the MM_REG_POLL macros consistent with the MM_REG_WRITE ones. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: platform: mtk-mdp3: Remove mask parameter from MM_REG_WRITE macroNícolas F. R. A. Prado
There are two macros to issue a cmdq write: MM_REG_WRITE_MASK and MM_REG_WRITE, but confusingly, both of them take a mask parameter. The difference is that MM_REG_WRITE additionally checks whether the mask passed in contains the register mask, in which case, the 0xffffffff mask is passed to cmdq_pkt_write_mask(), effectively disregarding the mask and calling cmdq_pkt_write() as an optimization. Move that optimization to the MM_REG_WRITE_MASK macro and make MM_REG_WRITE the variant that doesn't take a mask, directly calling to cmdq_pkt_write(). Change the call sites to MM_REG_WRITE whenever a mask wasn't necessary (ie 0xffffffff or a <register>_MASK was passed as mask) and in other cases to MM_REG_WRITE_MASK. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: platform: mtk-mdp3: Remove useless variadic arguments from macrosNícolas F. R. A. Prado
A few macros declare variadic arguments even though the underlying functions don't support them. Remove them. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-13media: platform: mtk-mdp3: Use cmdq_pkt_write when no mask is neededNícolas F. R. A. Prado
cmdq_pkt_write_mask() boils down to a cmdq_pkt_write() when the mask is 0xFFFFFFFF. Call cmdq_pkt_write() directly in those cases to simplify the code. Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-12media: stm32: dcmipp: add core support for the stm32mp25Alain Volmat
The stm32mp25 supports both parallel & csi inputs. An additional clock control is necessary. Skeleton of the subdev structures for the stm32mp25 is added, identical for the time being to the stm32mp13 however more subdeves will be added in further commits. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: fill media ctl hw_revision fieldAlain Volmat
Add hw_revision field information of the media controller so that application can distinguish between variants of DCMIPP implementations. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: avoid duplicated format on enum in bytecapAlain Volmat
Avoid duplication of enumerated pixelformat on the bytecap video capture device. Indeed, since the bytecap format list contains both CSI & parallel 16bits formats, ensure that same pixelformat are not reported twice when performing enumeration of supported formats. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: add 1X16 RGB / YUV formats supportAlain Volmat
Add 1X16 RGB & YUV formats support within bytecap & byteproc. Slightly change the link_validate function to be able to validate against either 1X16 or 2X8 variant of a format. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: add bayer 10~14 bits formatsAlain Volmat
Add support for bayer formats from 10 to 14 bits. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: add support for csi input into dcmipp-inputAlain Volmat
On stm32mp25, the dcmipp can accept data coming from a CSI bus in addition to the parallel interface. Add this support into dcmipp-input subdev. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: rename dcmipp_parallel into dcmipp_inputAlain Volmat
In preparation of the introduction of dcmipp csi input support, rename the dcmipp_parallel subdev into a generic dcmipp_input which will be in charge of handling both parallel input & csi input. Only structures / variables / functions and file naming are changed without any functional modifications. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: replace s_stream with enable/disable_streamsAlain Volmat
Replace s_stream ops with enable_streams and disable_streams. At the same time, use v4l2_subdev_enable_streams and v4l2_subdev_disable_streams functions instead of direct s_stream calls. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: use v4l2_subdev_is_streamingAlain Volmat
Rely on v4l2_subdev_is_streaming in order to know if the subdev is streaming or not instead of relying on a local variable. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: csi: addition of the STM32 CSI driverAlain Volmat
The STM32 CSI controller is tightly coupled with the DCMIPP and act as an input stage to receive data coming from the sensor and transferring them into the DCMIPP. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: stm32: dcmipp: correct dma_set_mask_and_coherent mask valueAlain Volmat
Correct the call to dma_set_mask_and_coherent which should be set to DMA_BIT_MASK(32). Fixes: 28e0f3772296 ("media: stm32-dcmipp: STM32 DCMIPP camera interface driver") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: lmedm04: Handle errors for lme2510_int_readChen Ni
Add check for the return value of usb_pipe_endpoint() and usb_submit_urb() in order to catch the errors. Fixes: 15e1ce33182d ("[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20240521091042.1769684-1-nichen@iscas.ac.cn Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-12-12media: qcom: camss: Add support for camss driver on sc7280Suresh Vankadara
Add support for the camss driver on the sc7280 soc. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Luca Weiss <luca.weiss@fairphone.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-12media: qcom: camss: Sort camss version enums and compatible stringsVikram Sharma
Sort CAMSS version enums and compatible strings alphanumerically. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-11media: rc: iguanair: handle timeoutsOliver Neukum
In case of a timeout the IO must be cancelled or the next IO using the URB will fail and/or overwrite an operational URB. The automatic bisection fails because it arrives at a commit that correctly lets the test case run without an error. Signed-off-by: Oliver Neukum <oneukum@suse.com> Fixes: e99a7cfe93fd ("[media] iguanair: reuse existing urb callback for command responses") Reported-by: syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/66f5cc9a.050a0220.46d20.0004.GAE@google.com/ Tested-by: syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-11media: mceusb: don't include 'pm_wakeup.h' directlyWolfram Sang
The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-11media: imon: don't push static constants on stack for %*phSean Young
There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-11media: mceusb: don't push static constants on stack for %*phSean Young
There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-11media: cx18: Remove unused cx18_reset_ir_gpioDr. David Alan Gilbert
cx18_reset_ir_gpio() has been unused in tree since 2009 commit eefe1010a465 ("V4L/DVB (10759): cx18: Convert GPIO connected functions to act as v4l2_subdevices") It has a comment saying it's exported for use by 'lirc_pvr150' but I don't see any sign of it in the lirc git, and I see it removed support for lirc_i2c.c 'Flavors of the Hauppage PVR-150...' in 2014. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-11media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_regNikita Zhandarovich
Syzbot reports [1] an uninitialized value issue found by KMSAN in dib3000_read_reg(). Local u8 rb[2] is used in i2c_transfer() as a read buffer; in case that call fails, the buffer may end up with some undefined values. Since no elaborate error handling is expected in dib3000_write_reg(), simply zero out rb buffer to mitigate the problem. [1] Syzkaller report dvb-usb: bulk message failed: -22 (6/0) ===================================================== BUG: KMSAN: uninit-value in dib3000mb_attach+0x2d8/0x3c0 drivers/media/dvb-frontends/dib3000mb.c:758 dib3000mb_attach+0x2d8/0x3c0 drivers/media/dvb-frontends/dib3000mb.c:758 dibusb_dib3000mb_frontend_attach+0x155/0x2f0 drivers/media/usb/dvb-usb/dibusb-mb.c:31 dvb_usb_adapter_frontend_init+0xed/0x9a0 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:290 dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:90 [inline] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:186 [inline] dvb_usb_device_init+0x25a8/0x3760 drivers/media/usb/dvb-usb/dvb-usb-init.c:310 dibusb_probe+0x46/0x250 drivers/media/usb/dvb-usb/dibusb-mb.c:110 ... Local variable rb created at: dib3000_read_reg+0x86/0x4e0 drivers/media/dvb-frontends/dib3000mb.c:54 dib3000mb_attach+0x123/0x3c0 drivers/media/dvb-frontends/dib3000mb.c:758 ... Fixes: 74340b0a8bc6 ("V4L/DVB (4457): Remove dib3000-common-module") Reported-by: syzbot+c88fc0ebe0d5935c70da@syzkaller.appspotmail.com Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru> Link: https://lore.kernel.org/r/20240517155800.9881-1-n.zhandarovich@fintech.ru Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-12-06media: rkisp1: Reduce min_queued_buffers to 1Jacopo Mondi
There apparently is no reason to require 3 queued buffers to call streamon() for the RkISP1 as the driver operates with a scratch buffer where frames can be directed to if there's no available buffer provided by userspace. Reduce the number of required buffers to 1 to allow applications to operate with a single queued buffer. Tested with libcamera, by operating with a single capture request. The same request (and associated capture buffer) gets recycled once completed. This of course causes a frame rate drop but doesn't hinder operations. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20241007124225.63463-1-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-06media: rkisp1: Fix unused value issueDheeraj Reddy Jonnalagadda
This commit fixes an unused value issue detected by Coverity (CID 1519008). The error condition for the invalid MIPI CSI-2 is not properly handled as the break statement would only exit the switch block and not the entire loop. Fix this by breaking from the look immediately after the switch block when an error occurs. Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com> Fixes: 7d4f126fde89 ("media: rkisp1: Make the internal CSI-2 receiver optional") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Link: https://lore.kernel.org/r/20241119072653.72260-1-dheeraj.linuxdev@gmail.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2024-12-04media: qcom: camss: document csiphy_lanes_cfg structureCaleb Connolly
Add documentation for struct csiphy_lanes_cfg. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: David Heidelberg <david@ixit.cz> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: added missing commit description]
2024-12-04media: qcom: camss: Restructure camss_link_entitiesVikram Sharma
Refactor the camss_link_entities function by breaking it down into three distinct functions. Each function will handle the linking of a specific entity separately. SC7280 and later targets mandates for 1:1 linking for csid -> vfe. i.e. csid0 can be mapped to vfe0 only. Signed-off-by: Suresh Vankadara <quic_svankada@quicinc.com> Signed-off-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com> Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-04media: qcom: camss: reducing the repitious error message stringVikram Sharma
Introducing a new function camss_link_err to avoid repition of same error message, improving code maintainability. Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02module: Convert symbol namespace to string literalPeter Zijlstra
Clean up the existing export namespace code along the same lines of commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") and for the same reason, it is not desired for the namespace argument to be a macro expansion itself. Scripted using git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; } $0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; done Requested-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc Acked-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02media: mgb4: Defines cleanupMartin Tůma
Do not define stuff used in a single source file in a global header. Do not mix defines with "bare" values in the initialization. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: mgb4: Unify register names in inputs/outputsMartin Tůma
Unify the names of HW hsync/vsync registers between the inputs and outputs. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: mgb4: Unify the outputs padding logic with the inputsMartin Tůma
Write the padding to the HW registers at the same place as the input logic does. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: s5p-mfc: Fix an error handling path s5p_mfc_open()Christophe JAILLET
A mfc_debug_enter() is not balanced by a corresponding mfc_debug_leave(). Add the missing call. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: tuners: fc0013 Remove unused functionsDr. David Alan Gilbert
fc0013_rc_cal_add() and fc0013_rc_cal_reset() were added in 2012's commit e889adc91187 ("[media] fc001x: tuner driver for FC0013") but haven't been used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: platform: exynos4-is: Remove unused fimc_is_param_strerrDr. David Alan Gilbert
fimc_is_param_strerr() was added in 2013 by commit 9a761e436843 ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver") but has never been called. Remove it. (The other possibility might be to add a call maybe in fimc-is-param ?) Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: b2c2: Remove unused functionsDr. David Alan Gilbert
flexcop_dma_control_size_irq() last use was removed in 2005 by commit 64221be7b900 ("[PATCH] dvb: flexcop: woraround irq stop problem") flexcop_dump_reg() last use was removed in 2009 by commit 382c5546d618 ("V4L/DVB (10694): [PATCH] software IRQ watchdog for Flexcop B2C2 DVB PCI cards") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: cx231xx: remove redundant assignment to variable valueColin Ian King
The variable value is being assigned a value that is never read afterwards, the following if statement re-assigns it with a new value in both paths of the if statement. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: cxd2841er: fix 64-bit division on gcc-9Arnd Bergmann
It appears that do_div() once more gets confused by a complex expression that ends up not quite being constant despite __builtin_constant_p() thinking it is: ERROR: modpost: "__aeabi_uldivmod" [drivers/media/dvb-frontends/cxd2841er.ko] undefined! Use div_u64() instead, forcing the expression to be evaluated first, and making it a bit more readable. Cc: Dan Carpenter <dan.carpenter@linaro.org> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Closes: https://lore.kernel.org/linux-media/CA+G9fYvvNm-aYodLaAwwTjEGtX0YxR-1R14FOA5aHKt0sSVsYg@mail.gmail.com/ Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Closes: https://lore.kernel.org/linux-media/CA+G9fYvvNm-aYodLaAwwTjEGtX0YxR-1R14FOA5aHKt0sSVsYg@mail.gmail.com/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: added Closes tags]
2024-12-02media: remove dead TI wl128x FM radio driverLukas Bulwahn
Commit 78fe66360ed6 ("misc: ti-st: st_kim: remove the driver") deletes the ti-st driver and its corresponding config option TI_ST. With that deletion, the Texas Instruments WL128x FM Radio driver is now dead as well. Delete this obsolete driver. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: imx-jpeg: Fix potential error pointer dereference in detach_pm()Dan Carpenter
The proble is on the first line: if (jpeg->pd_dev[i] && !pm_runtime_suspended(jpeg->pd_dev[i])) If jpeg->pd_dev[i] is an error pointer, then passing it to pm_runtime_suspended() will lead to an Oops. The other conditions check for both error pointers and NULL, but it would be more clear to use the IS_ERR_OR_NULL() check for that. Fixes: fd0af4cd35da ("media: imx-jpeg: Ensure power suppliers be suspended before detach them") Cc: <stable@vger.kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Ming Qian <ming.qian@nxp.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-12-02media: platform: mtk-mdp3: cmdq: Remove duplicated platforms checksMohammed Anees
The platform compatibility checks for MT8183 and MT8195 in mdp_cmdq_prepare() are redundant as they are done in __get_config_offset() itself. Furthermore there are two if-else branch in __get_config_offset() which have similar conditions and are redundant. To address this, remove the check in mdp_cmdq_prepare() and combine the two if-else branch into one in __get_config_offset(). Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2024-11-20Merge tag 'media/v6.13-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: - uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format * tag 'media/v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
2024-11-20Merge tag 'media/v6.13-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - removal of the old omap4iss media driver - mantis: remove orphan mantis_core.h - add support for Raspberypi CFE - uvc driver got a co-maintainer - main media tree moved to git://linuxtv.org/media.git - lots of driver cleanups, updates and fixes * tag 'media/v6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (233 commits) docs: media: update location of the media patches MAINTAINERS: update location of media main tree media: MAINTAINERS: Add Hans de Goede as USB VIDEO CLASS co-maintainer media: platform: samsung: s5p-jpeg: Remove deadcode media: qcom: camss: Add MSM8953 resources media: dt-bindings: Add qcom,msm8953-camss media: qcom: camss: implement pm domain ops for VFE v4.1 media: platform: exynos4-is: Fix an OF node reference leak in fimc_md_is_isp_available media: adv7180: Also check for "adi,force-bt656-4" media: dt-bindings: adv7180: Document 'adi,force-bt656-4' media: mgb4: Fix inconsistent input/output alignment in loopback mode media: replace obsolete hans.verkuil@cisco.com alias Documentation: media: improve V4L2_CID_MIN_BUFFERS_FOR_*, doc media: vicodec: add V4L2_CID_MIN_BUFFERS_FOR_* controls media: atomisp: Add check for rgby_data memory allocation failure media: atomisp: remove redundant re-checking of err media: atomisp: Fix spelling errors reported by codespell media: atomisp: Remove License information boilerplate media: atomisp: Fix typos in comment media: atomisp: hmm_bo: Fix spelling errors in hmm_bo.h ...