]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: cope with large i2c transfers
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 21 Apr 2015 16:49:11 +0000 (09:49 -0700)
committerJani Nikula <jani.nikula@intel.com>
Thu, 23 Apr 2015 20:48:18 +0000 (23:48 +0300)
commitfd16309a3d0ccf7de3388b414f8c2718fc9f523e
tree6362a8d89171fba94539c0475d6b2ccb2ea9e7f2
parentd5a5aa5cfb555c9cbf7dee4c754e58d761a59bf0
drm/i915: cope with large i2c transfers

The hardware, according to the specs, is limited to 256 byte 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.

Let's split larger transfers into digestable chunks. Doing this allows
Atmel MXT driver on Pixel 1 function properly (it hasn't since commit
c4cb86f2ed961c1cb132012a02ad6eda3b20e524 "Input: atmel_mxt_ts -
implement T44 message handling" which tries to consume multiple
touchscreen/touchpad reports in a single transaction).

Cc: stable@vger.kernel.org
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_i2c.c