linux/drivers/media/platform/qcom/camss/camss-vfe-480.c

// SPDX-License-Identifier: GPL-2.0
/*
 * camss-vfe-480.c
 *
 * Qualcomm MSM Camera Subsystem - VFE (Video Front End) Module v480 (SM8250)
 *
 * Copyright (C) 2020-2021 Linaro Ltd.
 * Copyright (C) 2021 Jonathan Marek
 */

#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>

#include "camss.h"
#include "camss-vfe.h"

#define VFE_HW_VERSION

#define VFE_GLOBAL_RESET_CMD
#define GLOBAL_RESET_HW_AND_REG

#define VFE_REG_UPDATE_CMD
static inline int reg_update_rdi(struct vfe_device *vfe, int n)
{}

#define REG_UPDATE_RDI
#define VFE_IRQ_CMD
#define IRQ_CMD_GLOBAL_CLEAR

#define VFE_IRQ_MASK(n)
#define IRQ_MASK_0_RESET_ACK
#define IRQ_MASK_0_BUS_TOP_IRQ
#define VFE_IRQ_CLEAR(n)
#define VFE_IRQ_STATUS(n)

#define BUS_REG_BASE

#define VFE_BUS_WM_CGC_OVERRIDE
#define WM_CGC_OVERRIDE_ALL

#define VFE_BUS_WM_TEST_BUS_CTRL

#define VFE_BUS_IRQ_MASK(n)
static inline int bus_irq_mask_0_rdi_rup(struct vfe_device *vfe, int n)
{}

#define BUS_IRQ_MASK_0_RDI_RUP
static inline int bus_irq_mask_0_comp_done(struct vfe_device *vfe, int n)
{}

#define BUS_IRQ_MASK_0_COMP_DONE
#define VFE_BUS_IRQ_CLEAR(n)
#define VFE_BUS_IRQ_STATUS(n)
#define VFE_BUS_IRQ_CLEAR_GLOBAL

#define VFE_BUS_WM_CFG(n)
#define WM_CFG_EN
#define WM_CFG_MODE
#define MODE_QCOM_PLAIN
#define MODE_MIPI_RAW
#define VFE_BUS_WM_IMAGE_ADDR(n)
#define VFE_BUS_WM_FRAME_INCR(n)
#define VFE_BUS_WM_IMAGE_CFG_0(n)
#define WM_IMAGE_CFG_0_DEFAULT_WIDTH
#define VFE_BUS_WM_IMAGE_CFG_1(n)
#define VFE_BUS_WM_IMAGE_CFG_2(n)
#define VFE_BUS_WM_PACKER_CFG(n)
#define VFE_BUS_WM_HEADER_ADDR(n)
#define VFE_BUS_WM_HEADER_INCR(n)
#define VFE_BUS_WM_HEADER_CFG(n)

#define VFE_BUS_WM_IRQ_SUBSAMPLE_PERIOD(n)
#define VFE_BUS_WM_IRQ_SUBSAMPLE_PATTERN(n)
#define VFE_BUS_WM_FRAMEDROP_PERIOD(n)
#define VFE_BUS_WM_FRAMEDROP_PATTERN(n)

#define VFE_BUS_WM_SYSTEM_CACHE_CFG(n)
#define VFE_BUS_WM_BURST_LIMIT(n)

/* for titan 480, each bus client is hardcoded to a specific path
 * and each bus client is part of a hardcoded "comp group"
 */
#define RDI_WM(n)
#define RDI_COMP_GROUP(n)

#define MAX_VFE_OUTPUT_LINES

static u32 vfe_hw_version(struct vfe_device *vfe)
{}

static void vfe_global_reset(struct vfe_device *vfe)
{}

static void vfe_wm_start(struct vfe_device *vfe, u8 wm, struct vfe_line *line)
{}

static void vfe_wm_stop(struct vfe_device *vfe, u8 wm)
{}

static void vfe_wm_update(struct vfe_device *vfe, u8 wm, u32 addr,
			  struct vfe_line *line)
{}

static void vfe_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id)
{}

static inline void vfe_reg_update_clear(struct vfe_device *vfe,
					enum vfe_line_id line_id)
{}

static void vfe_enable_irq_common(struct vfe_device *vfe)
{}

static void vfe_enable_lines_irq(struct vfe_device *vfe)
{}

static void vfe_isr_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id);
static void vfe_isr_wm_done(struct vfe_device *vfe, u8 wm);

/*
 * vfe_isr - VFE module interrupt handler
 * @irq: Interrupt line
 * @dev: VFE device
 *
 * Return IRQ_HANDLED on success
 */
static irqreturn_t vfe_isr(int irq, void *dev)
{}

/*
 * vfe_halt - Trigger halt on VFE module and wait to complete
 * @vfe: VFE device
 *
 * Return 0 on success or a negative error code otherwise
 */
static int vfe_halt(struct vfe_device *vfe)
{}

static int vfe_get_output(struct vfe_line *line)
{}

static int vfe_enable_output(struct vfe_line *line)
{}

/*
 * vfe_enable - Enable streaming on VFE line
 * @line: VFE line
 *
 * Return 0 on success or a negative error code otherwise
 */
static int vfe_enable(struct vfe_line *line)
{}

/*
 * vfe_isr_reg_update - Process reg update interrupt
 * @vfe: VFE Device
 * @line_id: VFE line
 */
static void vfe_isr_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id)
{}

/*
 * vfe_isr_wm_done - Process write master done interrupt
 * @vfe: VFE Device
 * @wm: Write master id
 */
static void vfe_isr_wm_done(struct vfe_device *vfe, u8 wm)
{}

/*
 * vfe_queue_buffer - Add empty buffer
 * @vid: Video device structure
 * @buf: Buffer to be enqueued
 *
 * Add an empty buffer - depending on the current number of buffers it will be
 * put in pending buffer queue or directly given to the hardware to be filled.
 *
 * Return 0 on success or a negative error code otherwise
 */
static int vfe_queue_buffer(struct camss_video *vid,
			    struct camss_buffer *buf)
{}

static const struct camss_video_ops vfe_video_ops_480 =;

static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)
{}

const struct vfe_hw_ops vfe_ops_480 =;