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

Ma, Ling ling.ma at intel.com
Tue Jun 30 05:19:48 CEST 2009



>-----Original Message-----
>From: Ian Romanick [mailto:idr at freedesktop.org]
>Sent: 2009年6月30日 0:14
>To: Ma, Ling
>Cc: intel-gfx at lists.freedesktop.org
>Subject: Re: [Intel-gfx] [Resend][PATCH 1/4] drm/i915: crt fetch EDID by DVI-I
>converter on G4x platform
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>ling.ma at intel.com wrote:
>> Usually crt mainly get modes via GPIOA ports.
>> However on G4X platform we need to probe possible
>> ports for DVI-I, which could be wired to GPIOD,
>> then fetch our desired EDID, i.e on DG45ID platform
>> we successfully fetch EDID by GPIOD port.
>>
>> It fixed freedesktop.org bug #21084
>>
>> Signed-off-by: Ma Ling <ling.ma at intel.com>
>> ---
>>  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..54d098c 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 intel_i2c_chan *ddcbus;
>> +	struct drm_device *dev = connector->dev;
>> +
>> +	ddcbus = intel_output->ddc_bus;
>> +
>> +	ret = intel_ddc_get_modes(intel_output);
>> +	if (ret || !IS_G4X(dev))
>> +		goto end;
>> +
>> +	/* 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) {
>> +		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(intel_output->ddc_bus);
>
>Why is the DDC bus that's actually used being destroyed?  Why isn't the
>A bus destroyed instead?  I'm not saying that I think this is wrong,
>it's just not obvious why it's correct.
>
Thanks fixed.
>> +
>> +end:
>> +	intel_output->ddc_bus = ddcbus;
>> +	return ret;
>> +
>>  }
>>
>>  static int intel_crt_set_property(struct drm_connector *connector,
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.9 (GNU/Linux)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iEYEARECAAYFAkpI6EgACgkQX1gOwKyEAw/G1QCePq+IyOkqVmKnlh+tKu6keiMZ
>1UEAnjIpg/c3tdbdBj8WkStbTO0i5keP
>=xQEY
>-----END PGP SIGNATURE-----


More information about the Intel-gfx mailing list