[Intel-gfx] [PATCH] Give up on edid retries when i2c bus is not responding

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 26 19:18:04 CEST 2011


On Wed, 26 Oct 2011 15:06:24 -0200, Eugeni Dodonov <eugeni.dodonov at intel.com> wrote:
> This allows to avoid talking to a non-responding bus repeatedly until we
> finally timeout after 15 attempts. We can do this by catching the -ENXIO
> error, provided by i2c_algo_bit:bit_doAddress call.
> 
> Within the bit_doAddress we already try 3 times to get the edid data, so
> if the routine tells us that bus is not responding, it is mostly pointless
> to keep re-trying those attempts over and over again until we reach final
> number of retries.
> 
> 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.
> 
> Timing results for i915-powered machines for 'time xrandr' command:
> Machine 1: from 0.840s to 0.290s
> Machine 2: from 0.315s to 0.280s
> Machine 3: from +/- 1s to 0.184s
> 
> Timing results for HD5770 with 'time xrandr' command:
> Machine 4: from 3.210s to 1.060s
> 
> v2: added a module parameter to control this behavior. The idea came from
> discussion with Jean Delvare.
> 
Just one minor nitpick here... Otherwise it looks a very tasty patch.

> +unsigned int drm_ignore_unresponsive_edid = 1;  /* Ignore non-responding edid by default */
> +EXPORT_SYMBOL(drm_ignore_unresponsive_edid);

This comment would be better in the user-facing description, i.e. (default:
true). Do we have a candidate user for exporting the symbol?

> +
>  MODULE_AUTHOR(CORE_AUTHOR);
>  MODULE_DESCRIPTION(CORE_DESC);
>  MODULE_LICENSE("GPL and additional rights");
>  MODULE_PARM_DESC(debug, "Enable debug output");
>  MODULE_PARM_DESC(vblankoffdelay, "Delay until vblank irq auto-disable [msecs]");
>  MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on timestamps [usecs]");
> +MODULE_PARM_DESC(ignore_unresponsive_edid, "Automatically ignore outputs which do not provide EDID after 3 attempts");

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list