linux/drivers/gpu/drm/tegra/dsi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2013 NVIDIA Corporation
 */

#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/host1x.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>

#include <video/mipi_display.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_debugfs.h>
#include <drm/drm_file.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_panel.h>
#include <drm/drm_simple_kms_helper.h>

#include "dc.h"
#include "drm.h"
#include "dsi.h"
#include "mipi-phy.h"
#include "trace.h"

struct tegra_dsi_state {};

static inline struct tegra_dsi_state *
to_dsi_state(struct drm_connector_state *state)
{}

struct tegra_dsi {};

static inline struct tegra_dsi *
host1x_client_to_dsi(struct host1x_client *client)
{}

static inline struct tegra_dsi *host_to_tegra(struct mipi_dsi_host *host)
{}

static inline struct tegra_dsi *to_dsi(struct tegra_output *output)
{}

static struct tegra_dsi_state *tegra_dsi_get_state(struct tegra_dsi *dsi)
{}

static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned int offset)
{}

static inline void tegra_dsi_writel(struct tegra_dsi *dsi, u32 value,
				    unsigned int offset)
{}

#define DEBUGFS_REG32(_name)

static const struct debugfs_reg32 tegra_dsi_regs[] =;

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

static struct drm_info_list debugfs_files[] =;

static int tegra_dsi_late_register(struct drm_connector *connector)
{}

static void tegra_dsi_early_unregister(struct drm_connector *connector)
{}

#define PKT_ID0(id)
#define PKT_LEN0(len)
#define PKT_ID1(id)
#define PKT_LEN1(len)
#define PKT_ID2(id)
#define PKT_LEN2(len)

#define PKT_LP
#define NUM_PKT_SEQ

/*
 * non-burst mode with sync pulses
 */
static const u32 pkt_seq_video_non_burst_sync_pulses[NUM_PKT_SEQ] =;

/*
 * non-burst mode with sync events
 */
static const u32 pkt_seq_video_non_burst_sync_events[NUM_PKT_SEQ] =;

static const u32 pkt_seq_command_mode[NUM_PKT_SEQ] =;

static void tegra_dsi_set_phy_timing(struct tegra_dsi *dsi,
				     unsigned long period,
				     const struct mipi_dphy_timing *timing)
{}

static int tegra_dsi_get_muldiv(enum mipi_dsi_pixel_format format,
				unsigned int *mulp, unsigned int *divp)
{}

static int tegra_dsi_get_format(enum mipi_dsi_pixel_format format,
				enum tegra_dsi_format *fmt)
{}

static void tegra_dsi_ganged_enable(struct tegra_dsi *dsi, unsigned int start,
				    unsigned int size)
{}

static void tegra_dsi_enable(struct tegra_dsi *dsi)
{}

static unsigned int tegra_dsi_get_lanes(struct tegra_dsi *dsi)
{}

static void tegra_dsi_configure(struct tegra_dsi *dsi, unsigned int pipe,
				const struct drm_display_mode *mode)
{}

static int tegra_dsi_wait_idle(struct tegra_dsi *dsi, unsigned long timeout)
{}

static void tegra_dsi_video_disable(struct tegra_dsi *dsi)
{}

static void tegra_dsi_ganged_disable(struct tegra_dsi *dsi)
{}

static int tegra_dsi_pad_enable(struct tegra_dsi *dsi)
{}

static int tegra_dsi_pad_calibrate(struct tegra_dsi *dsi)
{}

static void tegra_dsi_set_timeout(struct tegra_dsi *dsi, unsigned long bclk,
				  unsigned int vrefresh)
{}

static void tegra_dsi_disable(struct tegra_dsi *dsi)
{}

static void tegra_dsi_soft_reset(struct tegra_dsi *dsi)
{}

static void tegra_dsi_connector_reset(struct drm_connector *connector)
{}

static struct drm_connector_state *
tegra_dsi_connector_duplicate_state(struct drm_connector *connector)
{}

static const struct drm_connector_funcs tegra_dsi_connector_funcs =;

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

static const struct drm_connector_helper_funcs tegra_dsi_connector_helper_funcs =;

static void tegra_dsi_unprepare(struct tegra_dsi *dsi)
{}

static void tegra_dsi_encoder_disable(struct drm_encoder *encoder)
{}

static int tegra_dsi_prepare(struct tegra_dsi *dsi)
{}

static void tegra_dsi_encoder_enable(struct drm_encoder *encoder)
{}

static int
tegra_dsi_encoder_atomic_check(struct drm_encoder *encoder,
			       struct drm_crtc_state *crtc_state,
			       struct drm_connector_state *conn_state)
{}

static const struct drm_encoder_helper_funcs tegra_dsi_encoder_helper_funcs =;

static int tegra_dsi_init(struct host1x_client *client)
{}

static int tegra_dsi_exit(struct host1x_client *client)
{}

static int tegra_dsi_runtime_suspend(struct host1x_client *client)
{}

static int tegra_dsi_runtime_resume(struct host1x_client *client)
{}

static const struct host1x_client_ops dsi_client_ops =;

static int tegra_dsi_setup_clocks(struct tegra_dsi *dsi)
{}

static const char * const error_report[16] =;

static ssize_t tegra_dsi_read_response(struct tegra_dsi *dsi,
				       const struct mipi_dsi_msg *msg,
				       size_t count)
{}

static int tegra_dsi_transmit(struct tegra_dsi *dsi, unsigned long timeout)
{}

static int tegra_dsi_wait_for_response(struct tegra_dsi *dsi,
				       unsigned long timeout)
{}

static void tegra_dsi_writesl(struct tegra_dsi *dsi, unsigned long offset,
			      const void *buffer, size_t size)
{}

static ssize_t tegra_dsi_host_transfer(struct mipi_dsi_host *host,
				       const struct mipi_dsi_msg *msg)
{}

static int tegra_dsi_ganged_setup(struct tegra_dsi *dsi)
{}

static int tegra_dsi_host_attach(struct mipi_dsi_host *host,
				 struct mipi_dsi_device *device)
{}

static int tegra_dsi_host_detach(struct mipi_dsi_host *host,
				 struct mipi_dsi_device *device)
{}

static const struct mipi_dsi_host_ops tegra_dsi_host_ops =;

static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
{}

static int tegra_dsi_probe(struct platform_device *pdev)
{}

static void tegra_dsi_remove(struct platform_device *pdev)
{}

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

struct platform_driver tegra_dsi_driver =;