[Intel-gfx] [PATCH 22/24] drm/i915: move HDMI structs to shared location

Jesse Barnes jbarnes at virtuousgeek.org
Tue May 1 02:29:49 CEST 2012


On Thu, 26 Apr 2012 15:21:17 -0300
Eugeni Dodonov <eugeni.dodonov at intel.com> wrote:

> Move intel_hdmi data structure and support functions to a shared location,
> to allow their usage from intel_ddi module.
> 
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_drv.h  |   18 +++++++++++++++++-
>  drivers/gpu/drm/i915/intel_hdmi.c |   19 +++----------------
>  2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 6543720..1beb90e 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -284,6 +284,19 @@ struct dip_infoframe {
>  	} __attribute__ ((packed)) body;
>  } __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 *
>  intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
>  {
> @@ -323,7 +336,10 @@ extern void intel_attach_broadcast_rgb_property(struct drm_connector *connector)
>  
>  extern void intel_crt_init(struct drm_device *dev);
>  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);
> +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,
>  			    bool is_sdvob);
>  extern void intel_dvo_init(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 06ff2d8..ac5b9e0 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -37,20 +37,7 @@
>  #include "i915_drm.h"
>  #include "i915_drv.h"
>  
> -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 struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
> +struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder)
>  {
>  	return container_of(encoder, struct intel_hdmi, base.base);
>  }
> @@ -251,7 +238,7 @@ static void intel_set_infoframe(struct drm_encoder *encoder,
>  	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 dip_infoframe avi_if = {
>  		.type = DIP_TYPE_AVI,
> @@ -262,7 +249,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
>  	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;
>  

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list