linux/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Rockchip ISP1 Driver - V4l resizer device
 *
 * Copyright (C) 2019 Collabora, Ltd.
 *
 * Based on Rockchip ISP1 driver by Rockchip Electronics Co., Ltd.
 * Copyright (C) 2017 Rockchip Electronics Co., Ltd.
 */

#include "rkisp1-common.h"

#define RKISP1_RSZ_SP_DEV_NAME
#define RKISP1_RSZ_MP_DEV_NAME

#define RKISP1_DEF_FMT
#define RKISP1_DEF_PIXEL_ENC

struct rkisp1_rsz_yuv_mbus_info {};

static const struct rkisp1_rsz_yuv_mbus_info rkisp1_rsz_yuv_src_formats[] =;

static const struct rkisp1_rsz_yuv_mbus_info *rkisp1_rsz_get_yuv_mbus_info(u32 mbus_code)
{}

enum rkisp1_shadow_regs_when {};

struct rkisp1_rsz_config {};

static const struct rkisp1_rsz_config rkisp1_rsz_config_mp =;

static const struct rkisp1_rsz_config rkisp1_rsz_config_sp =;

static inline u32 rkisp1_rsz_read(struct rkisp1_resizer *rsz, u32 offset)
{}

static inline void rkisp1_rsz_write(struct rkisp1_resizer *rsz, u32 offset,
				    u32 value)
{}

/* ----------------------------------------------------------------------------
 * Dual crop hw configs
 */

static void rkisp1_dcrop_disable(struct rkisp1_resizer *rsz,
				 enum rkisp1_shadow_regs_when when)
{}

/* configure dual-crop unit */
static void rkisp1_dcrop_config(struct rkisp1_resizer *rsz,
				const struct v4l2_subdev_state *sd_state)
{}

/* ----------------------------------------------------------------------------
 * Resizer hw configs
 */

static void rkisp1_rsz_update_shadow(struct rkisp1_resizer *rsz,
				     enum rkisp1_shadow_regs_when when)
{}

static u32 rkisp1_rsz_calc_ratio(u32 len_sink, u32 len_src)
{}

static void rkisp1_rsz_disable(struct rkisp1_resizer *rsz,
			       enum rkisp1_shadow_regs_when when)
{}

static void rkisp1_rsz_config_regs(struct rkisp1_resizer *rsz,
				   const struct v4l2_rect *sink_y,
				   const struct v4l2_rect *sink_c,
				   const struct v4l2_area *src_y,
				   const struct v4l2_area *src_c,
				   enum rkisp1_shadow_regs_when when)
{}

static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
			      const struct v4l2_subdev_state *sd_state,
			      enum rkisp1_shadow_regs_when when)
{}

/* ----------------------------------------------------------------------------
 * Subdev pad operations
 */

static int rkisp1_rsz_enum_mbus_code(struct v4l2_subdev *sd,
				     struct v4l2_subdev_state *sd_state,
				     struct v4l2_subdev_mbus_code_enum *code)
{}

static int rkisp1_rsz_init_state(struct v4l2_subdev *sd,
				 struct v4l2_subdev_state *sd_state)
{}

static void rkisp1_rsz_set_src_fmt(struct rkisp1_resizer *rsz,
				   struct v4l2_subdev_state *sd_state,
				   struct v4l2_mbus_framefmt *format)
{}

static void rkisp1_rsz_set_sink_crop(struct rkisp1_resizer *rsz,
				     struct v4l2_subdev_state *sd_state,
				     struct v4l2_rect *r)
{}

static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz,
				    struct v4l2_subdev_state *sd_state,
				    struct v4l2_mbus_framefmt *format)
{}

static int rkisp1_rsz_set_fmt(struct v4l2_subdev *sd,
			      struct v4l2_subdev_state *sd_state,
			      struct v4l2_subdev_format *fmt)
{}

static int rkisp1_rsz_get_selection(struct v4l2_subdev *sd,
				    struct v4l2_subdev_state *sd_state,
				    struct v4l2_subdev_selection *sel)
{}

static int rkisp1_rsz_set_selection(struct v4l2_subdev *sd,
				    struct v4l2_subdev_state *sd_state,
				    struct v4l2_subdev_selection *sel)
{}

static const struct media_entity_operations rkisp1_rsz_media_ops =;

static const struct v4l2_subdev_pad_ops rkisp1_rsz_pad_ops =;

/* ----------------------------------------------------------------------------
 * Stream operations
 */

static int rkisp1_rsz_s_stream(struct v4l2_subdev *sd, int enable)
{}

static const struct v4l2_subdev_video_ops rkisp1_rsz_video_ops =;

static const struct v4l2_subdev_ops rkisp1_rsz_ops =;

static const struct v4l2_subdev_internal_ops rkisp1_rsz_internal_ops =;

static void rkisp1_rsz_unregister(struct rkisp1_resizer *rsz)
{}

static int rkisp1_rsz_register(struct rkisp1_resizer *rsz)
{}

int rkisp1_resizer_devs_register(struct rkisp1_device *rkisp1)
{}

void rkisp1_resizer_devs_unregister(struct rkisp1_device *rkisp1)
{}