Commit a3dce6e3 authored by Vikram Sharma's avatar Vikram Sharma Committed by Mauro Carvalho Chehab
Browse files

media: qcom: camss: Rename camss-vfe-780.c to camss-vfe-gen3.c



Rename the file camss-vfe-780.c to camss-vfe-gen3.c to enable
reuse of VFE logic across multiple SoCs.

The lemans(sa8775p) SoC includes VFE 690, which is very similar
to VFE 780, with only minor differences in register bitfields.
Rename prepares the codebase for supporting additional SoCs
without duplicating VFE logic.

Signed-off-by: default avatarVikram Sharma <quic_vikramsa@quicinc.com>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarBryan O'Donoghue <bod@kernel.org>
Signed-off-by: default avatarHans Verkuil <hverkuil+cisco@kernel.org>
parent 0d6d5f49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ qcom-camss-objs += \
		camss-vfe-340.o \
		camss-vfe-480.o \
		camss-vfe-680.o \
		camss-vfe-780.o \
		camss-vfe-gen3.o \
		camss-vfe-gen1.o \
		camss-vfe.o \
		camss-video.o \
+4 −4
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Qualcomm MSM Camera Subsystem - VFE (Video Front End) Module v780 (SM8550)
 * Qualcomm MSM Camera Subsystem - VFE (Video Front End) Module gen3
 *
 * Copyright (c) 2024 Qualcomm Technologies, Inc.
 */
@@ -113,14 +113,14 @@ static inline void vfe_reg_update_clear(struct vfe_device *vfe,
	camss_reg_update(vfe->camss, vfe->id, port_id, true);
}

static const struct camss_video_ops vfe_video_ops_780 = {
static const struct camss_video_ops vfe_video_ops_gen3 = {
	.queue_buffer = vfe_queue_buffer_v2,
	.flush_buffers = vfe_flush_buffers,
};

static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)
{
	vfe->video_ops = vfe_video_ops_780;
	vfe->video_ops = vfe_video_ops_gen3;
}

static void vfe_global_reset(struct vfe_device *vfe)
@@ -140,7 +140,7 @@ static int vfe_halt(struct vfe_device *vfe)
	return 0;
}

const struct vfe_hw_ops vfe_ops_780 = {
const struct vfe_hw_ops vfe_ops_gen3 = {
	.global_reset = vfe_global_reset,
	.hw_version = vfe_hw_version,
	.isr = vfe_isr,
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ extern const struct vfe_hw_ops vfe_ops_170;
extern const struct vfe_hw_ops vfe_ops_340;
extern const struct vfe_hw_ops vfe_ops_480;
extern const struct vfe_hw_ops vfe_ops_680;
extern const struct vfe_hw_ops vfe_ops_780;
extern const struct vfe_hw_ops vfe_ops_gen3;

int vfe_get(struct vfe_device *vfe);
void vfe_put(struct vfe_device *vfe);
+5 −5
Original line number Diff line number Diff line
@@ -2505,7 +2505,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = {
			.is_lite = false,
			.has_pd = true,
			.pd_name = "ife0",
			.hw_ops = &vfe_ops_780,
			.hw_ops = &vfe_ops_gen3,
			.formats_rdi = &vfe_formats_rdi_845,
			.formats_pix = &vfe_formats_pix_845
		}
@@ -2529,7 +2529,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = {
			.is_lite = false,
			.has_pd = true,
			.pd_name = "ife1",
			.hw_ops = &vfe_ops_780,
			.hw_ops = &vfe_ops_gen3,
			.formats_rdi = &vfe_formats_rdi_845,
			.formats_pix = &vfe_formats_pix_845
		}
@@ -2553,7 +2553,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = {
			.is_lite = false,
			.has_pd = true,
			.pd_name = "ife2",
			.hw_ops = &vfe_ops_780,
			.hw_ops = &vfe_ops_gen3,
			.formats_rdi = &vfe_formats_rdi_845,
			.formats_pix = &vfe_formats_pix_845
		}
@@ -2575,7 +2575,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = {
		.vfe = {
			.line_num = 4,
			.is_lite = true,
			.hw_ops = &vfe_ops_780,
			.hw_ops = &vfe_ops_gen3,
			.formats_rdi = &vfe_formats_rdi_845,
			.formats_pix = &vfe_formats_pix_845
		}
@@ -2597,7 +2597,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = {
		.vfe = {
			.line_num = 4,
			.is_lite = true,
			.hw_ops = &vfe_ops_780,
			.hw_ops = &vfe_ops_gen3,
			.formats_rdi = &vfe_formats_rdi_845,
			.formats_pix = &vfe_formats_pix_845
		}