linux/drivers/gpu/drm/sun4i/sun4i_tv.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2015 Free Electrons
 * Copyright (C) 2015 NextThing Co
 *
 * Maxime Ripard <[email protected]>
 */

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>

#include "sun4i_crtc.h"
#include "sun4i_drv.h"
#include "sunxi_engine.h"

#define SUN4I_TVE_EN_REG
#define SUN4I_TVE_EN_DAC_MAP_MASK
#define SUN4I_TVE_EN_DAC_MAP(dac, out)
#define SUN4I_TVE_EN_ENABLE

#define SUN4I_TVE_CFG0_REG
#define SUN4I_TVE_CFG0_DAC_CONTROL_54M
#define SUN4I_TVE_CFG0_CORE_DATAPATH_54M
#define SUN4I_TVE_CFG0_CORE_CONTROL_54M
#define SUN4I_TVE_CFG0_YC_EN
#define SUN4I_TVE_CFG0_COMP_EN
#define SUN4I_TVE_CFG0_RES(x)
#define SUN4I_TVE_CFG0_RES_480i
#define SUN4I_TVE_CFG0_RES_576i

#define SUN4I_TVE_DAC0_REG
#define SUN4I_TVE_DAC0_CLOCK_INVERT
#define SUN4I_TVE_DAC0_LUMA(x)
#define SUN4I_TVE_DAC0_LUMA_0_4
#define SUN4I_TVE_DAC0_CHROMA(x)
#define SUN4I_TVE_DAC0_CHROMA_0_75
#define SUN4I_TVE_DAC0_INTERNAL_DAC(x)
#define SUN4I_TVE_DAC0_INTERNAL_DAC_37_5_OHMS
#define SUN4I_TVE_DAC0_DAC_EN(dac)

#define SUN4I_TVE_NOTCH_REG
#define SUN4I_TVE_NOTCH_DAC0_TO_DAC_DLY(dac, x)

#define SUN4I_TVE_CHROMA_FREQ_REG

#define SUN4I_TVE_PORCH_REG
#define SUN4I_TVE_PORCH_BACK(x)
#define SUN4I_TVE_PORCH_FRONT(x)

#define SUN4I_TVE_LINE_REG
#define SUN4I_TVE_LINE_FIRST(x)
#define SUN4I_TVE_LINE_NUMBER(x)

#define SUN4I_TVE_LEVEL_REG
#define SUN4I_TVE_LEVEL_BLANK(x)
#define SUN4I_TVE_LEVEL_BLACK(x)

#define SUN4I_TVE_DAC1_REG
#define SUN4I_TVE_DAC1_AMPLITUDE(dac, x)

#define SUN4I_TVE_DETECT_STA_REG
#define SUN4I_TVE_DETECT_STA_DAC(dac)
#define SUN4I_TVE_DETECT_STA_UNCONNECTED
#define SUN4I_TVE_DETECT_STA_CONNECTED
#define SUN4I_TVE_DETECT_STA_GROUND

#define SUN4I_TVE_CB_CR_LVL_REG
#define SUN4I_TVE_CB_CR_LVL_CR_BURST(x)
#define SUN4I_TVE_CB_CR_LVL_CB_BURST(x)

#define SUN4I_TVE_TINT_BURST_PHASE_REG
#define SUN4I_TVE_TINT_BURST_PHASE_CHROMA(x)

#define SUN4I_TVE_BURST_WIDTH_REG
#define SUN4I_TVE_BURST_WIDTH_BREEZEWAY(x)
#define SUN4I_TVE_BURST_WIDTH_BURST_WIDTH(x)
#define SUN4I_TVE_BURST_WIDTH_HSYNC_WIDTH(x)

#define SUN4I_TVE_CB_CR_GAIN_REG
#define SUN4I_TVE_CB_CR_GAIN_CR(x)
#define SUN4I_TVE_CB_CR_GAIN_CB(x)

#define SUN4I_TVE_SYNC_VBI_REG
#define SUN4I_TVE_SYNC_VBI_SYNC(x)
#define SUN4I_TVE_SYNC_VBI_VBLANK(x)

#define SUN4I_TVE_ACTIVE_LINE_REG
#define SUN4I_TVE_ACTIVE_LINE(x)

#define SUN4I_TVE_CHROMA_REG
#define SUN4I_TVE_CHROMA_COMP_GAIN(x)
#define SUN4I_TVE_CHROMA_COMP_GAIN_50

#define SUN4I_TVE_12C_REG
#define SUN4I_TVE_12C_NOTCH_WIDTH_WIDE
#define SUN4I_TVE_12C_COMP_YUV_EN

#define SUN4I_TVE_RESYNC_REG
#define SUN4I_TVE_RESYNC_FIELD
#define SUN4I_TVE_RESYNC_LINE(x)
#define SUN4I_TVE_RESYNC_PIXEL(x)

#define SUN4I_TVE_SLAVE_REG

#define SUN4I_TVE_WSS_DATA2_REG

struct color_gains {};

struct burst_levels {};

struct video_levels {};

struct resync_parameters {};

struct tv_mode {};

struct sun4i_tv {};

static const struct video_levels ntsc_video_levels =;

static const struct video_levels pal_video_levels =;

static const struct burst_levels ntsc_burst_levels =;

static const struct burst_levels pal_burst_levels =;

static const struct color_gains ntsc_color_gains =;

static const struct color_gains pal_color_gains =;

static const struct resync_parameters ntsc_resync_parameters =;

static const struct resync_parameters pal_resync_parameters =;

static const struct tv_mode tv_modes[] =;

static inline struct sun4i_tv *
drm_encoder_to_sun4i_tv(struct drm_encoder *encoder)
{}

static const struct tv_mode *
sun4i_tv_find_tv_by_mode(unsigned int mode)
{}

static void sun4i_tv_disable(struct drm_encoder *encoder,
			    struct drm_atomic_state *state)
{}

static void sun4i_tv_enable(struct drm_encoder *encoder,
			    struct drm_atomic_state *state)
{}

static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs =;

static const struct drm_connector_helper_funcs sun4i_tv_comp_connector_helper_funcs =;

static void sun4i_tv_connector_reset(struct drm_connector *connector)
{}

static const struct drm_connector_funcs sun4i_tv_comp_connector_funcs =;

static const struct regmap_config sun4i_tv_regmap_config =;

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

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

static const struct component_ops sun4i_tv_ops =;

static int sun4i_tv_probe(struct platform_device *pdev)
{}

static void sun4i_tv_remove(struct platform_device *pdev)
{}

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

static struct platform_driver sun4i_tv_platform_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();