#include <linux/delay.h>
#include <drm/drm.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_simple_kms_helper.h>
#include "psb_drv.h"
#include "psb_intel_drv.h"
#include "psb_intel_reg.h"
#define HDMI_READ(reg) …
#define HDMI_WRITE(reg, val) …
#define HDMI_HCR …
#define HCR_ENABLE_HDCP …
#define HCR_ENABLE_AUDIO …
#define HCR_ENABLE_PIXEL …
#define HCR_ENABLE_TMDS …
#define HDMI_HICR …
#define HDMI_HSR …
#define HDMI_HISR …
#define HDMI_DETECT_HDP …
#define HDMI_VIDEO_REG …
#define HDMI_UNIT_EN …
#define HDMI_MODE_OUTPUT …
#define HDMI_HBLANK_A …
#define HDMI_AUDIO_CTRL …
#define HDMI_ENABLE_AUDIO …
#define PCH_HTOTAL_B …
#define PCH_HBLANK_B …
#define PCH_HSYNC_B …
#define PCH_VTOTAL_B …
#define PCH_VBLANK_B …
#define PCH_VSYNC_B …
#define PCH_PIPEBSRC …
#define PCH_PIPEB_DSL …
#define PCH_PIPEB_SLC …
#define PCH_PIPEBCONF …
#define PCH_PIPEBSTAT …
#define CDVO_DFT …
#define CDVO_SLEWRATE …
#define CDVO_STRENGTH …
#define CDVO_RCOMP …
#define DPLL_CTRL …
#define DPLL_PDIV_SHIFT …
#define DPLL_PDIV_MASK …
#define DPLL_PWRDN …
#define DPLL_RESET …
#define DPLL_FASTEN …
#define DPLL_ENSTAT …
#define DPLL_DITHEN …
#define DPLL_DIV_CTRL …
#define DPLL_CLKF_MASK …
#define DPLL_CLKR_MASK …
#define DPLL_CLK_ENABLE …
#define DPLL_EN_DISP …
#define DPLL_SEL_HDMI …
#define DPLL_EN_HDMI …
#define DPLL_EN_VGA …
#define DPLL_ADJUST …
#define DPLL_STATUS …
#define DPLL_UPDATE …
#define DPLL_DFT …
struct intel_range { … };
struct oaktrail_hdmi_limit { … };
struct oaktrail_hdmi_clock { … };
#define VCO_MIN …
#define VCO_MAX …
#define NP_MIN …
#define NP_MAX …
#define NR_MIN …
#define NR_MAX …
#define NF_MIN …
#define NF_MAX …
static const struct oaktrail_hdmi_limit oaktrail_hdmi_limit = …;
static void oaktrail_hdmi_audio_enable(struct drm_device *dev)
{ … }
static void oaktrail_hdmi_audio_disable(struct drm_device *dev)
{ … }
static unsigned int htotal_calculate(struct drm_display_mode *mode)
{ … }
static void oaktrail_hdmi_find_dpll(struct drm_crtc *crtc, int target,
int refclk, struct oaktrail_hdmi_clock *best_clock)
{ … }
static void scu_busy_loop(void __iomem *scu_base)
{ … }
static void oaktrail_hdmi_reset(struct drm_device *dev)
{ … }
int oaktrail_crtc_hdmi_mode_set(struct drm_crtc *crtc,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode,
int x, int y,
struct drm_framebuffer *old_fb)
{ … }
void oaktrail_crtc_hdmi_dpms(struct drm_crtc *crtc, int mode)
{ … }
static void oaktrail_hdmi_dpms(struct drm_encoder *encoder, int mode)
{ … }
static enum drm_mode_status oaktrail_hdmi_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static enum drm_connector_status
oaktrail_hdmi_detect(struct drm_connector *connector, bool force)
{ … }
static const unsigned char raw_edid[] = …;
static int oaktrail_hdmi_get_modes(struct drm_connector *connector)
{ … }
static void oaktrail_hdmi_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{ … }
static void oaktrail_hdmi_destroy(struct drm_connector *connector)
{ … }
static const struct drm_encoder_helper_funcs oaktrail_hdmi_helper_funcs = …;
static const struct drm_connector_helper_funcs
oaktrail_hdmi_connector_helper_funcs = …;
static const struct drm_connector_funcs oaktrail_hdmi_connector_funcs = …;
void oaktrail_hdmi_init(struct drm_device *dev,
struct psb_intel_mode_device *mode_dev)
{ … }
void oaktrail_hdmi_setup(struct drm_device *dev)
{ … }
void oaktrail_hdmi_teardown(struct drm_device *dev)
{ … }
void oaktrail_hdmi_save(struct drm_device *dev)
{ … }
void oaktrail_hdmi_restore(struct drm_device *dev)
{ … }