linux/drivers/gpu/drm/rockchip/cdn-dp-core.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
 * Author: Chris Zhong <[email protected]>
 */

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/extcon.h>
#include <linux/firmware.h>
#include <linux/mfd/syscon.h>
#include <linux/phy/phy.h>
#include <linux/regmap.h>
#include <linux/reset.h>

#include <sound/hdmi-codec.h>

#include <drm/display/drm_dp_helper.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_of.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>

#include "cdn-dp-core.h"
#include "cdn-dp-reg.h"

static inline struct cdn_dp_device *connector_to_dp(struct drm_connector *connector)
{}

static inline struct cdn_dp_device *encoder_to_dp(struct drm_encoder *encoder)
{}

#define GRF_SOC_CON9
#define DP_SEL_VOP_LIT
#define GRF_SOC_CON26
#define DPTX_HPD_SEL
#define DPTX_HPD_DEL
#define DPTX_HPD_SEL_MASK

#define CDN_FW_TIMEOUT_MS
#define CDN_DPCD_TIMEOUT_MS
#define CDN_DP_FIRMWARE
MODULE_FIRMWARE();

struct cdn_dp_data {};

static struct cdn_dp_data rk3399_cdn_dp =;

static const struct of_device_id cdn_dp_dt_ids[] =;

MODULE_DEVICE_TABLE(of, cdn_dp_dt_ids);

static int cdn_dp_grf_write(struct cdn_dp_device *dp,
			    unsigned int reg, unsigned int val)
{}

static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
{}

static void cdn_dp_clk_disable(struct cdn_dp_device *dp)
{}

static int cdn_dp_get_port_lanes(struct cdn_dp_port *port)
{}

static int cdn_dp_get_sink_count(struct cdn_dp_device *dp, u8 *sink_count)
{}

static struct cdn_dp_port *cdn_dp_connected_port(struct cdn_dp_device *dp)
{}

static bool cdn_dp_check_sink_connection(struct cdn_dp_device *dp)
{}

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

static void cdn_dp_connector_destroy(struct drm_connector *connector)
{}

static const struct drm_connector_funcs cdn_dp_atomic_connector_funcs =;

static int cdn_dp_connector_get_modes(struct drm_connector *connector)
{}

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

static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs =;

static int cdn_dp_firmware_init(struct cdn_dp_device *dp)
{}

static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
{}

static int cdn_dp_enable_phy(struct cdn_dp_device *dp, struct cdn_dp_port *port)
{}

static int cdn_dp_disable_phy(struct cdn_dp_device *dp,
			      struct cdn_dp_port *port)
{}

static int cdn_dp_disable(struct cdn_dp_device *dp)
{}

static int cdn_dp_enable(struct cdn_dp_device *dp)
{}

static void cdn_dp_encoder_mode_set(struct drm_encoder *encoder,
				    struct drm_display_mode *mode,
				    struct drm_display_mode *adjusted)
{}

static bool cdn_dp_check_link_status(struct cdn_dp_device *dp)
{}

static void cdn_dp_audio_handle_plugged_change(struct cdn_dp_device *dp,
					       bool plugged)
{}

static void cdn_dp_encoder_enable(struct drm_encoder *encoder)
{}

static void cdn_dp_encoder_disable(struct drm_encoder *encoder)
{}

static int cdn_dp_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 cdn_dp_encoder_helper_funcs =;

static int cdn_dp_parse_dt(struct cdn_dp_device *dp)
{}

static int cdn_dp_audio_hw_params(struct device *dev,  void *data,
				  struct hdmi_codec_daifmt *daifmt,
				  struct hdmi_codec_params *params)
{}

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

static int cdn_dp_audio_mute_stream(struct device *dev, void *data,
				    bool enable, int direction)
{}

static int cdn_dp_audio_get_eld(struct device *dev, void *data,
				u8 *buf, size_t len)
{}

static int cdn_dp_audio_hook_plugged_cb(struct device *dev, void *data,
					hdmi_codec_plugged_cb fn,
					struct device *codec_dev)
{}

static const struct hdmi_codec_ops audio_codec_ops =;

static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,
				   struct device *dev)
{}

static int cdn_dp_request_firmware(struct cdn_dp_device *dp)
{}

static void cdn_dp_pd_event_work(struct work_struct *work)
{}

static int cdn_dp_pd_event(struct notifier_block *nb,
			   unsigned long event, void *priv)
{}

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

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

static const struct component_ops cdn_dp_component_ops =;

static int cdn_dp_suspend(struct device *dev)
{}

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

static int cdn_dp_probe(struct platform_device *pdev)
{}

static void cdn_dp_remove(struct platform_device *pdev)
{}

static void cdn_dp_shutdown(struct platform_device *pdev)
{}

static const struct dev_pm_ops cdn_dp_pm_ops =;

struct platform_driver cdn_dp_driver =;