dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Thierry Reding <treding@nvidia.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/dp: Use large transactions for I2C over AUX
Date: Wed, 28 Jan 2015 11:33:34 +0200	[thread overview]
Message-ID: <87y4onqmfl.fsf@intel.com> (raw)
In-Reply-To: <20150128091022.GF4764@phenom.ffwll.local>

On Wed, 28 Jan 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jan 28, 2015 at 10:59:06AM +0200, Jani Nikula wrote:
>> On Tue, 27 Jan 2015, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
>> > So I've been experimenting a bit with various dongles here, and sadly I've
>> > not managed to get any one of them to return short reads :(
>> >
>> > I did find one that allows changing the speed of the i2c bus, but even if
>> > I reduce it to 1khz there are no short reads, just a lot more defers. The
>> > dongle in question has OUI 001cf8.
>> >
>> > However the good news is that EDID reads seem to get faster across the
>> > board with 16 byte messages. How much faster depends on the dongle.
>> >
>> > Here are my measurements how long it took to read a single EDID block:
>> >  DP->DVI (OUI 001cf8):	40ms -> 35ms
>> >  DP->VGA (OUI 0022b9):	45ms -> 38ms
>> >  Zotac DP->2xHDMI:	25ms ->  4ms
>> >
>> >
>> > Oh and this is how I mangled my drm_dp_i2c_xfer():
>> > transferred = 0;
>> > while (msgs[i].len > transferred) {
>> > 	msg.buffer = msgs[i].buf + transferred;
>> > 	msg.size = min_t(unsigned int, drm_dp_i2c_msg_size,
>> > 			 msgs[i].len - transferred);
>> > 	err = drm_dp_i2c_do_msg(aux, &msg);
>> > 	if (err < 0)
>> > 		break;
>> > 	WARN_ON(err == 0);
>> > 	transferred += err;
>> > }
>> >
>> > I made the msg size configurable via a module param just to help me test
>> > this stuff, but I'm thinking we might want to upstream that just to make
>> > it easier to try smaller message sizes if/when people encounter problematic
>> > sinks/dongles.
>> 
>> How about just letting that happen first, to see if and how the problems
>> occur? If there's a pattern, maybe we can fall back to 1-byte transfers
>> in those cases (or even add OUI based quirks). I've grown really
>> hesitant about adding new module parameters, they are ABI we can't
>> easily remove/regress once added.
>
> module_param_debug takes care of any such risks imo.

No such thing, maybe you mean module_param_unsafe?

Jani.


> -Daniel
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-01-28  9:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 15:22 [PATCH] drm/dp: Use large transactions for I2C over AUX Simon Farnsworth
2015-01-26 15:33 ` Ville Syrjälä
2015-01-26 15:47   ` Simon Farnsworth
2015-01-26 16:11     ` Ville Syrjälä
2015-01-26 16:39       ` Simon Farnsworth
2015-01-27 13:36         ` Ville Syrjälä
2015-01-28  8:59           ` Jani Nikula
2015-01-28  9:10             ` Daniel Vetter
2015-01-28  9:33               ` Jani Nikula [this message]
2015-01-28 10:30                 ` Daniel Vetter
2015-01-28 10:45                 ` Simon Farnsworth
2015-01-26 16:00   ` Ville Syrjälä
  -- strict thread matches above, loose matches on Subject: below --
2015-02-10 18:38 Simon Farnsworth
2015-02-10 18:42 ` Simon Farnsworth
2015-02-11  5:36   ` Dave Airlie
2015-02-11  7:25     ` Daniel Vetter
2015-02-11  8:13 ` Jani Nikula
2015-02-11 12:05 ` Ville Syrjälä
2015-03-11 19:28   ` Ville Syrjälä
2015-03-11 21:06     ` Daniel Vetter
2015-01-23 18:40 Simon Farnsworth
2015-01-23 19:46 ` Ville Syrjälä
2015-01-23 21:21   ` Thierry Reding
2015-01-24 11:27     ` Daniel Vetter
2015-01-26  9:50     ` Simon Farnsworth

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=87y4onqmfl.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=treding@nvidia.com \
    /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