| 6b8ff734 | 29-Jun-2026 |
Ricardo Ribalda <ribalda@chromium.org> |
media: vimc: Ensure that pixel_rate fits in 32 bits
pixel_rate is set to VIMC_PIXEL_RATE_FIXED, which the code expects to fit in 32 bits. Make that constraint into a WARN_ON, so if we ever break tha
media: vimc: Ensure that pixel_rate fits in 32 bits
pixel_rate is set to VIMC_PIXEL_RATE_FIXED, which the code expects to fit in 32 bits. Make that constraint into a WARN_ON, so if we ever break that constraint a kernel warning will be triggered.
It also fixes the following cocci warning: ./test-drivers/vimc/vimc-sensor.c:107:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 24ae633a | 13-Mar-2026 |
Faizel K B <faizel.kb@gmail.com> |
media: vimc: streamer: Apply sensor frame rate in streamer thread
Use the sensor's pre-calculated jiffies value to add appropriate delay between frames according to the configured timing value. The
media: vimc: streamer: Apply sensor frame rate in streamer thread
Use the sensor's pre-calculated jiffies value to add appropriate delay between frames according to the configured timing value. The actual frame rate will vary depending on processing delays in other media pipeline components.
Tested using yavta frame rate display with QCIF resolution: yavta <video-node> --capture=<no_of_frames>
Signed-off-by: Faizel K B <faizel.kb@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| ec1e620b | 13-Mar-2026 |
Faizel K B <faizel.kb@gmail.com> |
media: vimc: sensor: Add pixel_rate,vblank and hblank configuration
pixel_rate and hblank as read only parameter. vblank can be configured to match the desired frame rate.
Default values are, pixel
media: vimc: sensor: Add pixel_rate,vblank and hblank configuration
pixel_rate and hblank as read only parameter. vblank can be configured to match the desired frame rate.
Default values are, pixel_rate - 160 MHz, hblank - 800. vblank defaults to an equivalent value of 30 fps for resolutions less than or equal to 1920x1080 and 10 fps for higher resolutions. For higher resolutions, modify pixel_rate in the driver code. fps = pixel_rate / ((width + hblank) * (height + vblank)) minimum vblank - 4, maximum vblank - 65535
The configured fps delay is pre-calculated into jiffies and stored in the sensor's hw structure for efficient access by the streamer thread.
Signed-off-by: Faizel K B <faizel.kb@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 7603ac5a | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: scaler: Use subdev active state
Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allo
media: vimc: scaler: Use subdev active state
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 4c46cb2a | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: debayer: Use subdev active state
Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and all
media: vimc: debayer: Use subdev active state
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| cf2552d8 | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: sensor: Use subdev active state
Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allo
media: vimc: sensor: Use subdev active state
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| b3f73b21 | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: Initialize subdev active state
Finalize subdev initialization for all subdevs that provide a .init_state() operation. This creates an active state for all those subdevs, which subsequen
media: vimc: Initialize subdev active state
Finalize subdev initialization for all subdevs that provide a .init_state() operation. This creates an active state for all those subdevs, which subsequent patches will use to simplify the implementation of individual vimc entities.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 556d821a | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: Centralize subdev internal_ops initialization
Initialize the subdev internal_ops field in the vimc_ent_sd_register() function. This handles the internal ops the same way as the subdev o
media: vimc: Centralize subdev internal_ops initialization
Initialize the subdev internal_ops field in the vimc_ent_sd_register() function. This handles the internal ops the same way as the subdev ops, and prepares for moving to the V4L2 subdev active state API.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 0b3b27bb | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: scaler: Rename vic_sca_pad enum to vimc_scaler_pad
The vic_sca_pad enum's name has been shortened to the extreme for no good reason. Rename it to vimc_scaler_pad.
Signed-off-by: Lauren
media: vimc: scaler: Rename vic_sca_pad enum to vimc_scaler_pad
The vic_sca_pad enum's name has been shortened to the extreme for no good reason. Rename it to vimc_scaler_pad.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 27d8f61e | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: Constify the ent_config array
The ent_config array contains data that is never modified. Make it const.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-b
media: vimc: Constify the ent_config array
The ent_config array contains data that is never modified. Make it const.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
| 73a4385c | 25-Apr-2024 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: vimc: Constify vimc_ent_type structures
The vimc_ent_type structure contains static pointers to functions, and no other information that need to be modified after initialization. Make them co
media: vimc: Constify vimc_ent_type structures
The vimc_ent_type structure contains static pointers to functions, and no other information that need to be modified after initialization. Make them const to avoid the risk of arbitrary code execution following an overflow that would overwrite the structure's contents.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|