[Intel-gfx] [Resend][PATCH 1/4] drm/i915: crt fetch EDID by DVI-I converter on G4x platform

Zhenyu Wang zhenyuw at linux.intel.com
Thu Jul 9 07:38:21 CEST 2009


On 2009.07.03 23:28:58 +0800, ling.ma at intel.com wrote:
> Usually crt mainly get modes via GPIOA ports.
> However on 4X series platform VGA and HDMI
> share the DDC port--GPIOD, so we need to probe
> possible ports for VGA connected by DVI-I. Then
> fetch our desired EDID.
> 
> It fixed freedesktop.org bug #21084 
> 
> Signed-off-by: Ma Ling <ling.ma at intel.com>
> Reviewed-by: Ian Romanick <idr at freedesktop.org>
> ---
> do clean up operation , change ddcbus type from 
> struct intel_i2c_chan to struct i2c_adapter.

Eric, looks you picked up an older version of this on drm-intel-next,
which generates incompatible pointer warning. Looks real fix is this one.

> 
>  drivers/gpu/drm/i915/intel_crt.c |   28 +++++++++++++++++++++++++++-
>  1 files changed, 27 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index 6de97fc..ce142f1 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -428,8 +428,34 @@ static void intel_crt_destroy(struct drm_connector *connector)
>  
>  static int intel_crt_get_modes(struct drm_connector *connector)
>  {
> +	int ret;
>  	struct intel_output *intel_output = to_intel_output(connector);
> -	return intel_ddc_get_modes(intel_output);
> +	struct i2c_adapter *ddcbus;
> +	struct drm_device *dev = connector->dev;
> +
> +
> +	ret = intel_ddc_get_modes(intel_output);
> +	if (ret || !IS_G4X(dev))
> +		goto end;
> +
> +	ddcbus = intel_output->ddc_bus;
> +	/* Try to probe digital port for output in DVI-I -> VGA mode. */
> +	intel_output->ddc_bus =
> +		intel_i2c_create(connector->dev, GPIOD, "CRTDDC_D");
> +
> +	if (!intel_output->ddc_bus) {
> +		intel_output->ddc_bus = ddcbus;
> +		dev_printk(KERN_ERR, &connector->dev->pdev->dev,
> +			   "DDC bus registration failed for CRTDDC_D.\n");
> +		goto end;
> +	}
> +	/* Try to get modes by GPIOD port */
> +	ret = intel_ddc_get_modes(intel_output);
> +	intel_i2c_destroy(ddcbus);
> +
> +end:
> +	return ret;
> +
>  }
>  
>  static int intel_crt_set_property(struct drm_connector *connector,
> -- 
> 1.5.4.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090709/734279c7/attachment.sig>


More information about the Intel-gfx mailing list