]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:25 +0000 (19:12 -0400)
commit3d46720fc10e8270d003fa8e55f2e89c14af9261
tree4027bf3521fe8e839a3e5349eb4fbfe6307a7b73
parent712d9cd6d0bbe95375893547310dfd1394fe7a65
drm/i915: cope with large i2c transfers

[ Upstream commit 9535c4757b881e06fae72a857485ad57c422b8d2 ]

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
9d8dc3e529a19e427fd379118acd132520935c5d "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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_i2c.c