#
f157398a |
| 24-Dec-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
media: fimc-is: constify pointers to v4l2_pix_format_mplane
In few places functions do not modify pointed "struct v4l2_pix_format_mplane", thus the pointer can point to const data for additional saf
media: fimc-is: constify pointers to v4l2_pix_format_mplane
In few places functions do not modify pointed "struct v4l2_pix_format_mplane", thus the pointer can point to const data for additional safety and self-documenting intention of the function.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
#
ecefa105 |
| 15-Feb-2023 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: Zero-initialize all structures passed to subdev pad operations
Several drivers call subdev pad operations, passing structures that are not fully zeroed. While the drivers initialize the field
media: Zero-initialize all structures passed to subdev pad operations
Several drivers call subdev pad operations, passing structures that are not fully zeroed. While the drivers initialize the fields they care about explicitly, this results in reserved fields having uninitialized values. Future kernel API changes that make use of those fields thus risk breaking proper driver operation in ways that could be hard to detect.
To avoid this, make the code more robust by zero-initializing all the structures passed to subdev pad operation. Maintain a consistent coding style by preferring designated initializers (which zero-initialize all the fields that are not specified) over memset() where possible, and make variable declarations local to inner scopes where applicable. One notable exception to this rule is in the ipu3 driver, where a memset() is needed as the structure is not a local variable but a function parameter provided by the caller.
Not all fields of those structures can be initialized when declaring the variables, as the values for those fields are computed later in the code. Initialize the 'which' field in all cases, and other fields when the variable declaration is so close to the v4l2_subdev_call() call that it keeps all the context easily visible when reading the code, to avoid hindering readability.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> # For vimc Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com> # For am437x Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # For drivers/staging/media/imx/ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
#
12cecbf9 |
| 31-Aug-2022 |
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> |
media: drivers: use video device pipeline start/stop
Convert the media drivers to use video device based pipeline start/stop where possible.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboa
media: drivers: use video device pipeline start/stop
Convert the media drivers to use video device based pipeline start/stop where possible.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
b2e44430 |
| 25-Jun-2022 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first()
The media_entity_remote_pad() is misnamed, as it operates on a pad and not an entity. Rename it to media_pad_remote
media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first()
The media_entity_remote_pad() is misnamed, as it operates on a pad and not an entity. Rename it to media_pad_remote_pad_first() to clarify its behaviour.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
238c84f7 |
| 13-Mar-2022 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
media: platform: rename exynos4-is/ to samsung/exynos4-is/
As the end goal is to have platform drivers split by vendor, rename exynos4-is/ to samsung/exynos4-is/.
Signed-off-by: Mauro Carvalho Cheh
media: platform: rename exynos4-is/ to samsung/exynos4-is/
As the end goal is to have platform drivers split by vendor, rename exynos4-is/ to samsung/exynos4-is/.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|