public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Eugeni Dodonov <eugeni@dodonov.net>
To: intel-gfx@lists.freedesktop.org
Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
Subject: [PATCH 0/2] RFC: Potential improvements in edid detection timings
Date: Thu,  6 Oct 2011 20:30:34 -0300	[thread overview]
Message-ID: <1317943836-7362-1-git-send-email-eugeni@dodonov.net> (raw)

From: Eugeni Dodonov <eugeni.dodonov@intel.com>

This is the the forth iteration of potential fixes for slow edid detection
issues over non-existent outputs
(https://bugs.freedesktop.org/show_bug.cgi?id=41059) - the previous versions
were posted to the bug and were used mostly for debugging the problem.

After investigation, I came to think on two different ways to fix the issue:
in PATCH1, I added a check for the return value of i2c_transfer - and, if it
is -ENXIO, we give up on further attempts as the bus is not there. A
drawback to this approach is that it affects all the devices out there which
use drm_get_edid.  From my testing, the -ENXIO gave no false positives, but
I haven't tested it on non-Intel cards.

The second patch does a similar procedure within the i915 driver. It adds a
new function - intel_drm_get_valid_edid - which attempts to do a simple i2c
transfer over the bus prior to calling drm_get_edid. In case such transfer
fails with -ENXIO, it is a signal that the bus is not there, so we shouldn't
waste any time trying to communicate with it further.

Note that those patches provide lots of dmesg pollution - I just wanted to
send them out to get an overall feedback on the proposed approach.

Eugeni Dodonov (2):
  Give up on edid retries when i2c tells us that bus is not there
  Check if the bus is valid prior to discovering edid.

 drivers/gpu/drm/drm_edid.c         |    5 +++++
 drivers/gpu/drm/i915/intel_dp.c    |    4 ++--
 drivers/gpu/drm/i915/intel_drv.h   |    2 ++
 drivers/gpu/drm/i915/intel_hdmi.c  |    4 ++--
 drivers/gpu/drm/i915/intel_i2c.c   |   33 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_lvds.c  |    2 +-
 drivers/gpu/drm/i915/intel_modes.c |    2 +-
 drivers/gpu/drm/i915/intel_sdvo.c  |    4 ++--
 8 files changed, 48 insertions(+), 8 deletions(-)

-- 
1.7.6.3

             reply	other threads:[~2011-10-06 23:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 23:30 Eugeni Dodonov [this message]
2011-10-06 23:30 ` [PATCH 1/2] Give up on edid retries when i2c tells us that bus is not there Eugeni Dodonov
2011-10-07 14:08   ` Jesse Barnes
2011-10-07 14:11     ` Eugeni Dodonov
2011-10-06 23:30 ` [PATCH 2/2] Check if the bus is valid prior to discovering edid 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=1317943836-7362-1-git-send-email-eugeni@dodonov.net \
    --to=eugeni@dodonov.net \
    --cc=eugeni.dodonov@intel.com \
    --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