| 5954ad7d | 10-Jun-2025 |
Arnd Bergmann <arnd@arndb.de> |
media: st-delta: avoid excessive stack usage
Building with a reduced stack warning limit shows that delta_mjpeg_decode() copies a giant structure to the stack each time but only uses three of its me
media: st-delta: avoid excessive stack usage
Building with a reduced stack warning limit shows that delta_mjpeg_decode() copies a giant structure to the stack each time but only uses three of its members:
drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c: In function 'delta_mjpeg_decode': drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:427:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
Open-code the passing of the structure members that are actually used here.
Fixes: 433ff5b4a29b ("[media] st-delta: add mjpeg support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| ecdcfa45 | 10-Aug-2025 |
Jacopo Mondi <jacopo.mondi@ideasonboard.com> |
media: stm32: dma2d: Access v4l2_fh from file
The v4l2_fh associated with an open file handle is now guaranteed to be available in file->private_data, initialised by v4l2_fh_add().
Access the v4l2_
media: stm32: dma2d: Access v4l2_fh from file
The v4l2_fh associated with an open file handle is now guaranteed to be available in file->private_data, initialised by v4l2_fh_add().
Access the v4l2_fh, and from there the driver-specific structure, from the file * in all ioctl handlers.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 1b213591 | 10-Aug-2025 |
Jacopo Mondi <jacopo.mondi@ideasonboard.com> |
media: st: delta: Access v4l2_fh from file
The v4l2_fh associated with an open file handle is now guaranteed to be available in file->private_data, initialised by v4l2_fh_add().
Access the v4l2_fh,
media: st: delta: Access v4l2_fh from file
The v4l2_fh associated with an open file handle is now guaranteed to be available in file->private_data, initialised by v4l2_fh_add().
Access the v4l2_fh, and from there the driver-specific structure, from the file * in all ioctl handlers.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Co-developed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 27796674 | 10-Aug-2025 |
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
media: Reset file->private_data to NULL in v4l2_fh_del()
Multiple drivers that use v4l2_fh and call v4l2_fh_del() manually reset the file->private_data pointer to NULL in their video device .release
media: Reset file->private_data to NULL in v4l2_fh_del()
Multiple drivers that use v4l2_fh and call v4l2_fh_del() manually reset the file->private_data pointer to NULL in their video device .release() file operation handler. Move the code to the v4l2_fh_del() function to avoid direct access to file->private_data in drivers. This requires adding a file pointer argument to the function.
Changes to drivers have been generated with the following coccinelle semantic patch:
@@ expression fh; identifier filp; identifier release; type ret; @@ ret release(..., struct file *filp, ...) { <... - filp->private_data = NULL; ... - v4l2_fh_del(fh); + v4l2_fh_del(fh, filp); ...> }
@@ expression fh; identifier filp; identifier release; type ret; @@ ret release(..., struct file *filp, ...) { <... - v4l2_fh_del(fh); + v4l2_fh_del(fh, filp); ... - filp->private_data = NULL; ...> }
@@ expression fh; identifier filp; identifier release; type ret; @@ ret release(..., struct file *filp, ...) { <... - v4l2_fh_del(fh); + v4l2_fh_del(fh, filp); ...> }
Manual changes have been applied to Documentation/ to update the usage patterns, to drivers/media/v4l2-core/v4l2-fh.c to update the v4l2_fh_del() prototype and reset file->private_data, and to include/media/v4l2-fh.h to update the v4l2_fh_del() function prototype and its documentation.
Additionally, white space issues have been fixed manually in drivers/usb/gadget/function/uvc_v4l2.c
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 09518df7 | 13-Jan-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmipp: add has_csi2 & needs_mclk in match data
Introduce two variable has_csi and has_mclk within the match data of the driver in order to know, depending on the compatible if CSI-2 i
media: stm32: dcmipp: add has_csi2 & needs_mclk in match data
Introduce two variable has_csi and has_mclk within the match data of the driver in order to know, depending on the compatible if CSI-2 interface is available and if the mclk clk should be retrieved.
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@xs4all.nl>
show more ...
|
| 052b228f | 13-Jan-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: csi: correct unsigned or useless variable settings
Correct several missing unsigned type missing for loop variables and also remove useless initialization of variables.
Signed-off-by:
media: stm32: csi: correct unsigned or useless variable settings
Correct several missing unsigned type missing for loop variables and also remove useless initialization of variables.
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@xs4all.nl>
show more ...
|
| 1ec16c33 | 13-Jan-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: csi: remove useless fwnode_graph_get_endpoint call
The endpoint is already retrieved at the beginning of the function stm32_csi_parse_dt hence keep the endpoint pointer until the end i
media: stm32: csi: remove useless fwnode_graph_get_endpoint call
The endpoint is already retrieved at the beginning of the function stm32_csi_parse_dt hence keep the endpoint pointer until the end instead of getting a new one.
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@xs4all.nl>
show more ...
|
| e0c20812 | 13-Jan-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: csi: simplify enable_streams error handling
Put all error handling for VC stop and CSI stop together to avoid duplication of code.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.co
media: stm32: csi: simplify enable_streams error handling
Put all error handling for VC stop and CSI stop together to avoid duplication of code.
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@xs4all.nl>
show more ...
|