linux/drivers/gpu/drm/exynos/exynos_mixer.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2011 Samsung Electronics Co.Ltd
 * Authors:
 * Seung-Woo Kim <[email protected]>
 *	Inki Dae <[email protected]>
 *	Joonyoung Shim <[email protected]>
 *
 * Based on drivers/media/video/s5p-tv/mixer_reg.c
 */

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
#include <linux/wait.h>

#include <drm/drm_blend.h>
#include <drm/drm_edid.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_vblank.h>
#include <drm/exynos_drm.h>

#include "exynos_drm_crtc.h"
#include "exynos_drm_drv.h"
#include "exynos_drm_fb.h"
#include "exynos_drm_plane.h"
#include "regs-mixer.h"
#include "regs-vp.h"

#define MIXER_WIN_NR
#define VP_DEFAULT_WIN

/*
 * Mixer color space conversion coefficient triplet.
 * Used for CSC from RGB to YCbCr.
 * Each coefficient is a 10-bit fixed point number with
 * sign and no integer part, i.e.
 * [0:8] = fractional part (representing a value y = x / 2^9)
 * [9] = sign
 * Negative values are encoded with two's complement.
 */
#define MXR_CSC_C(x)
#define MXR_CSC_CT(a0, a1, a2)

/* YCbCr value, used for mixer background color configuration. */
#define MXR_YCBCR_VAL(y, cb, cr)

/* The pixelformats that are natively supported by the mixer. */
#define MXR_FORMAT_RGB565
#define MXR_FORMAT_ARGB1555
#define MXR_FORMAT_ARGB4444
#define MXR_FORMAT_ARGB8888

enum mixer_version_id {};

enum mixer_flag_bits {};

static const uint32_t mixer_formats[] =;

static const uint32_t vp_formats[] =;

struct mixer_context {};

struct mixer_drv_data {};

static const struct exynos_drm_plane_config plane_configs[MIXER_WIN_NR] =;

static const u8 filter_y_horiz_tap8[] =;

static const u8 filter_y_vert_tap4[] =;

static const u8 filter_cr_horiz_tap4[] =;

static inline u32 vp_reg_read(struct mixer_context *ctx, u32 reg_id)
{}

static inline void vp_reg_write(struct mixer_context *ctx, u32 reg_id,
				 u32 val)
{}

static inline void vp_reg_writemask(struct mixer_context *ctx, u32 reg_id,
				 u32 val, u32 mask)
{}

static inline u32 mixer_reg_read(struct mixer_context *ctx, u32 reg_id)
{}

static inline void mixer_reg_write(struct mixer_context *ctx, u32 reg_id,
				 u32 val)
{}

static inline void mixer_reg_writemask(struct mixer_context *ctx,
				 u32 reg_id, u32 val, u32 mask)
{}

static void mixer_regs_dump(struct mixer_context *ctx)
{}

static void vp_regs_dump(struct mixer_context *ctx)
{}

static inline void vp_filter_set(struct mixer_context *ctx,
		int reg_id, const u8 *data, unsigned int size)
{}

static void vp_default_filter(struct mixer_context *ctx)
{}

static void mixer_cfg_gfx_blend(struct mixer_context *ctx, unsigned int win,
				unsigned int pixel_alpha, unsigned int alpha)
{}

static void mixer_cfg_vp_blend(struct mixer_context *ctx, unsigned int alpha)
{}

static bool mixer_is_synced(struct mixer_context *ctx)
{}

static int mixer_wait_for_sync(struct mixer_context *ctx)
{}

static void mixer_disable_sync(struct mixer_context *ctx)
{}

static void mixer_enable_sync(struct mixer_context *ctx)
{}

static void mixer_cfg_scan(struct mixer_context *ctx, int width, int height)
{}

static void mixer_cfg_rgb_fmt(struct mixer_context *ctx, struct drm_display_mode *mode)
{}

static void mixer_cfg_layer(struct mixer_context *ctx, unsigned int win,
			    unsigned int priority, bool enable)
{}

static void mixer_run(struct mixer_context *ctx)
{}

static void mixer_stop(struct mixer_context *ctx)
{}

static void mixer_commit(struct mixer_context *ctx)
{}

static void vp_video_buffer(struct mixer_context *ctx,
			    struct exynos_drm_plane *plane)
{}

static void mixer_graph_buffer(struct mixer_context *ctx,
			       struct exynos_drm_plane *plane)
{}

static void vp_win_reset(struct mixer_context *ctx)
{}

static void mixer_win_reset(struct mixer_context *ctx)
{}

static irqreturn_t mixer_irq_handler(int irq, void *arg)
{}

static int mixer_resources_init(struct mixer_context *mixer_ctx)
{}

static int vp_resources_init(struct mixer_context *mixer_ctx)
{}

static int mixer_initialize(struct mixer_context *mixer_ctx,
			struct drm_device *drm_dev)
{}

static void mixer_ctx_remove(struct mixer_context *mixer_ctx)
{}

static int mixer_enable_vblank(struct exynos_drm_crtc *crtc)
{}

static void mixer_disable_vblank(struct exynos_drm_crtc *crtc)
{}

static void mixer_atomic_begin(struct exynos_drm_crtc *crtc)
{}

static void mixer_update_plane(struct exynos_drm_crtc *crtc,
			       struct exynos_drm_plane *plane)
{}

static void mixer_disable_plane(struct exynos_drm_crtc *crtc,
				struct exynos_drm_plane *plane)
{}

static void mixer_atomic_flush(struct exynos_drm_crtc *crtc)
{}

static void mixer_atomic_enable(struct exynos_drm_crtc *crtc)
{}

static void mixer_atomic_disable(struct exynos_drm_crtc *crtc)
{}

static enum drm_mode_status mixer_mode_valid(struct exynos_drm_crtc *crtc,
		const struct drm_display_mode *mode)
{}

static bool mixer_mode_fixup(struct exynos_drm_crtc *crtc,
		   const struct drm_display_mode *mode,
		   struct drm_display_mode *adjusted_mode)
{}

static const struct exynos_drm_crtc_ops mixer_crtc_ops =;

static const struct mixer_drv_data exynos5420_mxr_drv_data =;

static const struct mixer_drv_data exynos5250_mxr_drv_data =;

static const struct mixer_drv_data exynos4212_mxr_drv_data =;

static const struct mixer_drv_data exynos4210_mxr_drv_data =;

static const struct of_device_id mixer_match_types[] =;
MODULE_DEVICE_TABLE(of, mixer_match_types);

static int mixer_bind(struct device *dev, struct device *manager, void *data)
{}

static void mixer_unbind(struct device *dev, struct device *master, void *data)
{}

static const struct component_ops mixer_component_ops =;

static int mixer_probe(struct platform_device *pdev)
{}

static void mixer_remove(struct platform_device *pdev)
{}

static int __maybe_unused exynos_mixer_suspend(struct device *dev)
{}

static int __maybe_unused exynos_mixer_resume(struct device *dev)
{}

static const struct dev_pm_ops exynos_mixer_pm_ops =;

struct platform_driver mixer_driver =;