Commit Graph

34778 Commits

Author SHA1 Message Date
Alexander Stein
24b41af1f1 media: tc358743: register v4l2 async device only after successful setup
Ensure the device has been setup correctly before registering the v4l2
async device, thus allowing userspace to access.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Fixes: 4c5211a100 ("[media] tc358743: register v4l2 asynchronous subdevice")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 13:20:40 +01:00
Hugues Fruchet
b0fb9ca30a media: hantro: add support for STM32MP25 VENC
Add support for STM32MP25 VENC video hardware encoder.
Support of JPEG encoding.
VENC has its own reset/clock/irq.

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:12:04 +01:00
Hugues Fruchet
46c4dffb74 media: hantro: add support for STM32MP25 VDEC
Add support for STM32MP25 VDEC video hardware decoder.
Support of H264/VP8 decoding.
No post-processor support.
VDEC has its own reset/clock/irq.

Successfully tested up to full HD.

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:11:33 +01:00
Moudy Ho
9288eae430 media: platform: mtk-mdp3: add support for parallel pipe to improve FPS
In some chips, MDP3 has the ability to utilize two pipelines to
parallelly process a single frame.
To enable this feature, multiple CMDQ clients and packets need to
be configured at the same time.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:53:49 +01:00
Moudy Ho
0e9bd2fcda media: platform: mtk-mdp3: add mt8195 MDP3 component settings
Extend the component settings used in MT8195 MDP3.
Additionally, it is crucial to read all component settings in
a specific manner to ensure that shared memory data structure lengths
are aligned across different platforms.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:52:17 +01:00
Moudy Ho
51d918d62b media: platform: mtk-mdp3: add mt8195 shared memory configurations
The configuration of the MT8195 components in the shared memory
is defined in the header file "mdp_sm_mt8195.h".

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:50:03 +01:00
Moudy Ho
adce64c4ce media: platform: mtk-mdp3: add mt8195 platform configuration
Add MT8195 MDP3 basic configuration in file "mdp_cfg_data.c"
and corresponding driver data.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:45:05 +01:00
Moudy Ho
d97fd41e83 media: platform: mtk-mdp3: add support for blending multiple components
Certain chips can combine several components to form complex virtual
units with advanced functions.
These components require simultaneous configuration of their MODs and
clocks.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:44:14 +01:00
Moudy Ho
bd2fac0048 media: platform: mtk-mdp3: extend GCE event waiting in RDMA and WROT
Support for multiple RDMA/WROT waits for GCE events.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:37:16 +01:00
Moudy Ho
4294b9d6c8 media: platform: mtk-mdp3: avoid multiple driver registrations
The amount of MDP3 driver probes is determined by the registered
clocks of MMSYS.
Since MT8195 MDP3 utilizes VPPSYS0 and VPPSYS1, it's necessary to
prevent multiple driver registrations.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:36:46 +01:00
Moudy Ho
92cdfc39af media: platform: mtk-mdp3: add checks for dummy components
Some components act as bridges only and do not require full configuration.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:36:18 +01:00
Moudy Ho
73e00953c3 media: platform: mtk-mdp3: introduce more MDP3 components
Add configuration of more components in MT8195 MDP3.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:35:48 +01:00
Moudy Ho
d9b52f7356 media: platform: mtk-mdp3: introduce more pipelines from MT8195
Increasing the number of sets built by MMSYS and MUTEX in MT8195
will enable the creation of more pipelines in MDP3.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:34:59 +01:00
Moudy Ho
ee0d0dbb80 media: platform: mtk-mdp3: add support second sets of MUTEX
After setting up the second set of MMSYS (VPPSYS1), it is necessary
to have a corresponding second set of MUTEX (MUTEX2) to assist in
handling SOF/EOF.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:34:31 +01:00
Moudy Ho
e280d1a0eb media: platform: mtk-mdp3: add support second sets of MMSYS
The MT8195 chipset features two MMSYS subsets: VPPSYS0 and VPPSYS1.
These subsets coordinate and control the clock, power, and
register settings required for the components of MDP3.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:33:51 +01:00
Hans Verkuil
c8282f7b85 Linux 6.8-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmW2+NgeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGNMoH/RbwRC7SpkT55lsD
 lIpaUrIYLuXkPKJa/3eD75cOtOv4Yi+aHGXfdTbo+JwWBKg4zY8X2pr7IZrvfpp5
 TZD+PADQtFAReWlQtVsaNM7om8k+2ltm+nkso1G+FpHljqqHgl3gc95UrVlmM70r
 iEScR0KbHkJ2Yv5H8C6ardcA87JYMaex6USK9GWSoylBN3R+Z49YEC9q07IQatAA
 Do8i6jDtw3O9OF2PpnhIPXxQZkwsn15pY1HwZxUEDMPXteMZa6NogvFsj6kSIudo
 YTF3FK+oX5CXNATL49OY4ibJ701mPCKqsuY3z6SuoYtvhI6wR96sIGFjEWV9tHvU
 VhPBvCI=
 =BKso
 -----END PGP SIGNATURE-----

Merge tag 'v6.8-rc2'

Linux 6.8-rc2

The vb2 fixes from v6.8-rc2 are needed for the work on the new
vb2 delete buffers feature.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-29 08:59:23 +01:00
Hans Verkuil
b32431b753 media: vb2: refactor setting flags and caps, fix missing cap
Several functions implementing VIDIOC_REQBUFS and _CREATE_BUFS all use
almost the same code to fill in the flags and capability fields. Refactor
this into a new vb2_set_flags_and_caps() function that replaces the old
fill_buf_caps() and validate_memory_flags() functions.

This also fixes a bug where vb2_ioctl_create_bufs() would not set the
V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS cap and also not fill in the
max_num_buffers field.

Fixes: d055a76c00 ("media: core: Report the maximum possible number of buffers for the queue")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Acked-by: Tomasz Figa <tfiga@chromium.org>
2024-01-24 17:27:51 +01:00
Benjamin Gaignard
78e23c3e91 media: media videobuf2: Stop direct calls to queue num_buffers field
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly.
This allows us to change how the number of buffers is computed in the
future.

Fixes: d055a76c00 ("media: core: Report the maximum possible number of buffers for the queue")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Acked-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-24 17:27:51 +01:00
Brandon Brnich
c14d17a325 media: chips-media: wave5: Remove K3 References
Change compatible string to match dt bindings for TI devices. K3 family
prefix should not be included as it deviates from naming convention.

Fixes: 9707a6254a ("media: chips-media: wave5: Add the v4l2 layer")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/all/CAMuHMdUYOq=q1j=d+Eac28hthOUAaNUkuvxmRu-mUN1pLKq69g@mail.gmail.com/
Signed-off-by: Brandon Brnich <b-brnich@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-24 17:27:51 +01:00
Hans Verkuil
04447d48af media: mediatek: vcodec: drop excess struct members descriptions
Drop obsolete @wait_key_frame and @mv_joint struct member descriptions.

This fixes two warnings:

drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c:57: warning: Excess struct member 'wait_key_frame' description in 'vdec_vp8_slice_info'
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c:166: warning: Excess struct member 'mv_joint' description in 'vdec_vp9_slice_counts_map'

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
2024-01-24 11:38:34 +01:00
Randy Dunlap
eba5e40755 media: i2c: ar0521: fix spellos
Fix spelling mistakes as reported by codespell.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Krzysztof Hałasa <khalasa@piap.pl>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Sakari Ailus
5fd593b873 media: mc: Drop useless debug print on file handle release
Drop a debug print in media_release(), which is a release callback for a
file handle. Printing a debug message here is simply not necessary.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Sakari Ailus
53aa6b38f1 media: v4l2-mc: Add debug prints for v4l2_fwnode_create_links_for_pad()
Add relevant debug prints for v4l2_fwnode_create_links_for_pad(). This
should help debugging when things go wrong.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Sakari Ailus
b97dc22b19 media: ipu3-cio2: Further clean up async subdev link creation
Use v4l2_create_fwnode_links_to_pad() to create links from async
sub-devices to the CSI-2 receiver subdevs.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Changhuang Liang
c271690491 media: cadence: csi2rx: Add enum_mbus_code pad ops
Add enum_mbus_code ioctl so that user space can know what
formats are supported to csi2rx.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
Reviewed-by: Julien Massot <julien.massot@collabora.com>
Tested-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: Jai Luthra <j-luthra@ti.com>
Tested-by: Jai Luthra <j-luthra@ti.com> # [Test on sk-am62a]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Michal Simek
2edfa0ea6b media: platform: xilinx: Fix Kconfig indentation
Use proper indentation for Kconfig fragments - help part.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Colin Ian King
fc999dd90f media: v4l2-subdev: Fix spelling mistake "heigth" -> "height"
There is a spelling mistake in a dev_err error message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Jai Luthra
5eb0ad467c media: ti: j721e-csi2rx: add support for RGB formats
Add support for RGB565, RGB888 and BGR888 media bus formats.

The pixel formats for these have a different byte-order than the MIPI
bus formats, given the SHIM IP [1] unpacks them into memory as follows:

MIPI RGB888 unpacks to:
BYTE3		BYTE2		BYTE1		BYTE0
00000000	RRRRRRRR	GGGGGGGG	BBBBBBBB

MIPI RGB565 unpacks to:
BIT 15-11	BIT 10-5	BIT 4-0
RRRRR		GGGGGG		BBBBB

[1]: AM62x TRM: 12.6.1.4.5 "CSI_RX_IF Data Memory Organization Details"

Link: https://www.ti.com/lit/pdf/spruiv7
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:59 +01:00
Jai Luthra
77759eb0b8 media: cadence: csi2rx: add support for RGB formats
Add support for RGB565, RGB888 and BGR888 media bus formats.

Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:58 +01:00
Julien Massot
24a4e4025d media: ti: j721e-csi2rx: add GREY format
Add Grey format to properly select RAW8 data type.

Tested with a ST VG5661 sensor.

Signed-off-by: Julien Massot <julien.massot@collabora.com>
Acked-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:58 +01:00
Julien Massot
5b2a3687e4 media: cadence: csi2rx: add Y8_1X8 format
Add support for MEDIA_BUS_FMT_Y8_1X8 format.

Signed-off-by: Julien Massot <julien.massot@collabora.com>
Acked-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:58 +01:00
Julien Massot
448699c522 media: cadence: csi2rx: use match fwnode for media link
Since commit 1029939b37 ("media: v4l: async: Simplify async sub-device fwnode matching"),
async connections are matched using the async sub-device fwnode, not that
of the endpoint. Fix this by using the fwnode of the connection match to
find the pad.

Fixes: 1029939b37 ("media: v4l: async: Simplify async sub-device fwnode matching")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 17:23:58 +01:00
Krzysztof Kozlowski
c007ae835d media: s5p-mfc: drop static device variable in s5p_mfc_pm.c
Change the interface of power management functions in s5p_mfc_pm.c to
accept the pointer to S5P MFC device structure. instead of relying on
file-scope static variable.  This makes code easier to read and modify
in case more devices are added.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:44 +01:00
Krzysztof Kozlowski
9e1b5ab821 media: s5p-mfc: drop useless static s5p_mfc_dev in s5p_mfc_pm.c
Pointer "struct s5p_mfc_dev" is stored in s5p_mfc_pm.c once and never
used again.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
6b1e2e04b4 media: s5p-mfc: drop useless clock refcnt debugging
Drop useless debugging of clock enabl/disable counts, because core
handles this much better.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
362af7abbf media: s5p-mfc: constify local pointers to s5p_mfc_enc_params
Constify the local variables pointing to "struct s5p_mfc_enc_params" and
other encoding params to annotate the function is not modifying pointed
data.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
60a2a86fb8 media: s5p-mfc: constify pointers to s5p_mfc_cmd_args
In few places functions do not modify pointed "struct
s5p_mfc_cmd_args", 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>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
4b9f910969 media: s5p-mfc: constify struct structures
Static "struct" structures are not modified by the driver, so
they can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
028111b3d8 media: s5p-mfc: constify s5p_mfc_fmt structures
Static "s5p_mfc_fmt" structures are not modified by the driver, so
they can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
f0015b196b media: s5p-mfc: constify s5p_mfc_hw_ops structures
Static "s5p_mfc_hw_ops" structures are not modified by the driver, so
they can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
c76c43d778 media: s5p-mfc: constify s5p_mfc_hw_cmds structures
Static "s5p_mfc_hw_cmds" structures are not modified by the driver, so
they can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
5451bbd3e3 media: s5p-mfc: constify s5p_mfc_variant structures
Static "s5p_mfc_variant" structures are not modified by the driver, so
they can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
e8cc4c0bc2 media: s5p-mfc: constify s5p_mfc_buf_size structures
Static "s5p_mfc_buf_size*" structures are not modified by the driver, so
they can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
dd761d3cf4 media: s5p-mfc: constify fw_name strings
Constify stored pointers to firmware names for code safety.  These are
not modified by the driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
e12dcb89e8 media: s5p-mfc: drop unused get_*_def_fmt declarations
get_dec_def_fmt() and get_enc_def_fmt() do not have definitions, so
their declarations are pointless.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
36588ba3a3 media: s5p-mfc: drop unused static s5p_mfc_ops
File-scope static variable "s5p_mfc_ops" is not read after assignment,
thus it can be dropped entirely.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
8798f1a8e0 media: s5p-mfc: drop unused static s5p_mfc_cmds
File-scope static variable "s5p_mfc_cmds" is not read after assignment,
thus it can be dropped entirely.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
12273a3295 media: fimc-is: constify local pointers to fimc_frame
Constify the local variables pointing to "struct fimc_frame" to annotate
the function is not modifying pointed data.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
7d441e2989 media: fimc-is: constify local pointers to fimc_vid_cap
Constify the local variables pointing to "struct fimc_vid_cap" to
annotate the function is not modifying pointed data.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:43 +01:00
Krzysztof Kozlowski
4303e2063e media: fimc-is: constify local pointers to fimc_dma_offset
Constify the local variables pointing to "struct fimc_dma_offset" to
annotate the function is not modifying pointed data.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22 12:16:42 +01:00