Re: [Intel-gfx] [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 18, 2011 at 6:02 AM, Dave Airlie <airlied@xxxxxxxxx> wrote:
>> This allows to avoid talking to a non-existent bus repeatedly until we
>> finally timeout. The non-existent bus is signalled by -ENXIO error,
>> provided by i2c_algo_bit:bit_doAddress call.
>>
>> As the advantage of such change, all the other routines which use
>> drm_get_edid would benefit for this timeout.
>>
>> This change should fix
>> https://bugs.freedesktop.org/show_bug.cgi?id=41059 and improve overall
>> edid detection timing by 10-30% in most cases, and by a much larger margin
>> in case of phantom outputs.
>
> Jean, Alex,
>
> I'm thinking of thowing this into -next, any objections?
>

I haven't really hit the issue this patch attempts to fix on any
cards, but on radeon at least, we know which i2c buses are used for
ddc and which are not, so barring the occasional oem vbios bug, we
won't be trying ddc on arbitrary i2c buses.

Alex

> Dave.
>
>>
>> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@xxxxxxxxx>
>> ---
>>  drivers/gpu/drm/drm_edid.c |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>> index 7425e5c..1bca6d7 100644
>> --- a/drivers/gpu/drm/drm_edid.c
>> +++ b/drivers/gpu/drm/drm_edid.c
>> @@ -265,6 +265,11 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
>>                        }
>>                };
>>                ret = i2c_transfer(adapter, msgs, 2);
>> +               if (ret == -ENXIO) {
>> +                       DRM_DEBUG_KMS("drm: skipping non-existent adapter %s\n",
>> +                                       adapter->name);
>> +                       break;
>> +               }
>>        } while (ret != 2 && --retries);
>>
>>        return ret == 2 ? 0 : -1;
>> --
>> 1.7.7
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux