From: Eugeni Dodonov <eugeni.dodonov@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Eugeni Dodonov <eugeni.dodonov@intel.com>
Subject: [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there
Date: Mon, 17 Oct 2011 11:12:29 -0200 [thread overview]
Message-ID: <1318857150-2117-2-git-send-email-eugeni.dodonov@intel.com> (raw)
In-Reply-To: <1318857150-2117-1-git-send-email-eugeni.dodonov@intel.com>
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.
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 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
next prev parent reply other threads:[~2011-10-17 13:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 13:12 [PATCH] Improvements in edid detection timings (final) Eugeni Dodonov
2011-10-17 13:12 ` Eugeni Dodonov [this message]
2011-10-17 20:41 ` [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Keith Packard
2011-10-17 21:07 ` Eugeni Dodonov
2011-10-17 22:41 ` Keith Packard
2011-10-18 0:06 ` Eugeni Dodonov
2011-10-18 10:02 ` [Intel-gfx] " Dave Airlie
2011-10-18 13:14 ` Jean Delvare
2011-10-18 13:37 ` Eugeni Dodonov
2011-10-20 12:33 ` Jean Delvare
2011-10-20 12:40 ` Jean Delvare
2011-10-20 13:13 ` Jean Delvare
2011-10-20 13:18 ` Michael Büsch
2011-10-24 14:40 ` Eugeni Dodonov
2011-10-25 13:03 ` [PATCH] Give up on edid retries when i2c bus is not responding Eugeni Dodonov
2011-10-26 17:06 ` Eugeni Dodonov
2011-10-26 17:18 ` Chris Wilson
2011-10-26 17:35 ` Eugeni Dodonov
2011-10-30 15:53 ` [Intel-gfx] [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Jean Delvare
2011-10-18 14:01 ` Alex Deucher
2011-11-01 0:31 ` [PATCH] edid candidate for -next Eugeni Dodonov
2011-11-01 0:31 ` [PATCH] Give up on edid retries when i2c bus is not responding Eugeni Dodonov
2011-10-31 19:45 ` [Intel-gfx] [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Chris Wilson
2011-10-17 13:12 ` [PATCH 2/2] Check if the bus is valid prior to discovering edid Eugeni Dodonov
-- strict thread matches above, loose matches on Subject: below --
2011-10-07 22:00 [PATCH 0/2] RFC: Potential improvements in edid detection timings (v2) Eugeni Dodonov
2011-10-07 22:00 ` [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Eugeni Dodonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318857150-2117-2-git-send-email-eugeni.dodonov@intel.com \
--to=eugeni.dodonov@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox