#include <linux/dmi.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/drm_probe_helper.h>
#include "i915_drv.h"
#include "i915_irq.h"
#include "i915_reg.h"
#include "intel_connector.h"
#include "intel_crt.h"
#include "intel_crtc.h"
#include "intel_ddi.h"
#include "intel_ddi_buf_trans.h"
#include "intel_de.h"
#include "intel_display_driver.h"
#include "intel_display_types.h"
#include "intel_fdi.h"
#include "intel_fdi_regs.h"
#include "intel_fifo_underrun.h"
#include "intel_gmbus.h"
#include "intel_hotplug.h"
#include "intel_hotplug_irq.h"
#include "intel_load_detect.h"
#include "intel_pch_display.h"
#include "intel_pch_refclk.h"
#define ADPA_HOTPLUG_BITS …
struct intel_crt { … };
static struct intel_crt *intel_encoder_to_crt(struct intel_encoder *encoder)
{ … }
static struct intel_crt *intel_attached_crt(struct intel_connector *connector)
{ … }
bool intel_crt_port_enabled(struct drm_i915_private *dev_priv,
i915_reg_t adpa_reg, enum pipe *pipe)
{ … }
static bool intel_crt_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{ … }
static unsigned int intel_crt_get_flags(struct intel_encoder *encoder)
{ … }
static void intel_crt_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{ … }
static void hsw_crt_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{ … }
static void intel_crt_set_dpms(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int mode)
{ … }
static void intel_disable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static void pch_disable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static void pch_post_disable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static void hsw_disable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static void hsw_post_disable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static void hsw_pre_pll_enable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{ … }
static void hsw_pre_enable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{ … }
static void hsw_enable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{ … }
static void intel_enable_crt(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{ … }
static enum drm_mode_status
intel_crt_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static int intel_crt_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{ … }
static int pch_crt_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{ … }
static int hsw_crt_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{ … }
static bool ilk_crt_detect_hotplug(struct drm_connector *connector)
{ … }
static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
{ … }
static bool intel_crt_detect_hotplug(struct drm_connector *connector)
{ … }
static const struct drm_edid *intel_crt_get_edid(struct drm_connector *connector,
struct i2c_adapter *ddc)
{ … }
static int intel_crt_ddc_get_modes(struct drm_connector *connector,
struct i2c_adapter *ddc)
{ … }
static bool intel_crt_detect_ddc(struct drm_connector *connector)
{ … }
static enum drm_connector_status
intel_crt_load_detect(struct intel_crt *crt, enum pipe pipe)
{ … }
static int intel_spurious_crt_detect_dmi_callback(const struct dmi_system_id *id)
{ … }
static const struct dmi_system_id intel_spurious_crt_detect[] = …;
static int
intel_crt_detect(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force)
{ … }
static int intel_crt_get_modes(struct drm_connector *connector)
{ … }
void intel_crt_reset(struct drm_encoder *encoder)
{ … }
static const struct drm_connector_funcs intel_crt_connector_funcs = …;
static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs = …;
static const struct drm_encoder_funcs intel_crt_enc_funcs = …;
void intel_crt_init(struct drm_i915_private *dev_priv)
{ … }