* [PATCH] media: camss: Move and unexport functions specific to ISPIF
@ 2022-05-23 12:25 Vladimir Zapolskiy
2022-05-26 12:00 ` Robert Foss
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2022-05-23 12:25 UTC (permalink / raw)
To: Robert Foss
Cc: Todor Tomov, Bjorn Andersson, Andy Gross, Mauro Carvalho Chehab,
linux-media, linux-arm-msm
Common exported functions msm_vfe_get_vfe_id() and msm_vfe_get_vfe_line_id()
do not have any users outside of camss-ispif.c, move them to the latter
object and staticize.
The change is supposed to be a non-functional one.
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
---
.../media/platform/qcom/camss/camss-ispif.c | 39 ++++++++++++++++++-
drivers/media/platform/qcom/camss/camss-vfe.c | 34 ----------------
drivers/media/platform/qcom/camss/camss-vfe.h | 3 --
3 files changed, 37 insertions(+), 39 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-ispif.c b/drivers/media/platform/qcom/camss/camss-ispif.c
index 4ee11bb979cd..91e6a2b9ac50 100644
--- a/drivers/media/platform/qcom/camss/camss-ispif.c
+++ b/drivers/media/platform/qcom/camss/camss-ispif.c
@@ -1252,6 +1252,41 @@ static enum ispif_intf ispif_get_intf(enum vfe_line_id line_id)
}
}
+/*
+ * ispif_get_vfe_id - Get VFE HW module id
+ * @entity: Pointer to VFE media entity structure
+ * @id: Return CSID HW module id here
+ */
+static void ispif_get_vfe_id(struct media_entity *entity, u8 *id)
+{
+ struct v4l2_subdev *sd;
+ struct vfe_line *line;
+ struct vfe_device *vfe;
+
+ sd = media_entity_to_v4l2_subdev(entity);
+ line = v4l2_get_subdevdata(sd);
+ vfe = to_vfe(line);
+
+ *id = vfe->id;
+}
+
+/*
+ * ispif_get_vfe_line_id - Get VFE line id by media entity
+ * @entity: Pointer to VFE media entity structure
+ * @id: Return VFE line id here
+ */
+static void ispif_get_vfe_line_id(struct media_entity *entity,
+ enum vfe_line_id *id)
+{
+ struct v4l2_subdev *sd;
+ struct vfe_line *line;
+
+ sd = media_entity_to_v4l2_subdev(entity);
+ line = v4l2_get_subdevdata(sd);
+
+ *id = line->id;
+}
+
/*
* ispif_link_setup - Setup ISPIF connections
* @entity: Pointer to media entity structure
@@ -1285,8 +1320,8 @@ static int ispif_link_setup(struct media_entity *entity,
sd = media_entity_to_v4l2_subdev(entity);
line = v4l2_get_subdevdata(sd);
- msm_vfe_get_vfe_id(remote->entity, &line->vfe_id);
- msm_vfe_get_vfe_line_id(remote->entity, &id);
+ ispif_get_vfe_id(remote->entity, &line->vfe_id);
+ ispif_get_vfe_line_id(remote->entity, &id);
line->interface = ispif_get_intf(id);
}
}
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 5b148e9f8134..76e28b832568 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -1422,40 +1422,6 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
return 0;
}
-/*
- * msm_vfe_get_vfe_id - Get VFE HW module id
- * @entity: Pointer to VFE media entity structure
- * @id: Return CSID HW module id here
- */
-void msm_vfe_get_vfe_id(struct media_entity *entity, u8 *id)
-{
- struct v4l2_subdev *sd;
- struct vfe_line *line;
- struct vfe_device *vfe;
-
- sd = media_entity_to_v4l2_subdev(entity);
- line = v4l2_get_subdevdata(sd);
- vfe = to_vfe(line);
-
- *id = vfe->id;
-}
-
-/*
- * msm_vfe_get_vfe_line_id - Get VFE line id by media entity
- * @entity: Pointer to VFE media entity structure
- * @id: Return VFE line id here
- */
-void msm_vfe_get_vfe_line_id(struct media_entity *entity, enum vfe_line_id *id)
-{
- struct v4l2_subdev *sd;
- struct vfe_line *line;
-
- sd = media_entity_to_v4l2_subdev(entity);
- line = v4l2_get_subdevdata(sd);
-
- *id = line->id;
-}
-
/*
* vfe_link_setup - Setup VFE connections
* @entity: Pointer to media entity structure
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h
index 0eba04eb9b77..cbc314c4e244 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.h
+++ b/drivers/media/platform/qcom/camss/camss-vfe.h
@@ -163,9 +163,6 @@ int msm_vfe_register_entities(struct vfe_device *vfe,
void msm_vfe_unregister_entities(struct vfe_device *vfe);
-void msm_vfe_get_vfe_id(struct media_entity *entity, u8 *id);
-void msm_vfe_get_vfe_line_id(struct media_entity *entity, enum vfe_line_id *id);
-
/*
* vfe_buf_add_pending - Add output buffer to list of pending
* @output: VFE output
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: camss: Move and unexport functions specific to ISPIF
2022-05-23 12:25 [PATCH] media: camss: Move and unexport functions specific to ISPIF Vladimir Zapolskiy
@ 2022-05-26 12:00 ` Robert Foss
0 siblings, 0 replies; 2+ messages in thread
From: Robert Foss @ 2022-05-26 12:00 UTC (permalink / raw)
To: Vladimir Zapolskiy
Cc: Todor Tomov, Bjorn Andersson, Andy Gross, Mauro Carvalho Chehab,
linux-media, linux-arm-msm
On Mon, 23 May 2022 at 14:25, Vladimir Zapolskiy
<vladimir.zapolskiy@linaro.org> wrote:
>
> Common exported functions msm_vfe_get_vfe_id() and msm_vfe_get_vfe_line_id()
> do not have any users outside of camss-ispif.c, move them to the latter
> object and staticize.
>
> The change is supposed to be a non-functional one.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
> .../media/platform/qcom/camss/camss-ispif.c | 39 ++++++++++++++++++-
> drivers/media/platform/qcom/camss/camss-vfe.c | 34 ----------------
> drivers/media/platform/qcom/camss/camss-vfe.h | 3 --
> 3 files changed, 37 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss-ispif.c b/drivers/media/platform/qcom/camss/camss-ispif.c
> index 4ee11bb979cd..91e6a2b9ac50 100644
> --- a/drivers/media/platform/qcom/camss/camss-ispif.c
> +++ b/drivers/media/platform/qcom/camss/camss-ispif.c
> @@ -1252,6 +1252,41 @@ static enum ispif_intf ispif_get_intf(enum vfe_line_id line_id)
> }
> }
>
> +/*
> + * ispif_get_vfe_id - Get VFE HW module id
> + * @entity: Pointer to VFE media entity structure
> + * @id: Return CSID HW module id here
> + */
> +static void ispif_get_vfe_id(struct media_entity *entity, u8 *id)
> +{
> + struct v4l2_subdev *sd;
> + struct vfe_line *line;
> + struct vfe_device *vfe;
> +
> + sd = media_entity_to_v4l2_subdev(entity);
> + line = v4l2_get_subdevdata(sd);
> + vfe = to_vfe(line);
> +
> + *id = vfe->id;
> +}
> +
> +/*
> + * ispif_get_vfe_line_id - Get VFE line id by media entity
> + * @entity: Pointer to VFE media entity structure
> + * @id: Return VFE line id here
> + */
> +static void ispif_get_vfe_line_id(struct media_entity *entity,
> + enum vfe_line_id *id)
> +{
> + struct v4l2_subdev *sd;
> + struct vfe_line *line;
> +
> + sd = media_entity_to_v4l2_subdev(entity);
> + line = v4l2_get_subdevdata(sd);
> +
> + *id = line->id;
> +}
> +
> /*
> * ispif_link_setup - Setup ISPIF connections
> * @entity: Pointer to media entity structure
> @@ -1285,8 +1320,8 @@ static int ispif_link_setup(struct media_entity *entity,
> sd = media_entity_to_v4l2_subdev(entity);
> line = v4l2_get_subdevdata(sd);
>
> - msm_vfe_get_vfe_id(remote->entity, &line->vfe_id);
> - msm_vfe_get_vfe_line_id(remote->entity, &id);
> + ispif_get_vfe_id(remote->entity, &line->vfe_id);
> + ispif_get_vfe_line_id(remote->entity, &id);
> line->interface = ispif_get_intf(id);
> }
> }
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
> index 5b148e9f8134..76e28b832568 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
> @@ -1422,40 +1422,6 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
> return 0;
> }
>
> -/*
> - * msm_vfe_get_vfe_id - Get VFE HW module id
> - * @entity: Pointer to VFE media entity structure
> - * @id: Return CSID HW module id here
> - */
> -void msm_vfe_get_vfe_id(struct media_entity *entity, u8 *id)
> -{
> - struct v4l2_subdev *sd;
> - struct vfe_line *line;
> - struct vfe_device *vfe;
> -
> - sd = media_entity_to_v4l2_subdev(entity);
> - line = v4l2_get_subdevdata(sd);
> - vfe = to_vfe(line);
> -
> - *id = vfe->id;
> -}
> -
> -/*
> - * msm_vfe_get_vfe_line_id - Get VFE line id by media entity
> - * @entity: Pointer to VFE media entity structure
> - * @id: Return VFE line id here
> - */
> -void msm_vfe_get_vfe_line_id(struct media_entity *entity, enum vfe_line_id *id)
> -{
> - struct v4l2_subdev *sd;
> - struct vfe_line *line;
> -
> - sd = media_entity_to_v4l2_subdev(entity);
> - line = v4l2_get_subdevdata(sd);
> -
> - *id = line->id;
> -}
> -
> /*
> * vfe_link_setup - Setup VFE connections
> * @entity: Pointer to media entity structure
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h
> index 0eba04eb9b77..cbc314c4e244 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe.h
> +++ b/drivers/media/platform/qcom/camss/camss-vfe.h
> @@ -163,9 +163,6 @@ int msm_vfe_register_entities(struct vfe_device *vfe,
>
> void msm_vfe_unregister_entities(struct vfe_device *vfe);
>
> -void msm_vfe_get_vfe_id(struct media_entity *entity, u8 *id);
> -void msm_vfe_get_vfe_line_id(struct media_entity *entity, enum vfe_line_id *id);
> -
> /*
> * vfe_buf_add_pending - Add output buffer to list of pending
> * @output: VFE output
Reviewed-by: Robert Foss <robert.foss@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-26 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 12:25 [PATCH] media: camss: Move and unexport functions specific to ISPIF Vladimir Zapolskiy
2022-05-26 12:00 ` Robert Foss
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.