All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Sean Paul <sean@poorly.run>
Cc: Matthias Kaehlcke <mka@chromium.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Adam Jackson <ajax@redhat.com>
Subject: Re: [PATCH v2] drm/bridge: dw-hdmi: Refuse DDC/CI transfers on the internal I2C controller
Date: Mon, 22 Jul 2019 13:57:14 -0700	[thread overview]
Message-ID: <CAD=FV=Vk5V+gJhW8=6ZFfgV6LdN2U3-VkZvqn7QWDw-215-Z1Q@mail.gmail.com> (raw)
In-Reply-To: <20190722202426.GL104440@art_vandelay>

Hi,

On Mon, Jul 22, 2019 at 1:24 PM Sean Paul <sean@poorly.run> wrote:
>
> On Mon, Jul 22, 2019 at 11:19:45AM -0700, Matthias Kaehlcke wrote:
> > The DDC/CI protocol involves sending a multi-byte request to the
> > display via I2C, which is typically followed by a multi-byte
> > response. The internal I2C controller only allows single byte
> > reads/writes or reads of 8 sequential bytes, hence DDC/CI is not
> > supported when the internal I2C controller is used. The I2C
>
> This is very likely a stupid question, but I didn't see an answer for it, so
> I'll just ask :)
>
> If the controller supports xfers of 8 bytes and 1 bytes, could you just split
> up any of these transactions into len/8+len%8 transactions?

It's not quite that easy, I think.  Specifically a 1-byte transfer
isn't really a 1-byte transfer.

It always sticks this on the wire for a 1-byte write:

Start
Slave address (7 bits) + write (1 bit)
(wait ack)
Register address
1 byte of data
wait for ack
Stop

...or for a 1-byte read:

Start
Slave address (7 bits) + write (1 bit)
(wait ack)
Register address
(wait ack)
Repeated Start (1 bit)
Slave address (7 bits) + read (1 bit)
(read 1 byte of data)
Ack
Stop

Putting more than one of those in a row is not the same thing as just
doing a whole bunch of reads or a whole bunch of writes with no "stop"
in between.

As far as I could find out about DDC/CI it's part of the spec to _not_
send the stop between the reads / writes.


-Doug

  reply	other threads:[~2019-07-22 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 18:19 [PATCH v2] drm/bridge: dw-hdmi: Refuse DDC/CI transfers on the internal I2C controller Matthias Kaehlcke
2019-07-22 20:12 ` Doug Anderson
2019-07-22 20:54   ` Matthias Kaehlcke
2019-07-22 20:24 ` Sean Paul
2019-07-22 20:24   ` Sean Paul
2019-07-22 20:57   ` Doug Anderson [this message]
2019-07-22 21:02   ` Matthias Kaehlcke
2019-07-22 21:02     ` Matthias Kaehlcke
2019-07-25 17:49     ` Sean Paul
2019-07-30 13:38       ` Neil Armstrong
2019-07-30 16:14         ` Sean Paul
2019-07-31  7:38           ` Neil Armstrong
2019-10-02 19:44 Matthias Kaehlcke
2019-10-07 11:54 ` Neil Armstrong
2019-10-07 11:54   ` Neil Armstrong

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='CAD=FV=Vk5V+gJhW8=6ZFfgV6LdN2U3-VkZvqn7QWDw-215-Z1Q@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=Jose.Abreu@synopsys.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=ajax@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=narmstrong@baylibre.com \
    --cc=sean@poorly.run \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.