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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2012 Avionic Design GmbH
 * Copyright (C) 2012 NVIDIA CORPORATION.  All rights reserved.
 */

#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/hdmi.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>

#include <soc/tegra/common.h>
#include <sound/hdmi-codec.h>

#include <drm/drm_bridge_connector.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_debugfs.h>
#include <drm/drm_edid.h>
#include <drm/drm_eld.h>
#include <drm/drm_file.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>

#include "hda.h"
#include "hdmi.h"
#include "drm.h"
#include "dc.h"
#include "trace.h"

#define HDMI_ELD_BUFFER_SIZE

struct tmds_config {};

struct tegra_hdmi_config {};

struct tegra_hdmi {};

static inline struct tegra_hdmi *
host1x_client_to_hdmi(struct host1x_client *client)
{}

static inline struct tegra_hdmi *to_hdmi(struct tegra_output *output)
{}

#define HDMI_AUDIOCLK_FREQ
#define HDMI_REKEY_DEFAULT

enum {};

static inline u32 tegra_hdmi_readl(struct tegra_hdmi *hdmi,
				   unsigned int offset)
{}

static inline void tegra_hdmi_writel(struct tegra_hdmi *hdmi, u32 value,
				     unsigned int offset)
{}

struct tegra_hdmi_audio_config {};

static const struct tmds_config tegra20_tmds_config[] =;

static const struct tmds_config tegra30_tmds_config[] =;

static const struct tmds_config tegra114_tmds_config[] =;

static const struct tmds_config tegra124_tmds_config[] =;

static void tegra_hdmi_audio_lock(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_audio_unlock(struct tegra_hdmi *hdmi)
{}

static int
tegra_hdmi_get_audio_config(unsigned int audio_freq, unsigned int pix_clock,
			    struct tegra_hdmi_audio_config *config)
{}

static void tegra_hdmi_setup_audio_fs_tables(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_write_aval(struct tegra_hdmi *hdmi, u32 value)
{}

static int tegra_hdmi_setup_audio(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_disable_audio(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_enable_audio(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_write_eld(struct tegra_hdmi *hdmi)
{}

static inline u32 tegra_hdmi_subpack(const u8 *ptr, size_t size)
{}

static void tegra_hdmi_write_infopack(struct tegra_hdmi *hdmi, const void *data,
				      size_t size)
{}

static void tegra_hdmi_setup_avi_infoframe(struct tegra_hdmi *hdmi,
					   struct drm_display_mode *mode)
{}

static void tegra_hdmi_disable_avi_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_enable_avi_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_setup_audio_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_disable_audio_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_enable_audio_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_setup_stereo_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_disable_stereo_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_enable_stereo_infoframe(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_setup_tmds(struct tegra_hdmi *hdmi,
				  const struct tmds_config *tmds)
{}

static int tegra_hdmi_reconfigure_audio(struct tegra_hdmi *hdmi)
{}

static bool tegra_output_is_hdmi(struct tegra_output *output)
{}

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

#define DEBUGFS_REG32(_name)

static const struct debugfs_reg32 tegra_hdmi_regs[] =;

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

static struct drm_info_list debugfs_files[] =;

static int tegra_hdmi_late_register(struct drm_connector *connector)
{}

static void tegra_hdmi_early_unregister(struct drm_connector *connector)
{}

static const struct drm_connector_funcs tegra_hdmi_connector_funcs =;

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

static const struct drm_connector_helper_funcs
tegra_hdmi_connector_helper_funcs =;

static void tegra_hdmi_encoder_disable(struct drm_encoder *encoder)
{}

static void tegra_hdmi_encoder_enable(struct drm_encoder *encoder)
{}

static int
tegra_hdmi_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_hdmi_encoder_helper_funcs =;

static int tegra_hdmi_hw_params(struct device *dev, void *data,
				struct hdmi_codec_daifmt *fmt,
				struct hdmi_codec_params *hparms)
{}

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

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

static const struct hdmi_codec_ops tegra_hdmi_codec_ops =;

static int tegra_hdmi_codec_register(struct tegra_hdmi *hdmi)
{}

static void tegra_hdmi_codec_unregister(struct tegra_hdmi *hdmi)
{}

static int tegra_hdmi_init(struct host1x_client *client)
{}

static int tegra_hdmi_exit(struct host1x_client *client)
{}

static int tegra_hdmi_runtime_suspend(struct host1x_client *client)
{}

static int tegra_hdmi_runtime_resume(struct host1x_client *client)
{}

static const struct host1x_client_ops hdmi_client_ops =;

static const struct tegra_hdmi_config tegra20_hdmi_config =;

static const struct tegra_hdmi_config tegra30_hdmi_config =;

static const struct tegra_hdmi_config tegra114_hdmi_config =;

static const struct tegra_hdmi_config tegra124_hdmi_config =;

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

static irqreturn_t tegra_hdmi_irq(int irq, void *data)
{}

static int tegra_hdmi_probe(struct platform_device *pdev)
{}

static void tegra_hdmi_remove(struct platform_device *pdev)
{}

struct platform_driver tegra_hdmi_driver =;