linux/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c
 *
 * Samsung MFC (Multi Function Codec - FIMV) driver
 * This file contains hw related functions.
 *
 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com/
 */

#undef DEBUG

#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/firmware.h>
#include <linux/err.h>
#include <linux/sched.h>
#include <linux/dma-mapping.h>

#include <asm/cacheflush.h>

#include "s5p_mfc_common.h"
#include "s5p_mfc_cmd.h"
#include "s5p_mfc_intr.h"
#include "s5p_mfc_pm.h"
#include "s5p_mfc_debug.h"
#include "s5p_mfc_opr.h"
#include "s5p_mfc_opr_v6.h"

/* #define S5P_MFC_DEBUG_REGWRITE  */
#ifdef S5P_MFC_DEBUG_REGWRITE
#undef writel
#define writel
#endif /* S5P_MFC_DEBUG_REGWRITE */

#define IS_MFCV6_V2(dev)

/* Allocate temporary buffers for decoding */
static int s5p_mfc_alloc_dec_temp_buffers_v6(struct s5p_mfc_ctx *ctx)
{}

/* Release temporary buffers for decoding */
static void s5p_mfc_release_dec_desc_buffer_v6(struct s5p_mfc_ctx *ctx)
{}

/* Allocate codec buffers */
static int s5p_mfc_alloc_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
{}

/* Release buffers allocated for codec */
static void s5p_mfc_release_codec_buffers_v6(struct s5p_mfc_ctx *ctx)
{}

/* Allocate memory for instance data buffer */
static int s5p_mfc_alloc_instance_buffer_v6(struct s5p_mfc_ctx *ctx)
{}

/* Release instance buffer */
static void s5p_mfc_release_instance_buffer_v6(struct s5p_mfc_ctx *ctx)
{}

/* Allocate context buffers for SYS_INIT */
static int s5p_mfc_alloc_dev_context_buffer_v6(struct s5p_mfc_dev *dev)
{}

/* Release context buffers for SYS_INIT */
static void s5p_mfc_release_dev_context_buffer_v6(struct s5p_mfc_dev *dev)
{}

static int calc_plane(int width, int height)
{}

static void s5p_mfc_dec_calc_dpb_size_v6(struct s5p_mfc_ctx *ctx)
{}

static void s5p_mfc_enc_calc_src_size_v6(struct s5p_mfc_ctx *ctx)
{}

/* Set registers for decoding stream buffer */
static int s5p_mfc_set_dec_stream_buffer_v6(struct s5p_mfc_ctx *ctx,
			int buf_addr, unsigned int start_num_byte,
			unsigned int strm_size)
{}

/* Set decoding frame buffer */
static int s5p_mfc_set_dec_frame_buffer_v6(struct s5p_mfc_ctx *ctx)
{}

/* Set registers for encoding stream buffer */
static int s5p_mfc_set_enc_stream_buffer_v6(struct s5p_mfc_ctx *ctx,
		unsigned long addr, unsigned int size)
{}

static void s5p_mfc_set_enc_frame_buffer_v6(struct s5p_mfc_ctx *ctx,
		unsigned long y_addr, unsigned long c_addr,
		unsigned long c_1_addr)
{}

static void s5p_mfc_get_enc_frame_buffer_v6(struct s5p_mfc_ctx *ctx,
		unsigned long *y_addr, unsigned long *c_addr,
		unsigned long *c_1_addr)
{}

/* Set encoding ref & codec buffer */
static int s5p_mfc_set_enc_ref_buffer_v6(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_slice_mode(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_enc_params(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_enc_params_mpeg4(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_enc_params_h263(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_enc_params_vp8(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_set_enc_params_hevc(struct s5p_mfc_ctx *ctx)
{}

/* Initialize decoding */
static int s5p_mfc_init_decode_v6(struct s5p_mfc_ctx *ctx)
{}

static inline void s5p_mfc_set_flush(struct s5p_mfc_ctx *ctx, int flush)
{}

/* Decode a single frame */
static int s5p_mfc_decode_one_frame_v6(struct s5p_mfc_ctx *ctx,
			enum s5p_mfc_decode_arg last_frame)
{}

static int s5p_mfc_init_encode_v6(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_h264_set_aso_slice_order_v6(struct s5p_mfc_ctx *ctx)
{}

/* Encode a single frame */
static int s5p_mfc_encode_one_frame_v6(struct s5p_mfc_ctx *ctx)
{}

static inline void s5p_mfc_run_dec_last_frames(struct s5p_mfc_ctx *ctx)
{}

static inline int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx)
{}

static inline int s5p_mfc_run_enc_frame(struct s5p_mfc_ctx *ctx)
{}

static inline void s5p_mfc_run_init_dec(struct s5p_mfc_ctx *ctx)
{}

static inline void s5p_mfc_run_init_enc(struct s5p_mfc_ctx *ctx)
{}

static inline int s5p_mfc_run_init_dec_buffers(struct s5p_mfc_ctx *ctx)
{}

static inline int s5p_mfc_run_init_enc_buffers(struct s5p_mfc_ctx *ctx)
{}

/* Try running an operation on hardware */
static void s5p_mfc_try_run_v6(struct s5p_mfc_dev *dev)
{}

static void s5p_mfc_clear_int_flags_v6(struct s5p_mfc_dev *dev)
{}

static unsigned int
s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned long ofs)
{}

static int s5p_mfc_get_dspl_y_adr_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dec_y_adr_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dspl_status_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dec_status_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dec_frame_type_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_disp_frame_type_v6(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_get_consumed_stream_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_int_reason_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_int_err_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_err_dec_v6(unsigned int err)
{}

static int s5p_mfc_get_img_width_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_img_height_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dpb_count_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_mv_count_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_min_scratch_buf_size(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_e_min_scratch_buf_size(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_inst_no_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_enc_dpb_count_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_enc_strm_size_v6(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_enc_slice_type_v6(struct s5p_mfc_dev *dev)
{}

static unsigned int s5p_mfc_get_pic_type_top_v6(struct s5p_mfc_ctx *ctx)
{}

static unsigned int s5p_mfc_get_pic_type_bot_v6(struct s5p_mfc_ctx *ctx)
{}

static unsigned int s5p_mfc_get_crop_info_h_v6(struct s5p_mfc_ctx *ctx)
{}

static unsigned int s5p_mfc_get_crop_info_v_v6(struct s5p_mfc_ctx *ctx)
{}

static struct s5p_mfc_regs mfc_regs;

/* Initialize registers for MFC v6 onwards */
const struct s5p_mfc_regs *s5p_mfc_init_regs_v6_plus(struct s5p_mfc_dev *dev)
{}

/* Initialize opr function pointers for MFC v6 */
static const struct s5p_mfc_hw_ops s5p_mfc_ops_v6 =;

const struct s5p_mfc_hw_ops *s5p_mfc_init_hw_ops_v6(void)
{}