* [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding
@ 2012-01-05 11:34 Eugeni Dodonov
2012-01-05 11:34 ` [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake Eugeni Dodonov
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Eugeni Dodonov @ 2012-01-05 11:34 UTC (permalink / raw)
To: intel-gfx; +Cc: Eugeni Dodonov
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 (up to 30x in one worst
case).
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 +/- 4s to 0.184s
Timing results for HD5770 with 'time xrandr' command:
Machine 4: from 3.210s to 1.060s
Reviewed-by: Chris Wilson <chris@hchris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Sean Finney <seanius@seanius.net>
Tested-by: Soren Hansen <soren@linux2go.dk>
Tested-by: Hernando Torque <sirius@sonnenkinder.org>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41059
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
---
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 3e927ce..fb6c26c 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -266,6 +266,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.8
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake
2012-01-05 11:34 [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Eugeni Dodonov
@ 2012-01-05 11:34 ` Eugeni Dodonov
2012-01-16 20:30 ` Daniel Vetter
2012-01-05 14:43 ` [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Daniel Vetter
2012-01-16 20:33 ` [Intel-gfx] " Daniel Vetter
2 siblings, 1 reply; 7+ messages in thread
From: Eugeni Dodonov @ 2012-01-05 11:34 UTC (permalink / raw)
To: intel-gfx; +Cc: Eugeni Dodonov
After checking the specs and discussing with Jesse, turns out CxSR is not
available on Ironlake and gen5, and its advertisement on the device
description is misleading.
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
---
drivers/gpu/drm/i915/i915_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a1103fc..4795edd 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -198,7 +198,7 @@ static const struct intel_device_info intel_pineview_info = {
static const struct intel_device_info intel_ironlake_d_info = {
.gen = 5,
- .need_gfx_hws = 1, .has_pipe_cxsr = 1, .has_hotplug = 1,
+ .need_gfx_hws = 1, .has_hotplug = 1,
.has_bsd_ring = 1,
};
--
1.7.8
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake
2012-01-05 11:34 ` [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake Eugeni Dodonov
@ 2012-01-16 20:30 ` Daniel Vetter
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2012-01-16 20:30 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: intel-gfx
On Thu, Jan 05, 2012 at 09:34:29AM -0200, Eugeni Dodonov wrote:
> After checking the specs and discussing with Jesse, turns out CxSR is not
> available on Ironlake and gen5, and its advertisement on the device
> description is misleading.
>
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding
2012-01-05 11:34 [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Eugeni Dodonov
2012-01-05 11:34 ` [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake Eugeni Dodonov
@ 2012-01-05 14:43 ` Daniel Vetter
2012-01-05 15:37 ` Eugeni Dodonov
2012-01-16 20:33 ` [Intel-gfx] " Daniel Vetter
2 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2012-01-05 14:43 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: intel-gfx
On Thu, Jan 05, 2012 at 09:34:28AM -0200, Eugeni Dodonov 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 (up to 30x in one worst
> case).
>
> 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 +/- 4s to 0.184s
>
> Timing results for HD5770 with 'time xrandr' command:
> Machine 4: from 3.210s to 1.060s
>
> Reviewed-by: Chris Wilson <chris@hchris-wilson.co.uk>
> Reviewed-by: Keith Packard <keithp@keithp.com>
> Tested-by: Sean Finney <seanius@seanius.net>
> Tested-by: Soren Hansen <soren@linux2go.dk>
> Tested-by: Hernando Torque <sirius@sonnenkinder.org>
> Tested-by: Mike Lothian <mike@fireburn.co.uk>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41059
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Imo it's too late for such a change with decent potential to blow up to
land in 3.3. I think this needs some decent shakeout time in Dave's
drm-next tree (despite all r-b's and tested-bys it already gathered) and
hence is imo 3.4 material at this stage.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding
2012-01-05 14:43 ` [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Daniel Vetter
@ 2012-01-05 15:37 ` Eugeni Dodonov
2012-01-05 15:50 ` Keith Packard
0 siblings, 1 reply; 7+ messages in thread
From: Eugeni Dodonov @ 2012-01-05 15:37 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx, Eugeni Dodonov
[-- Attachment #1.1: Type: text/plain, Size: 2178 bytes --]
On Thu, Jan 5, 2012 at 12:43, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Jan 05, 2012 at 09:34:28AM -0200, Eugeni Dodonov 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 (up to 30x in one worst
> > case).
> >
> > 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 +/- 4s to 0.184s
> >
> > Timing results for HD5770 with 'time xrandr' command:
> > Machine 4: from 3.210s to 1.060s
> >
> > Reviewed-by: Chris Wilson <chris@hchris-wilson.co.uk>
> > Reviewed-by: Keith Packard <keithp@keithp.com>
> > Tested-by: Sean Finney <seanius@seanius.net>
> > Tested-by: Soren Hansen <soren@linux2go.dk>
> > Tested-by: Hernando Torque <sirius@sonnenkinder.org>
> > Tested-by: Mike Lothian <mike@fireburn.co.uk>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41059
> > Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
>
> Imo it's too late for such a change with decent potential to blow up to
> land in 3.3. I think this needs some decent shakeout time in Dave's
> drm-next tree (despite all r-b's and tested-bys it already gathered) and
> hence is imo 3.4 material at this stage.
>
I'd be happy to include it into any kernel out there, 3.4 would be fine. I
originally sent it for 3.1 merge though, and so far it haven't been picked
up by any tree. So I am a bit lost about what to do with this next, besides
re-sending the same patch over and over again...
--
Eugeni Dodonov
<http://eugeni.dodonov.net/>
[-- Attachment #1.2: Type: text/html, Size: 3237 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding
2012-01-05 15:37 ` Eugeni Dodonov
@ 2012-01-05 15:50 ` Keith Packard
0 siblings, 0 replies; 7+ messages in thread
From: Keith Packard @ 2012-01-05 15:50 UTC (permalink / raw)
To: Eugeni Dodonov, Daniel Vetter; +Cc: intel-gfx, Eugeni Dodonov
[-- Attachment #1.1: Type: text/plain, Size: 461 bytes --]
On Thu, 5 Jan 2012 13:37:50 -0200, Eugeni Dodonov <eugeni@dodonov.net> wrote:
> I'd be happy to include it into any kernel out there, 3.4 would be fine. I
> originally sent it for 3.1 merge though, and so far it haven't been picked
> up by any tree. So I am a bit lost about what to do with this next, besides
> re-sending the same patch over and over again...
I'll stick it in drm-intel-next, once Dave pulls for 3.3.
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding
2012-01-05 11:34 [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Eugeni Dodonov
2012-01-05 11:34 ` [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake Eugeni Dodonov
2012-01-05 14:43 ` [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Daniel Vetter
@ 2012-01-16 20:33 ` Daniel Vetter
2 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2012-01-16 20:33 UTC (permalink / raw)
To: Eugeni Dodonov, Dave Airlie; +Cc: intel-gfx, DRI Development
Hi Dave,
Is it ok if I merge this through my -next tree? Otherwise please consider
merging this for 3.4.
Yours, Daniel
On Thu, Jan 05, 2012 at 09:34:28AM -0200, Eugeni Dodonov 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 (up to 30x in one worst
> case).
>
> 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 +/- 4s to 0.184s
>
> Timing results for HD5770 with 'time xrandr' command:
> Machine 4: from 3.210s to 1.060s
>
> Reviewed-by: Chris Wilson <chris@hchris-wilson.co.uk>
> Reviewed-by: Keith Packard <keithp@keithp.com>
> Tested-by: Sean Finney <seanius@seanius.net>
> Tested-by: Soren Hansen <soren@linux2go.dk>
> Tested-by: Hernando Torque <sirius@sonnenkinder.org>
> Tested-by: Mike Lothian <mike@fireburn.co.uk>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41059
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
> ---
> 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 3e927ce..fb6c26c 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -266,6 +266,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.8
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-16 20:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-05 11:34 [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Eugeni Dodonov
2012-01-05 11:34 ` [PATCH 2/2] drm/i915: there is no pipe CxSR on ironlake Eugeni Dodonov
2012-01-16 20:30 ` Daniel Vetter
2012-01-05 14:43 ` [PATCH 1/2] drm: give up on edid retries when i2c bus is not responding Daniel Vetter
2012-01-05 15:37 ` Eugeni Dodonov
2012-01-05 15:50 ` Keith Packard
2012-01-16 20:33 ` [Intel-gfx] " Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox