diff options
| author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2026-05-12 02:56:26 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-05-21 09:10:15 +0200 |
| commit | 79448d5386f62a3caaba7fe04204a587a8bfa5c4 (patch) | |
| tree | 9b9c5f724a146b7465a0576d478ee643d1c9d4b5 /include/media | |
| parent | f0748d9decedd0ef749d21c6b281cf26958dfd55 (diff) | |
| download | linux-next-79448d5386f62a3caaba7fe04204a587a8bfa5c4.tar.gz linux-next-79448d5386f62a3caaba7fe04204a587a8bfa5c4.zip | |
media: renesas: vsp1: Split vsp1_du_setup_lif()
The vsp1_du_setup_lif() function is used to configure and enable a
pipeline, as well as disable it, depending on the cfg argument being a
valid pointer or NULL. This creates a confusing API. Improve it by
splitting the function in two, a vsp1_du_enable() function to configure
a pipeline, and a vsp1_du_disable() function to disaple it.
Keep vsp1_du_setup_lif() as an inline wrapper for existing callers in
the DRM subsystem, to simplify merging. The callers will be updated
separately and the old API will then be removed.
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://patch.msgid.link/20260511235637.3468558-3-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'include/media')
| -rw-r--r-- | include/media/vsp1.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/media/vsp1.h b/include/media/vsp1.h index d9b91ff02761..d2085cdb7fcb 100644 --- a/include/media/vsp1.h +++ b/include/media/vsp1.h @@ -44,8 +44,18 @@ struct vsp1_du_lif_config { void *callback_data; }; -int vsp1_du_setup_lif(struct device *dev, unsigned int pipe_index, - const struct vsp1_du_lif_config *cfg); +int vsp1_du_enable(struct device *dev, unsigned int pipe_index, + const struct vsp1_du_lif_config *cfg); +int vsp1_du_disable(struct device *dev, unsigned int pipe_index); + +static inline int vsp1_du_setup_lif(struct device *dev, unsigned int pipe_index, + const struct vsp1_du_lif_config *cfg) +{ + if (cfg) + return vsp1_du_enable(dev, pipe_index, cfg); + else + return vsp1_du_disable(dev, pipe_index); +} /** * struct vsp1_du_atomic_config - VSP atomic configuration parameters |
