[Intel-gfx] [PATCH 20/24] drm/i915: add support for DDI-controlled digital outputs

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


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

> Those are driven by DDIs on Haswell architecture, so we need to keep track
> of which DDI is being used on each output.
> 
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index d73a16c..06ff2d8 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -41,6 +41,7 @@ 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;
> @@ -606,6 +607,24 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
>  		intel_encoder->clone_mask = (1 << INTEL_HDMIF_CLONE_BIT);
>  		intel_hdmi->ddc_bus = GMBUS_PORT_DPD;
>  		dev_priv->hotplug_supported_mask |= HDMID_HOTPLUG_INT_STATUS;
> +	} else if (sdvox_reg == DDI_BUF_CTL(PORT_B)) {
> +		DRM_DEBUG_DRIVER("LPT: detected output on DDI B\n");
> +		intel_encoder->clone_mask = (1 << INTEL_HDMIB_CLONE_BIT);
> +		intel_hdmi->ddc_bus = GMBUS_PORT_DPB;
> +		intel_hdmi->ddi_port = PORT_B;
> +		dev_priv->hotplug_supported_mask |= HDMIB_HOTPLUG_INT_STATUS;
> +	} else if (sdvox_reg == DDI_BUF_CTL(PORT_C)) {
> +		DRM_DEBUG_DRIVER("LPT: detected output on DDI C\n");
> +		intel_encoder->clone_mask = (1 << INTEL_HDMIC_CLONE_BIT);
> +		intel_hdmi->ddc_bus = GMBUS_PORT_DPC;
> +		intel_hdmi->ddi_port = PORT_C;
> +		dev_priv->hotplug_supported_mask |= HDMIC_HOTPLUG_INT_STATUS;
> +	} else if (sdvox_reg == DDI_BUF_CTL(PORT_D)) {
> +		DRM_DEBUG_DRIVER("LPT: detected output on DDI D\n");
> +		intel_encoder->clone_mask = (1 << INTEL_HDMID_CLONE_BIT);
> +		intel_hdmi->ddc_bus = GMBUS_PORT_DPD;
> +		intel_hdmi->ddi_port = PORT_D;
> +		dev_priv->hotplug_supported_mask |= HDMID_HOTPLUG_INT_STATUS;
>  	} else {
>  		DRM_ERROR("Unknown sdvox register on HDMI init: %x\n", sdvox_reg);
>  	}

I think this'll work unless we want to split out the accessor functions
some more.

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

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list