linux/drivers/gpu/drm/sti/sti_dvo.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) STMicroelectronics SA 2014
 * Author: Vincent Abriou <[email protected]> for STMicroelectronics.
 */

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/debugfs.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_device.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>

#include "sti_awg_utils.h"
#include "sti_drv.h"
#include "sti_mixer.h"

/* DVO registers */
#define DVO_AWG_DIGSYNC_CTRL
#define DVO_DOF_CFG
#define DVO_LUT_PROG_LOW
#define DVO_LUT_PROG_MID
#define DVO_LUT_PROG_HIGH
#define DVO_DIGSYNC_INSTR_I

#define DVO_AWG_CTRL_EN
#define DVO_AWG_FRAME_BASED_SYNC

#define DVO_DOF_EN_LOWBYTE
#define DVO_DOF_EN_MIDBYTE
#define DVO_DOF_EN_HIGHBYTE
#define DVO_DOF_EN
#define DVO_DOF_MOD_COUNT_SHIFT

#define DVO_LUT_ZERO
#define DVO_LUT_Y_G
#define DVO_LUT_Y_G_DEL
#define DVO_LUT_CB_B
#define DVO_LUT_CB_B_DEL
#define DVO_LUT_CR_R
#define DVO_LUT_CR_R_DEL
#define DVO_LUT_HOLD

struct dvo_config {};

static struct dvo_config rgb_24bit_de_cfg =;

/*
 * STI digital video output structure
 *
 * @dev: driver device
 * @drm_dev: pointer to drm device
 * @mode: current display mode selected
 * @regs: dvo registers
 * @clk_pix: pixel clock for dvo
 * @clk: clock for dvo
 * @clk_main_parent: dvo parent clock if main path used
 * @clk_aux_parent: dvo parent clock if aux path used
 * @panel_node: panel node reference from device tree
 * @panel: reference to the panel connected to the dvo
 * @enabled: true if dvo is enabled else false
 * @encoder: drm_encoder it is bound
 */
struct sti_dvo {};

struct sti_dvo_connector {};

#define to_sti_dvo_connector(x)

#define BLANKING_LEVEL
static int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
{}

/* Configure AWG, writing instructions
 *
 * @dvo: pointer to DVO structure
 * @awg_ram_code: pointer to AWG instructions table
 * @nb: nb of AWG instructions
 */
static void dvo_awg_configure(struct sti_dvo *dvo, u32 *awg_ram_code, int nb)
{}

#define DBGFS_DUMP(reg)

static void dvo_dbg_awg_microcode(struct seq_file *s, void __iomem *reg)
{}

static int dvo_dbg_show(struct seq_file *s, void *data)
{}

static struct drm_info_list dvo_debugfs_files[] =;

static void dvo_debugfs_init(struct sti_dvo *dvo, struct drm_minor *minor)
{}

static void sti_dvo_disable(struct drm_bridge *bridge)
{}

static void sti_dvo_pre_enable(struct drm_bridge *bridge)
{}

static void sti_dvo_set_mode(struct drm_bridge *bridge,
			     const struct drm_display_mode *mode,
			     const struct drm_display_mode *adjusted_mode)
{}

static void sti_dvo_bridge_nope(struct drm_bridge *bridge)
{}

static const struct drm_bridge_funcs sti_dvo_bridge_funcs =;

static int sti_dvo_connector_get_modes(struct drm_connector *connector)
{}

#define CLK_TOLERANCE_HZ

static enum drm_mode_status
sti_dvo_connector_mode_valid(struct drm_connector *connector,
			     struct drm_display_mode *mode)
{}

static const
struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs =;

static enum drm_connector_status
sti_dvo_connector_detect(struct drm_connector *connector, bool force)
{}

static int sti_dvo_late_register(struct drm_connector *connector)
{}

static const struct drm_connector_funcs sti_dvo_connector_funcs =;

static struct drm_encoder *sti_dvo_find_encoder(struct drm_device *dev)
{}

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

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

static const struct component_ops sti_dvo_ops =;

static int sti_dvo_probe(struct platform_device *pdev)
{}

static void sti_dvo_remove(struct platform_device *pdev)
{}

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

struct platform_driver sti_dvo_driver =;

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