[Intel-gfx] [PATCH] drm/i915: crt fetch EDID by DVI-I converter sync up with 2D driver

Ma, Ling ling.ma at intel.com
Mon Jun 8 14:15:23 CEST 2009


Hi Eric
I can not find specified port definition ((GPIOA/D/E))  which is assigned to CRT from VBT.
And we have one platform -DG45ID connected VGA by DVI-I, EDID only could be fetched by GPIOD, instead of GPIOA,

>Also, please figure out what's going on with your mailer or commit
>message editing that's resulting in unusual spaces getting inserted, so
>I don't have to edit them all for you.  (just to show that it's not me,
>check out the commit message in the message source on
>http://lists.freedesktop.org/archives/intel-gfx/2009-May/002504.html)

Maybe the problem is from mail server, I will send patches by linux.intel.com mail server

Thanks
Ma Ling

>-----Original Message-----
>From: Eric Anholt [mailto:eric at anholt.net] 
>Sent: Friday, June 05, 2009 9:05 PM
>To: Ma, Ling
>Cc: intel-gfx at lists.freedesktop.org
>Subject: Re: [Intel-gfx] [PATCH] drm/i915: crt fetch EDID by 
>DVI-I converter sync up with 2D driver
>
>On Fri, 2009-05-22 at 17:50 +0800, Ma Ling wrote:
>> Usually crt mainly get modes via GPIOA ports.
>> However we need to probe all possible ports for
>> DVI-I, which could be wired to GPIOD or GPIOE,
>> and fetch our desired EDID, i.e on DG45ID platform 
>> we successfully fetch EDID by GPIOD port.
>> 
>> Signed-off-by: Ma Ling <ling.ma at intel.com>
>
>Doing setup and teardown of I2C buses for each detect seems crazy.
>Also, this behavior should probably be limited to affected chipsets --
>presumably this doesn't apply to non-HDMI ones?  And I bet we 
>could pull
>info out of the BIOS on what the correct GPIO to use is.

>
>Also, please figure out what's going on with your mailer or commit
>message editing that's resulting in unusual spaces getting inserted, so
>I don't have to edit them all for you.  (just to show that it's not me,
>check out the commit message in the message source on
>http://lists.freedesktop.org/archives/intel-gfx/2009-May/002504.html)
>
>> ---
>>  drivers/gpu/drm/i915/intel_crt.c |   42 
>+++++++++++++++++++++++++++++++++++++-
>>  1 files changed, 41 insertions(+), 1 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_crt.c 
>b/drivers/gpu/drm/i915/intel_crt.c
>> index 19148c3..91e57a7 100644
>> --- a/drivers/gpu/drm/i915/intel_crt.c
>> +++ b/drivers/gpu/drm/i915/intel_crt.c
>> @@ -228,8 +228,48 @@ 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;
>> +
>> +	ddcbus = intel_output->ddc_bus;
>> +
>> +	ret = intel_ddc_get_modes(intel_output);
>> +	if (ret)
>> +		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);
>> +
>> +	if (ret)
>> +		goto end;
>> +
>> +	intel_output->ddc_bus =
>> +		intel_i2c_create(connector->dev, GPIOE, "CRTDDC_E");
>> +
>> +	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 GPIOE port */
>> +	ret = intel_ddc_get_modes(intel_output);
>> +	intel_i2c_destroy(intel_output->ddc_bus);
>> +
>> +end:
>> +	intel_output->ddc_bus = ddcbus;
>> +	return ret;
>> +
>>  }
>>  
>>  static int intel_crt_set_property(struct drm_connector *connector,
>-- 
>Eric Anholt
>eric at anholt.net                         eric.anholt at intel.com
>
>
>


More information about the Intel-gfx mailing list