summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* media: raspberrypi: Switch to remove_newStephen Rothwell2024-07-121-4/+2
| | | | | | | | | | | | | | | The remove callback's return value is about to change from int to void, this is done by commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void"). Prepare for merging the patch by switching the PiSP driver from remove to remove_new callback. Fixes: 12187bd5d4f8 ("media: raspberrypi: Add support for PiSP BE") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Naushir Patuck <naush@raspberrypi.com> Acked-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: stm32: dcmipp: correct error handling in dcmipp_create_subdevsAlain Volmat2024-07-031-2/+2
| | | | | | | | | | | | Correct error handling within the dcmipp_create_subdevs by properly decrementing the i counter when releasing the subdevs. 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-cisco@xs4all.nl> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> [hverkuil: correct the indices: it's [i], not [i - 1].]
* media: atomisp: Fix spelling mistakes in sh_css_sp.cRoshan Khatri2024-07-021-11/+13
| | | | | | | | | | | Codespell reported misspelled fields,suppress,separately and offset in file sh_css_sp.c. This patch fixes the misspellings. Signed-off-by: Roshan Khatri <topofeverest8848@gmail.com> Link: https://lore.kernel.org/r/20240507052512.7296-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Fix spelling mistake in ia_css_debug.cRoshan Khatri2024-07-021-2/+2
| | | | | | | | | | | codespell reported misspelled suppress and implicit on ia_css_debug.c. This patch fixes the misspellings. Signed-off-by: Roshan Khatri <topofeverest8848@gmail.com> Link: https://lore.kernel.org/r/20240506055818.2532-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Fix spelling mistake in hmm_bo.cRoshan Khatri2024-07-021-2/+2
| | | | | | | | | | | codespell reported misspelled unchanged in hmm_bo.c at two places. This patch fixes the misspellings. Signed-off-by: Roshan Khatri <topofeverest8848@gmail.com> Link: https://lore.kernel.org/r/20240505132345.135528-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Fix spelling mistake in ia_css_eed1_8.host.cRoshan Khatri2024-07-021-1/+1
| | | | | | | | | | | codespell reported misspelled calculating in ia_css_eed1_8.host.c. This patch fixes the misspellings. Signed-off-by: Roshan Khatri <topofeverest8848@gmail.com> Link: https://lore.kernel.org/r/20240505032931.133879-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Fix spelling mistake in sh_css_internal.hRoshan Khatri2024-07-021-2/+2
| | | | | | | | | | | codespell reported misspelled words still and member. This patch fixes misspellings. Signed-off-by: Roshan Khatri <topofeverest8848@gmail.com> Link: https://lore.kernel.org/r/20240501162620.86865-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Fix spelling mistake "pipline" -> "pipeline"Colin Ian King2024-07-021-1/+1
| | | | | | | | | | There is a spelling mistake in a dev_err() message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240429075146.1073869-1-colin.i.king@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Remove unused GPIO related defines and APIsAndy Shevchenko2024-07-027-165/+7
| | | | | | | | | | Remove unused GPIO related defines and APIs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240424210800.1776038-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Replace COMPILATION_ERROR_IF() by static_assert()Andy Shevchenko2024-07-0210-65/+40
| | | | | | | | | | Replace COMPILATION_ERROR_IF() by static_assert(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240424184421.1737776-3-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Clean up unused macros from math_support.hAndy Shevchenko2024-07-027-139/+20
| | | | | | | | | | | Clean up unused macros from math_support.h and replace rarely used by generic ones from Linux kernel headers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240424184421.1737776-2-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: csi2-bridge: Add DMI quirk for OV5693 on Xiaomi Mipad2Hans de Goede2024-07-021-0/+14
| | | | | | | | | | | The OV5693 the Xiaomi Mipad2 is used as a front facing sensor and as such is connected to CsiPort 0, but the _DSM has CsiPort 1, add a DMI quirk to override the wrong _DSM setting. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240603132057.255917-5-hdegoede@redhat.com Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Update TODOHans de Goede2024-07-021-29/+2
| | | | | | | | | | | Update the TODO list: - Remove comment about adding firmware to linux-firmware this has been done - Add a comment about removing unnecessary / unwanted module parameters Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240603132057.255917-4-hdegoede@redhat.com Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Prefix firmware paths with "intel/ipu/"Hans de Goede2024-07-021-3/+6
| | | | | | | | | | | | | | The atomisp firmwares have been added to upstream linux-firmware under intel/ipu/ add this prefix to the firmware name passed to request_firmware(). Fall back to the old location if this fails to avoid breaking existing setups. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240603132057.255917-3-hdegoede@redhat.com Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Remove firmware_name module parameterHans de Goede2024-07-021-21/+13
| | | | | | | | | | | | | There is no need for the user to be able to specify a different name for the firmware being loaded. Most other kernel drivers do not have this and work fine without it. Drop this unnecessary module parameter. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240603132057.255917-2-hdegoede@redhat.com Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: Remove unused mipicsi_flag module parameterHans de Goede2024-07-022-5/+0
| | | | | | | | | The mipicsi_flag int is completely unused, remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240603132057.255917-1-hdegoede@redhat.com Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: venus: fix use after free in vdec_closeDikshita Agarwal2024-06-301-0/+1
| | | | | | | | | | | | | | | | | There appears to be a possible use after free with vdec_close(). The firmware will add buffer release work to the work queue through HFI callbacks as a normal part of decoding. Randomly closing the decoder device from userspace during normal decoding can incur a read after free for inst. Fix it by cancelling the work in vdec_close. Cc: stable@vger.kernel.org Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: venus: add msm8998 supportPierre-Hugues Husson2024-06-301-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing bits for msm8998 support. Downstream vendor code for reference: https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/ kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi#L42-53 qcom,load-freq-tbl = /* Encoders */ <972000 465000000 0x55555555>, /* 4k UHD @ 30 */ <489600 360000000 0x55555555>, /* 1080p @ 60 */ <244800 186000000 0x55555555>, /* 1080p @ 30 */ <108000 100000000 0x55555555>, /* 720p @ 30 */ /* Decoders */ <1944000 465000000 0xffffffff>, /* 4k UHD @ 60 */ < 972000 360000000 0xffffffff>, /* 4k UHD @ 30 */ < 489600 186000000 0xffffffff>, /* 1080p @ 60 */ < 244800 100000000 0xffffffff>; /* 1080p @ 30 */ Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: venus: avoid multiple core dumpsDikshita Agarwal2024-06-302-1/+7
| | | | | | | | | | | | | | | Core dump is generated whenever there is system error reported by firmware. Right now, multiple such dumps are generated if recovery fails in first attempt, since the sys error handler is invoked again for every failed recovery. To avoid it, add conditional check to generate core dump only once during every system error notification from firmware. Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: document new dump_core field]
* media: venus: flush all buffers in output plane streamoffDikshita Agarwal2024-06-301-1/+1
| | | | | | | | | | | | | | | | For scenarios, when source change is followed by VIDIOC_STREAMOFF on output plane, driver should discard any queued OUTPUT buffers, which are not decoded or dequeued. Flush with HFI_FLUSH_INPUT does not have any actual impact. So, fix it, by invoking HFI_FLUSH_ALL, which will flush all queued buffers. Fixes: 85872f861d4c ("media: venus: Mark last capture buffer") Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Nathan Hebert <nhebert@chromium.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: videobuf2: add missing MODULE_DESCRIPTION() macroJeff Johnson2024-06-291-0/+1
| | | | | | | | | | | | With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/common/videobuf2/videobuf2-dvb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: helpers library -> helper library]
* media: em28xx: Set GPIOs for non-audio boards when switching inputNils Rothaug2024-06-291-1/+2
| | | | | | | | | | | Fixes changing the Line Out audio source with the video input on MyGica UTV3 board. Previously, GPIOs were only set in em28xx_set_audio_source(), which only boards with USB audio support reach. Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: em28xx: Add support for MyGica UTV3Nils Rothaug2024-06-292-0/+53
| | | | | | | | | | | | | | | | | The MyGica UTV3 Analog USB2.0 TV Box is a USB video capture card that has analog TV, composite video, and FM radio inputs, an IR remote, and provides audio only as Line Out, but not over USB. Mine is prepared for an FM tuner, but not equipped with one. Support for FM radio is therefore missing. The device contains: - Empia EM2860 USB bridge - Philips SAA7113 video decoder - NXP TDA9801T demodulator - Tena TNF931D-DFDR1 tuner - ST HCF4052 demux, switches input audio to Line Out Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: rc: add keymap for MyGica UTV3 remoteNils Rothaug2024-06-292-0/+70
| | | | | | | | | Add keymap for the simple IR (RC-5) remote that comes with the MyGica UTV3 Analog USB2.0 TV Box video capture card. Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: tuner-simple: Add support for Tena TNF931D-DFDR1Nils Rothaug2024-06-291-0/+21
| | | | | | | | | Tuner ranges were determined by USB capturing the vendor driver of a MyGica UTV3 video capture card. Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Add check for v4l2_fwnode_endpoint_parseChen Ni2024-06-291-1/+4
| | | | | | | | Add check for the return value of v4l2_fwnode_endpoint_parse() and return the error if it fails in order to catch the error. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: dvb-usb: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-292-0/+2
| | | | | | | | | | | With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/usb/dvb-usb/dvb-usb-dibusb-common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/usb/dvb-usb/dvb-usb-dibusb-mc-common.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* usb: uvc: add missing MODULE_DESCRIPTION() macroJeff Johnson2024-06-291-0/+1
| | | | | | | | | | | With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/common/uvc.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: uda1342: add missing MODULE_DESCRIPTION() macroJeff Johnson2024-06-291-0/+1
| | | | | | | | | | With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/i2c/uda1342.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: dvb-frontends: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-292-0/+2
| | | | | | | | | | | With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/dvb-frontends/au8522_decoder.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/dvb-frontends/mb86a16.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: atomisp: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-292-0/+2
| | | | | | | | | | | make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/media/atomisp/i2c/atomisp-mt9m114.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/media/atomisp/i2c/atomisp-libmsrlisthelper.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: ti: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-291-0/+1
| | | | | | | | | | make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/ti/vpe/ti-vpdma.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: exynos4-is: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-293-0/+3
| | | | | | | | | | | | make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/samsung/exynos4-is/exynos-fimc-lite.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/samsung/exynos4-is/exynos-fimc-is.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/samsung/exynos4-is/exynos4-is-common.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Decouple VFE from CSIDMilen Mitkov2024-06-294-5/+89
| | | | | | | | | | | | | | | Decouple the direct calls to VFE's vfe_get/put in the CSID subdev in order to prepare for the introduction of IFE subdev. Also decouple CSID base address from VFE since on the Titan platform CSID register base address resides within VFE's base address. Signed-off-by: Milen Mitkov <quic_mmitkov@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Decompose register and link operationsAtanas Filipov2024-06-292-61/+81
| | | | | | | | | | | | Split link and register operations. Add dedicated link callback according to SoC identifier. Signed-off-by: Atanas Filipov <quic_afilipov@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Split testgen, RDI and RX for CSID 170Milen Mitkov2024-06-291-114/+135
| | | | | | | | | | | | | | Split the RAW interface (RDI), the CSID receiver (RX) and test pattern generator (testgen), configurations for CSID on Titan 170 Signed-off-by: Milen Mitkov <quic_mmitkov@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: folded https://lore.kernel.org/linux-media/20240626074730.85-1-quic_grosikop@quicinc.com/ into this patch]
* media: qcom: camss: Move format related functionsRadoslav Tsvetkov2024-06-295-88/+121
| | | | | | | | | | Move out the format related helper functions from vfe and video in a separate file. The goal here is to create a format API. Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Attach formats to CSIPHY resourcesRadoslav Tsvetkov2024-06-293-58/+85
| | | | | | | | | | | | Following the example of VFE and CSID, attach the CSIPHY formats to the subdevices resources. Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Attach formats to CSID resourcesRadoslav Tsvetkov2024-06-296-491/+538
| | | | | | | | | | | | Following the example of VFE, move all formats of the decoder to camss-csid.c and attach them to the subdevices resources. Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Attach formats to VFE resourcesRadoslav Tsvetkov2024-06-297-402/+378
| | | | | | | | | | | | | | | | | | | Video node formats have direct dependency by the sub-device pad formats. Remove dependency for SoC version and move format definitions in device which creates video node. This commit attaches a struct to the VFE resources that holds format description, so it is much easier to assign them to the video node. No need to use a switch-case. NOTE: The mbus_bpp is used to calculate the clock rates and is different from bpp which is the bits per pixel written to memory. We need to keep both values to not break the calcualtions. Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: qcom: camss: Add per sub-device type resourcesRadoslav Tsvetkov2024-06-2913-196/+343
| | | | | | | | | | | | | | | | | Currently resources structure grows with additional parameters required for each sub-deivce. However each sub-device has some specific resources or configurations which need to be passed during the initialization. This change adds per sub-device type structure to simplify the things and removes the magical void pointer to hw_ops. Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com> Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: vivid: loopback based on 'Connected To' controlsHans Verkuil2024-06-2811-277/+362
| | | | | | | | | | | | | | | | Instead of using hardwired video loopback limited to a single vivid instance, use the new 'Connected To' controls to only loopback if an HDMI or S-Video input is connected to another output, which can be in another vivid instance. Effectively this emulates connecting and disconnecting an HDMI/S-Video cable. The Loop Video control is dropped since it has now been replaced by the new 'Connected To' controls. The Display Present has also been dropped since it no longer fits. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Co-developed-by: Dorcas Anono Litunya <anonolitunya@gmail.com> Signed-off-by: Dorcas Anono Litunya <anonolitunya@gmail.com>
* media: vivid: Add 'Is Connected To' menu controlsDorcas Anono Litunya2024-06-283-17/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The video loopback functionality in vivid is very crude. What we really want is to be able to emulate connecting an HDMI or S-Video input to an HDMI or S-Video output, and the input and output can be in different vivid instances. Effectively this emulates what happens when you physically connect an HDMI or S-Video cable between two devices. In particular, this makes prototyping with vivid much more realistic. This patch creates a menu control for each HDMI or S-Video input. The menu control starts with "Test Pattern Generator" and "None" (i.e. disconnected). After that up to 62 HDMI or S-Video outputs are listed that you can connect the input to. If there are more than 62 HDMI or S-Video outputs, then those will not be included in the menu (currently menucontrols have max 64 entries). If an input is connected to an output, then all other 'Connected To' controls are updated to exclude that output to avoid having multiple inputs connected to the same output. Signed-off-by: Dorcas Anono Litunya <anonolitunya@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: use u8 in loops in vivid_create_controls() to avoid truncate warning]
* media: vivid: add instance number to input/output namesHans Verkuil2024-06-282-12/+12
| | | | | | | | | | Add the instance number before the input or output number. So "HDMI 1" becomes "HDMI 000-1". This is helps identifying which input or output belongs to which vivid instance. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: vivid: don't set HDMI TX controls if there are no HDMI outputsHans Verkuil2024-06-281-4/+8
| | | | | | | | | | | | When setting the EDID it would attempt to update two controls that are only present if there is an HDMI output configured. If there isn't any (e.g. when the vivid module is loaded with node_types=1), then calling VIDIOC_S_EDID would crash. Fix this by first checking if outputs are present. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: vivid: vidioc_g_edid: do not change the original input EDIDHans Verkuil2024-06-282-4/+22
| | | | | | | | | | | Returning an EDID for a connected output would modify the original input EDID with the physical address of the output. That causes problems, and it should just update the physical address of the output EDID. Update vivid_hdmi_edid to set the physical address to 0.0.0.0. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* Revert "media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs"Hans Verkuil2024-06-271-1/+1
| | | | | | | This reverts commit 77d32b7e2a7b2e5389b67363d25371b4b8cad140. This patch is obviously wrong (causes array accesses at index -1), and I caught that just too late.
* media: imx-mipi-csis: Use v4l2_subdev_enable_streams()Laurent Pinchart2024-06-271-7/+15
| | | | | | | | | | | | | | | To support sources that implement the .enable_streams() and .disable_streams() operations, replace the manual calls to the subdev .s_stream() operation with the v4l2_subdev_enable_streams() and v4l2_subdev_disable_streams() helpers. The helpers fall back to .s_stream() if the source doesn't implement the new operations, so backward compatibility is preserved. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: i2c: gc2145: use CCI_REG16_LE for little-endian registersAlain Volmat2024-06-271-10/+5
| | | | | | | | | Use CCI_REG16_LE macro in order to access little-endian encoded registers of the P3 (CSI) section. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
* media: i2c: gc2145: addition of RAW8 formats supportAlain Volmat2024-06-271-8/+67
| | | | | | | | | Adds support for RAW8 formats (BGGR/RGGB/RBRG/BRBG). Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: fix typo: colospace -> colorspace]