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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/media/platform/samsung/mfc5/s5p_mfc_opr_v5.c
 *
 * Samsung MFC (Multi Function Codec - FIMV) driver
 * This file contains hw related functions.
 *
 * Kamil Debski, Copyright (c) 2011 Samsung Electronics
 * http://www.samsung.com/
 */

#include "s5p_mfc_common.h"
#include "s5p_mfc_cmd.h"
#include "s5p_mfc_ctrl.h"
#include "s5p_mfc_debug.h"
#include "s5p_mfc_intr.h"
#include "s5p_mfc_pm.h"
#include "s5p_mfc_opr.h"
#include "s5p_mfc_opr_v5.h"
#include <asm/cacheflush.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/firmware.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/mm.h>
#include <linux/sched.h>

#define OFFSETA(x)
#define OFFSETB(x)

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


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

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

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

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

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

static int s5p_mfc_alloc_dev_context_buffer_v5(struct s5p_mfc_dev *dev)
{}

static void s5p_mfc_release_dev_context_buffer_v5(struct s5p_mfc_dev *dev)
{}

static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data,
			unsigned int ofs)
{}

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

static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx)
{}

static void s5p_mfc_enc_calc_src_size_v5(struct s5p_mfc_ctx *ctx)
{}

/* Set registers for decoding temporary buffers */
static void s5p_mfc_set_dec_desc_buffer(struct s5p_mfc_ctx *ctx)
{}

/* Set registers for shared buffer */
static void s5p_mfc_set_shared_buffer(struct s5p_mfc_ctx *ctx)
{}

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

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

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

static void s5p_mfc_set_enc_frame_buffer_v5(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_v5(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_v5(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)
{}

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

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

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

static int s5p_mfc_init_encode_v5(struct s5p_mfc_ctx *ctx)
{}

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

static void s5p_mfc_run_res_change(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx, int last_frame)
{}

static int s5p_mfc_run_enc_frame(struct s5p_mfc_ctx *ctx)
{}

static void s5p_mfc_run_init_dec(struct s5p_mfc_ctx *ctx)
{}

static void s5p_mfc_run_init_enc(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_run_init_dec_buffers(struct s5p_mfc_ctx *ctx)
{}

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

static void s5p_mfc_clear_int_flags_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dspl_y_adr_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dec_y_adr_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dspl_status_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dec_status_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dec_frame_type_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_disp_frame_type_v5(struct s5p_mfc_ctx *ctx)
{}

static int s5p_mfc_get_consumed_stream_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_int_reason_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_int_err_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_err_dec_v5(unsigned int err)
{}

static int s5p_mfc_get_img_width_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_img_height_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_dpb_count_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_mv_count_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_inst_no_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_enc_strm_size_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_enc_slice_type_v5(struct s5p_mfc_dev *dev)
{}

static int s5p_mfc_get_enc_dpb_count_v5(struct s5p_mfc_dev *dev)
{}

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

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

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

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

/* Initialize opr function pointers for MFC v5 */
static const struct s5p_mfc_hw_ops s5p_mfc_ops_v5 =;

const struct s5p_mfc_hw_ops *s5p_mfc_init_hw_ops_v5(void)
{}