lkml.org 
[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/i915: cope with large i2c transfers
On Mon, Apr 20, 2015 at 03:11:16PM -0700, Dmitry Torokhov wrote:
> The hardware is limited to 2^9 - 1 (511) bytes transfers, and current
> driver has no protections in case users attempt to do larger transfers.
> The code will just stomp over status register and mayhem ensues.

Interesting. The spec says supports "0 to 256 byte" transfers in the
introduction, but the register just says bits 16:24 are a byte counter
without the extra limitation. I suspect the introductory blurb is
inaccurate and it is implementated as a simple counter as demonstrated
here. We should get that clarified in the specs just in case it was once
limited to 256 bytes.

> Let's split larger transfers into digestable chunks. Doing this allows
> Atmel MXT driver on Pixel 1 function properly (it hasn't since commit
> 9d8dc3e529a19e427fd379118acd132520935c5d "Input: atmel_mxt_ts -
> implement T44 message handling" which tries to consume multiple
> touchscreen/touchpad reports in a single transaction).
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

The code looks good and I've only whitespace and variable scoping
gripes, so
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Though I am tempted to say we should impose the 256 byte limit for
stable@
-Chris

--
Chris Wilson, Intel Open Source Technology Centre


\
 
 \ /
  Last update: 2015-04-21 09:41    [W:0.072 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site