提交 f5bbfca3 编写于 作者: E Eugeni Dodonov 提交者: Daniel Vetter

drm/i915: move HDMI structs to shared location

Move intel_hdmi data structure and support functions to a shared location,
to allow their usage from intel_ddi module.
Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 12a13a33
...@@ -290,6 +290,19 @@ struct dip_infoframe { ...@@ -290,6 +290,19 @@ struct dip_infoframe {
} __attribute__ ((packed)) body; } __attribute__ ((packed)) body;
} __attribute__((packed)); } __attribute__((packed));
struct intel_hdmi {
struct intel_encoder base;
u32 sdvox_reg;
int ddc_bus;
int ddi_port;
uint32_t color_range;
bool has_hdmi_sink;
bool has_audio;
enum hdmi_force_audio force_audio;
void (*write_infoframe)(struct drm_encoder *encoder,
struct dip_infoframe *frame);
};
static inline struct drm_crtc * static inline struct drm_crtc *
intel_get_crtc_for_pipe(struct drm_device *dev, int pipe) intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
{ {
...@@ -329,7 +342,11 @@ extern void intel_attach_broadcast_rgb_property(struct drm_connector *connector) ...@@ -329,7 +342,11 @@ extern void intel_attach_broadcast_rgb_property(struct drm_connector *connector)
extern void intel_crt_init(struct drm_device *dev); extern void intel_crt_init(struct drm_device *dev);
extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg); extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg);
void intel_dip_infoframe_csum(struct dip_infoframe *avi_if); extern struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder);
extern void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode);
extern void intel_hdmi_set_spd_infoframe(struct drm_encoder *encoder);
extern void intel_dip_infoframe_csum(struct dip_infoframe *avi_if);
extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg,
bool is_sdvob); bool is_sdvob);
extern void intel_dvo_init(struct drm_device *dev); extern void intel_dvo_init(struct drm_device *dev);
......
...@@ -37,20 +37,7 @@ ...@@ -37,20 +37,7 @@
#include "i915_drm.h" #include "i915_drm.h"
#include "i915_drv.h" #include "i915_drv.h"
struct intel_hdmi { struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
struct intel_encoder base;
u32 sdvox_reg;
int ddc_bus;
int ddi_port;
uint32_t color_range;
bool has_hdmi_sink;
bool has_audio;
enum hdmi_force_audio force_audio;
void (*write_infoframe)(struct drm_encoder *encoder,
struct dip_infoframe *frame);
};
static struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
{ {
return container_of(encoder, struct intel_hdmi, base.base); return container_of(encoder, struct intel_hdmi, base.base);
} }
...@@ -302,7 +289,7 @@ static void intel_set_infoframe(struct drm_encoder *encoder, ...@@ -302,7 +289,7 @@ static void intel_set_infoframe(struct drm_encoder *encoder,
intel_hdmi->write_infoframe(encoder, frame); intel_hdmi->write_infoframe(encoder, frame);
} }
static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder, void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
struct drm_display_mode *adjusted_mode) struct drm_display_mode *adjusted_mode)
{ {
struct dip_infoframe avi_if = { struct dip_infoframe avi_if = {
...@@ -317,7 +304,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder, ...@@ -317,7 +304,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
intel_set_infoframe(encoder, &avi_if); intel_set_infoframe(encoder, &avi_if);
} }
static void intel_hdmi_set_spd_infoframe(struct drm_encoder *encoder) void intel_hdmi_set_spd_infoframe(struct drm_encoder *encoder)
{ {
struct dip_infoframe spd_if; struct dip_infoframe spd_if;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册