aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-29media: videobuf2: add missing MODULE_DESCRIPTION() macroJeff Johnson1-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 <[email protected]> Acked-by: Tomasz Figa <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: helpers library -> helper library]
2024-06-29media: em28xx: Set GPIOs for non-audio boards when switching inputNils Rothaug1-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 <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: em28xx: Add support for MyGica UTV3Nils Rothaug3-0/+61
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 <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: dt-bindings: rc: add rc-mygica-utv3Nils Rothaug1-0/+1
Add a binding for the rc-mygica-utv3 keymap Signed-off-by: Nils Rothaug <[email protected]> Acked-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: rc: add keymap for MyGica UTV3 remoteNils Rothaug3-0/+71
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 <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: tuner-simple: Add support for Tena TNF931D-DFDR1Nils Rothaug3-0/+24
Tuner ranges were determined by USB capturing the vendor driver of a MyGica UTV3 video capture card. Signed-off-by: Nils Rothaug <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Add check for v4l2_fwnode_endpoint_parseChen Ni1-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: dvb-usb: add missing MODULE_DESCRIPTION() macrosJeff Johnson2-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29usb: uvc: add missing MODULE_DESCRIPTION() macroJeff Johnson1-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 <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: uda1342: add missing MODULE_DESCRIPTION() macroJeff Johnson1-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: dvb-frontends: add missing MODULE_DESCRIPTION() macrosJeff Johnson2-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: atomisp: add missing MODULE_DESCRIPTION() macrosJeff Johnson2-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: ti: add missing MODULE_DESCRIPTION() macrosJeff Johnson1-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: exynos4-is: add missing MODULE_DESCRIPTION() macrosJeff Johnson3-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Decouple VFE from CSIDMilen Mitkov4-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 <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Decompose register and link operationsAtanas Filipov2-61/+81
Split link and register operations. Add dedicated link callback according to SoC identifier. Signed-off-by: Atanas Filipov <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Split testgen, RDI and RX for CSID 170Milen Mitkov1-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 <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: folded https://lore.kernel.org/linux-media/[email protected]/ into this patch]
2024-06-29media: qcom: camss: Move format related functionsRadoslav Tsvetkov5-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 <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Attach formats to CSIPHY resourcesRadoslav Tsvetkov3-58/+85
Following the example of VFE and CSID, attach the CSIPHY formats to the subdevices resources. Signed-off-by: Radoslav Tsvetkov <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Attach formats to CSID resourcesRadoslav Tsvetkov6-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 <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Attach formats to VFE resourcesRadoslav Tsvetkov7-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 <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-29media: qcom: camss: Add per sub-device type resourcesRadoslav Tsvetkov13-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 <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Signed-off-by: Bryan O'Donoghue <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Bryan O'Donoghue <[email protected]> # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-28documentation: media: vivid: Update documentation on vivid loopback supportDorcas Anono Litunya1-23/+29
Modify section "Video and Sliced VBI Looping" in Documentation to explain the vivid loopback support for video across multiple vivid instances. Previous documentation is out-of-date as it was explaining looping in a single vivid instance only. Also, in "Some Future Improvements" the item "Add support to loop from a specific output to a specific input across vivid instances" can be dropped since that's now implemented. Signed-off-by: Dorcas Anono Litunya <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-28media: vivid: loopback based on 'Connected To' controlsHans Verkuil12-282/+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 <[email protected]> Co-developed-by: Dorcas Anono Litunya <[email protected]> Signed-off-by: Dorcas Anono Litunya <[email protected]>
2024-06-28media: vivid: Add 'Is Connected To' menu controlsDorcas Anono Litunya3-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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: use u8 in loops in vivid_create_controls() to avoid truncate warning]
2024-06-28media: vivid: add instance number to input/output namesHans Verkuil2-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 <[email protected]>
2024-06-28media: vivid: don't set HDMI TX controls if there are no HDMI outputsHans Verkuil1-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 <[email protected]>
2024-06-28media: vivid: vidioc_g_edid: do not change the original input EDIDHans Verkuil2-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 <[email protected]>
2024-06-28media: Documentation: vivid.rst: Remove documentation for Capture OverlayDorcas Anono Litunya1-68/+0
Modifying documentation to remove 'Capture Overlay section' as destructive capture overlay support was removed. See commit ccaa9d50ca73 ("media: vivid: drop overlay support") Signed-off-by: Dorcas Anono Litunya <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-28media: Documentation: vivid.rst: add supports_requestsHans Verkuil1-0/+9
The module option supports_requests was not documented, add it. Signed-off-by: Hans Verkuil <[email protected]>
2024-06-28media: Documentation: vivid.rst: drop "Video, VBI and RDS Looping"Hans Verkuil1-15/+17
Drop the "Video, VBI and RDS Looping" section, instead moving the Video/VBI info to section "Video and Sliced VBI looping" and the RDS info to section "Radio & RDS Looping". Signed-off-by: Hans Verkuil <[email protected]>
2024-06-28media: Documentation: vivid.rst: fix confusing section refsHans Verkuil1-20/+21
The documentation contained several instances of "section X" references, which no longer map to whatever X was. Replace these by the section titles. Also fix a single confusing typo in the "Radio & RDS Looping" section: "are regular frequency intervals" -> "at regular frequency intervals" Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27Revert "media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs"Hans Verkuil1-1/+1
This reverts commit 77d32b7e2a7b2e5389b67363d25371b4b8cad140. This patch is obviously wrong (causes array accesses at index -1), and I caught that just too late.
2024-06-27media: imx-mipi-csis: Use v4l2_subdev_enable_streams()Laurent Pinchart1-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 <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Reviewed-by: Rui Miguel Silva <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: i2c: gc2145: use CCI_REG16_LE for little-endian registersAlain Volmat1-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 <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: i2c: gc2145: addition of RAW8 formats supportAlain Volmat1-8/+67
Adds support for RAW8 formats (BGGR/RGGB/RBRG/BRBG). Signed-off-by: Alain Volmat <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: fix typo: colospace -> colorspace]
2024-06-27media: stm32: dcmipp: correct error handling in dcmipp_create_subdevsAlain Volmat1-1/+1
Correct error handling within the dcmipp_create_subdevs by properly decrementing the i counter when releasing the subdeves. Fixes: 28e0f3772296 ("media: stm32-dcmipp: STM32 DCMIPP camera interface driver") Cc: [email protected] Signed-off-by: Alain Volmat <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: admin-guide: Document the Raspberry Pi PiSP BEJacopo Mondi3-0/+130
Add documentation for the PiSP Back End memory-to-memory ISP. Signed-off-by: Jacopo Mondi <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: raspberrypi: Add support for PiSP BENaushir Patuck9-0/+2347
Add support for the Raspberry Pi PiSP Back End. The driver has been upported from the Raspberry Pi kernel at revision f74893f8a0c2 ("drivers: media: pisp_be: Update seqeuence numbers of the buffers"). The ISP documentation is available at: https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf Signed-off-by: David Plowman <[email protected]> Signed-off-by: Naushir Patuck <[email protected]> Signed-off-by: Nick Hollinghurst <[email protected]> Signed-off-by: Jacopo Mondi <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: drop dev_err after platform_get_irq to fix a coccinelle check]
2024-06-27media: dt-bindings: Add bindings for Raspberry Pi PiSP Back EndJacopo Mondi2-0/+64
Add bindings for the Raspberry Pi PiSP Back End memory-to-memory image signal processor. Datasheet: https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: Add PiSP Compressed RAW Bayer formatsJacopo Mondi4-0/+97
Add Raspberry Pi compressed RAW Bayer formats. The compression algorithm description is provided by Nick Hollinghurst <[email protected]> from Raspberry Pi. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: Add meta pixel format for PiSP BE configJacopo Mondi4-0/+61
Add format description for the PiSP Back End configuration parameter buffer. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: Add Raspberry Pi PiSP Back End uAPIJacopo Mondi3-0/+1133
Add the Raspberry Pi PiSP Back End uAPI header. The header defines the data type used to configure the PiSP Back End ISP. The detailed description of the types and of the ISP configuration procedure is available at https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf Signed-off-by: Jacopo Mondi <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: Add a pixel format for BGR48 and RGB48Jacopo Mondi4-0/+60
Add BGR48 and RGB48 16-bit per component image formats. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-27media: uapi: pixfmt-luma: Document MIPI CSI-2 packingJacopo Mondi1-0/+4
The Y10P, Y12P and Y14P format variants are packed according to the RAW10, RAW12 and RAW14 formats as defined by the MIPI CSI-2 specification. Document it. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Naushir Patuck <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-26media: vivid: fix CREATE_BUFS support in queue_setup()Hans Verkuil4-4/+13
While queue_setup was correct for CREATE_BUFS support for video devices, for VBI, SDR and touch devices it was wrong. This was found after adding new v4l2-compliance tests. Signed-off-by: Hans Verkuil <[email protected]>
2024-06-26media: vivid: fix wrong sizeimage value for mplaneHans Verkuil2-9/+12
In several places a division by fmt->vdownsampling[p] was missing in the sizeimage[p] calculation, causing incorrect behavior for multiplanar formats were some planes are smaller than the first plane. Found by new v4l2-compliance tests. Signed-off-by: Hans Verkuil <[email protected]>
2024-06-26media: vimc: scaler: Use subdev active stateLaurent Pinchart1-75/+49
Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allows using the v4l2_subdev_get_fmt() helper to implement the .get_fmt() operation. The active configuration that is used in the .process_frame() handler is still stored in the vimc_scaler_device structure. The driver could instead access the active state in the .process_frame() handler, but the required locking could interfere with the real time constraints of the frame processing. This data would be stored in registers in the .s_stream() handler for real hardware, storing it in dedicated storage thus mimics a real driver. To differentiate them from the rest of the device private data, move the corresponding fields to a sub-structure of vimc_scaler_device named hw. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-26media: vimc: debayer: Use subdev active stateLaurent Pinchart1-101/+85
Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allows using the v4l2_subdev_get_fmt() helper to implement the .get_fmt() operation. The active configuration that is used in the .process_frame() handler is still stored in the vimc_debayer_device structure. The driver could instead access the active state in the .process_frame() handler, but the required locking could interfere with the real time constraints of the frame processing. This data would be stored in registers in the .s_stream() handler for real hardware, storing it in dedicated storage thus mimics a real driver. To differentiate them from the rest of the device private data, move the corresponding fields to a sub-structure of vimc_debayer_device named hw. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-06-26media: vimc: sensor: Use subdev active stateLaurent Pinchart1-58/+50
Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allows using the v4l2_subdev_get_fmt() helper to implement the .get_fmt() operation. The active configuration that is used in the .process_frame() handler is still stored in the vimc_sensor_device structure. The driver could instead access the active state in the .process_frame() handler, but the required locking could interfere with the real time constraints of the frame processing. This data would be stored in registers in the .s_stream() handler for real hardware, storing it in dedicated storage thus mimics a real driver. To differentiate them from the rest of the device private data, move the corresponding fields to a sub-structure of vimc_sensor_device named hw. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>