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

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



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

The lemans(sa8775p) SoC includes CSID 690, which is functionally very
similar to CSID 780, with only minor differences in register
bitfields. This rename prepares the codebase for supporting
additional SoCs without duplicating CSID 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 9e89149a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ qcom-camss-objs += \
		camss-csid-340.o \
		camss-csid-680.o \
		camss-csid-gen2.o \
		camss-csid-780.o \
		camss-csid-gen3.o \
		camss-csiphy-2ph-1-0.o \
		camss-csiphy-3ph-1-0.o \
		camss-csiphy.o \
+3 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@

#include "camss.h"
#include "camss-csid.h"
#include "camss-csid-780.h"
#include "camss-csid-gen3.h"

#define CSID_IO_PATH_CFG0(csid)		(0x4 * (csid))
#define		OUTPUT_IFE_EN			0x100
@@ -259,7 +259,7 @@ static irqreturn_t csid_isr(int irq, void *dev)

			if (buf_done_val & BIT(BUF_DONE_IRQ_STATUS_RDI_OFFSET + i)) {
				/*
				 * For Titan 780, bus done and RUP IRQ have been moved to
				 * For Titan Gen3, bus done and RUP IRQ have been moved to
				 * CSID from VFE. Once CSID received bus done, need notify
				 * VFE of this event. Trigger VFE to handle bus done process.
				 */
@@ -325,7 +325,7 @@ static void csid_subdev_init(struct csid_device *csid)
	csid->testgen.nmodes = CSID_PAYLOAD_MODE_DISABLED;
}

const struct csid_hw_ops csid_ops_780 = {
const struct csid_hw_ops csid_ops_gen3 = {
	.configure_stream = csid_configure_stream,
	.configure_testgen_pattern = csid_configure_testgen_pattern,
	.hw_version = csid_hw_version,
+4 −4
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * camss-csid-780.h
 * camss-csid-gen3.h
 *
 * Qualcomm MSM Camera Subsystem - CSID (CSI Decoder) Module Generation 3
 *
 * Copyright (c) 2024 Qualcomm Technologies, Inc.
 */
#ifndef __QC_MSM_CAMSS_CSID_780_H__
#define __QC_MSM_CAMSS_CSID_780_H__
#ifndef __QC_MSM_CAMSS_CSID_GEN3_H__
#define __QC_MSM_CAMSS_CSID_GEN3_H__

#define DECODE_FORMAT_UNCOMPRESSED_8_BIT	0x1
#define DECODE_FORMAT_UNCOMPRESSED_10_BIT	0x2
@@ -22,4 +22,4 @@
#define PLAIN_FORMAT_PLAIN16	0x1 /* supports DPCM, UNCOMPRESSED_10/16_BIT */
#define PLAIN_FORMAT_PLAIN32	0x2 /* supports UNCOMPRESSED_20_BIT */

#endif /* __QC_MSM_CAMSS_CSID_780_H__ */
#endif /* __QC_MSM_CAMSS_CSID_GEN3_H__ */
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ extern const struct csid_hw_ops csid_ops_4_7;
extern const struct csid_hw_ops csid_ops_340;
extern const struct csid_hw_ops csid_ops_680;
extern const struct csid_hw_ops csid_ops_gen2;
extern const struct csid_hw_ops csid_ops_780;
extern const struct csid_hw_ops csid_ops_gen3;

/*
 * csid_is_lite - Check if CSID is CSID lite.
+5 −5
Original line number Diff line number Diff line
@@ -2419,7 +2419,7 @@ static const struct camss_subdev_resources csid_res_8550[] = {
		.csid = {
			.is_lite = false,
			.parent_dev_ops = &vfe_parent_dev_ops,
			.hw_ops = &csid_ops_780,
			.hw_ops = &csid_ops_gen3,
			.formats = &csid_formats_gen2
		}
	},
@@ -2434,7 +2434,7 @@ static const struct camss_subdev_resources csid_res_8550[] = {
		.csid = {
			.is_lite = false,
			.parent_dev_ops = &vfe_parent_dev_ops,
			.hw_ops = &csid_ops_780,
			.hw_ops = &csid_ops_gen3,
			.formats = &csid_formats_gen2
		}
	},
@@ -2449,7 +2449,7 @@ static const struct camss_subdev_resources csid_res_8550[] = {
		.csid = {
			.is_lite = false,
			.parent_dev_ops = &vfe_parent_dev_ops,
			.hw_ops = &csid_ops_780,
			.hw_ops = &csid_ops_gen3,
			.formats = &csid_formats_gen2
		}
	},
@@ -2464,7 +2464,7 @@ static const struct camss_subdev_resources csid_res_8550[] = {
		.csid = {
			.is_lite = true,
			.parent_dev_ops = &vfe_parent_dev_ops,
			.hw_ops = &csid_ops_780,
			.hw_ops = &csid_ops_gen3,
			.formats = &csid_formats_gen2
		}
	},
@@ -2479,7 +2479,7 @@ static const struct camss_subdev_resources csid_res_8550[] = {
		.csid = {
			.is_lite = true,
			.parent_dev_ops = &vfe_parent_dev_ops,
			.hw_ops = &csid_ops_780,
			.hw_ops = &csid_ops_gen3,
			.formats = &csid_formats_gen2
		}
	}