Commit 284be891 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: atomisp: de-duplicate names at *_input_system_global.h



There are some duplicated names between the ISP2401 and ISP2400
for the input system, with different meanings.

In order to avoid ubiquity, let's prepend those with the
name of the ISP.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 39bc26e4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
#define _IBUF_CNTRL_DMA_SYNC_WAIT_FOR_SYNC		1
#define _IBUF_CNTRL_DMA_SYNC_FSM_WAIT_FOR_ACK		(0x3 << 1)

struct	ib_buffer_s {
struct	isp2401_ib_buffer_s {
	u32	start_addr;	/* start address of the buffer in the
					 * "input-buffer hardware block"
					 */
@@ -41,7 +41,7 @@ struct ib_buffer_s {
	u32	stride;		/* stride per buffer line (in bytes) */
	u32	lines;		/* lines in the buffer */
};
typedef struct ib_buffer_s	ib_buffer_t;
typedef struct isp2401_ib_buffer_s	isp2401_ib_buffer_t;

typedef struct ibuf_ctrl_cfg_s ibuf_ctrl_cfg_t;
struct ibuf_ctrl_cfg_s {
@@ -58,7 +58,7 @@ struct ibuf_ctrl_cfg_s {
		u32 elems_per_word_in_dest;
	} dma_cfg;

	ib_buffer_t ib_buffer;
	isp2401_ib_buffer_t ib_buffer;

	struct {
		u32 stride;
+4 −4
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@
/*
 * Duplicates "sync_generator_cfg_t" in "input_system_global.h".
 */
typedef struct sync_generator_cfg_s sync_generator_cfg_t;
struct sync_generator_cfg_s {
typedef struct isp2401_sync_generator_cfg_s isp2401_sync_generator_cfg_t;
struct isp2401_sync_generator_cfg_s {
	u32	hblank_cycles;
	u32	vblank_cycles;
	u32	pixels_per_clock;
@@ -72,7 +72,7 @@ struct pixelgen_tpg_cfg_s {
		s32	v_delta;	/* vertical delta? */
	} delta_cfg;

	sync_generator_cfg_t	 sync_gen_cfg;
	isp2401_sync_generator_cfg_t	 sync_gen_cfg;
};

/*
@@ -84,7 +84,7 @@ struct pixelgen_prbs_cfg_s {
	s32	seed0;
	s32	seed1;

	sync_generator_cfg_t	sync_gen_cfg;
	isp2401_sync_generator_cfg_t	sync_gen_cfg;
};

/* end of Pixel-generator: TPG. ("pixelgen_global.h") */
+6 −6
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#define ZERO (0x0)
#define ONE  (1U)

static const ib_buffer_t   IB_BUFFER_NULL = {0, 0, 0 };
static const isp2400_ib_buffer_t   IB_BUFFER_NULL = {0, 0, 0 };

static input_system_err_t input_system_configure_channel(
    const channel_cfg_t		channel);
@@ -48,12 +48,12 @@ static void input_system_network_rst(const input_system_ID_t ID);
static void capture_unit_configure(
    const input_system_ID_t			ID,
    const sub_system_ID_t			sub_id,
    const ib_buffer_t *const cfg);
    const isp2400_ib_buffer_t *const cfg);

static void acquisition_unit_configure(
    const input_system_ID_t			ID,
    const sub_system_ID_t			sub_id,
    const ib_buffer_t *const cfg);
    const isp2400_ib_buffer_t *const cfg);

static void ctrl_unit_configure(
    const input_system_ID_t			ID,
@@ -953,7 +953,7 @@ static input_system_err_t input_buffer_configuration(void)
	u32 current_address    = 0;
	u32 unallocated_memory = IB_CAPACITY_IN_WORDS;

	ib_buffer_t	candidate_buffer_acq  = IB_BUFFER_NULL;
	isp2400_ib_buffer_t	candidate_buffer_acq  = IB_BUFFER_NULL;
	u32 size_requested;
	input_system_config_flags_t	acq_already_specified = INPUT_SYSTEM_CFG_FLAG_RESET;
	input_system_csi_port_t port;
@@ -1062,7 +1062,7 @@ static input_system_err_t input_buffer_configuration(void)
static void capture_unit_configure(
    const input_system_ID_t			ID,
    const sub_system_ID_t			sub_id,
    const ib_buffer_t *const cfg)
    const isp2400_ib_buffer_t *const cfg)
{
	assert(ID < N_INPUT_SYSTEM_ID);
	assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <=
@@ -1088,7 +1088,7 @@ static void capture_unit_configure(
static void acquisition_unit_configure(
    const input_system_ID_t			ID,
    const sub_system_ID_t			sub_id,
    const ib_buffer_t *const cfg)
    const isp2400_ib_buffer_t *const cfg)
{
	assert(ID < N_INPUT_SYSTEM_ID);
	assert(sub_id == ACQUISITION_UNIT0_ID);
+7 −7
Original line number Diff line number Diff line
@@ -75,13 +75,13 @@ typedef enum {
	N_INPUT_SYSTEM_BUFFERING_MODE
} buffering_mode_t;

typedef struct input_system_cfg_s	input_system_cfg_t;
typedef struct isp2400_input_system_cfg_s	input_system_cfg_t;
typedef struct sync_generator_cfg_s	sync_generator_cfg_t;
typedef struct tpg_cfg_s			tpg_cfg_t;
typedef struct prbs_cfg_s			prbs_cfg_t;

/* MW: uint16_t should be sufficient */
struct input_system_cfg_s {
struct isp2400_input_system_cfg_s {
	u32	no_side_band;
	u32	fmt_type;
	u32	ch_id;
@@ -118,7 +118,7 @@ struct gpfifo_cfg_s {
typedef struct gpfifo_cfg_s		gpfifo_cfg_t;

//ALX:Commented out to pass the compilation.
//typedef struct input_system_cfg_s input_system_cfg_t;
//typedef struct isp2400_input_system_cfg_s input_system_cfg_t;

struct ib_buffer_s {
	u32	mem_reg_size;
@@ -126,13 +126,13 @@ struct ib_buffer_s {
	u32	mem_reg_addr;
};

typedef struct ib_buffer_s	ib_buffer_t;
typedef struct ib_buffer_s	isp2400_ib_buffer_t;

struct csi_cfg_s {
	u32			csi_port;
	buffering_mode_t	buffering_mode;
	ib_buffer_t			csi_buffer;
	ib_buffer_t			acquisition_buffer;
	isp2400_ib_buffer_t	csi_buffer;
	isp2400_ib_buffer_t	acquisition_buffer;
	u32			nof_xmem_buffers;
};

@@ -144,6 +144,6 @@ typedef enum {
	INPUT_SYSTEM_CFG_FLAG_BLOCKED	= 1U << 1,
	INPUT_SYSTEM_CFG_FLAG_REQUIRED	= 1U << 2,
	INPUT_SYSTEM_CFG_FLAG_CONFLICT	= 1U << 3	// To mark a conflicting configuration.
} input_system_cfg_flag_t;
} isp2400_input_system_cfg_flag_t;

typedef u32 input_system_config_flags_t;
+4 −4
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ typedef struct input_switch_cfg_channel_s input_switch_cfg_channel_t;
typedef struct input_switch_cfg_s		input_switch_cfg_t;

struct ctrl_unit_cfg_s {
	ib_buffer_t		buffer_mipi[N_CAPTURE_UNIT_ID];
	ib_buffer_t		buffer_acquire[N_ACQUISITION_UNIT_ID];
	isp2400_ib_buffer_t		buffer_mipi[N_CAPTURE_UNIT_ID];
	isp2400_ib_buffer_t		buffer_acquire[N_ACQUISITION_UNIT_ID];
};

struct input_system_network_cfg_s {
@@ -128,9 +128,9 @@ struct input_system_cfg2400_s {

	// Possible another struct for ib.
	// This buffers set at the end, based on the all configurations.
	ib_buffer_t			csi_buffer[N_CSI_PORTS];
	isp2400_ib_buffer_t			csi_buffer[N_CSI_PORTS];
	input_system_config_flags_t	csi_buffer_flags[N_CSI_PORTS];
	ib_buffer_t			acquisition_buffer_unique;
	isp2400_ib_buffer_t			acquisition_buffer_unique;
	input_system_config_flags_t	acquisition_buffer_unique_flags;
	u32			unallocated_ib_mem_words; // Used for check.DEFAULT = IB_CAPACITY_IN_WORDS.
	//uint32_t			acq_allocated_ib_mem_words;
Loading