CHROMIUM: drm/i915: AVI infoframe VIC and Aspect Fix

Added Active aspect Ratio information to AVI infoframe
byte #2, representing all non-reserved values of that nybble.
Changed call to CEA mode match routine that checks for both
60Hz and 59.94Hz pixel clocks.

BUG=chrome-os-partner:27909
TEST=Manual:Falco connected to protocol analyzer,
passes compliance equivalence tests

Change-Id: I76d49ac25bc454901564240169e09054e32fbcc6
Signed-off-by: Clint Taylor <Clinton.A.Taylor@intel.com>
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/207411
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
CHERRY-PICK: CHROMIUM: Input: atmel_mxt_ts: fix out-of-bounds array accesses

This is cherry-picked from 0fa7c8d4bf70722be1bcd4adb0f54ef832e84449

The current_id map is fixed to a size of MXT_MAX_FINGER (10), but
the touch controller may generate reports for a larger number of
IDs.  On Nyan, for example, the controller claims it can report
up to 16 touch IDs.  During initialization of the touchscreen,
events were generated for all 16 touch IDs causing out-of-bounds
writes to the current_id map.  Instead of fixing the size to 10,
dynamically allocate the current_id map based on the number of
touch IDs the controller claims to support.
BUG=none
TEST=Build and boot on Nyan.  evtest output looks reasonable.
Suspend/resume is no longer broken.
Change-Id: Iabf5f91839ed1523374209beac7daa209bbf060d
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179758
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207264
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
CHROMIUM: config: enable reservation and fence sync for Exynos and Mali

Kernel config change to disable KDS based sync and enable reservation and
fence based sync.

BUG=chromium:340541
TEST=run webgl aquarium and big buck bunny in two windows side by side

Change-Id: If34384434bfcc9ac45a0d6dba5946ab0c370a5c6
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/206595
BACKPORT: rcu: Silence compiler array out-of-bounds false positive

It turns out that gcc 4.8 warns on array indexes being out of bounds
unless it can prove otherwise.  It gives this warning on some RCU
initialization code.  Because this is far from any fastpath, add
an explicit check for array bounds and panic if so.  This gives the
compiler enough information to figure out that the array index is never
out of bounds.

However, if a similar false positive occurs on a fastpath, it will
probably be necessary to tell the compiler to keep its array-index
anxieties to itself.  ;-)

Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

(cherry picked from commit 4930521ae10fd28ebc713107fd243c8044a95415)
Signed-off-by: Yunlian Jiang <yunlian@google.com>

BUG=chromium:392918
TEST=emerge-x86-alex chromeos-kernel-3_8 with gcc 4.9 passes.

Change-Id: Iefe6e64b37db5e0f5dd6235ed7af4fad3ea1071c
Reviewed-on: https://chromium-review.googlesource.com/207380
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
BACKPORT: drm/prime: Remove PRIME handles only if supported

Drivers that don't support PRIME will not have initialized the PRIME
specific private component of struct drm_file. If called for such
drivers, the drm_gem_remove_prime_handles() function will crash. Fix
it by checking for PRIME support prior to removing the PRIME handles.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>

Conflicts:
	drivers/gpu/drm/drm_gem.c

BUG=chromium:391086
TEST=booted link_freon qemu image. no panic on chrome crash/restart.

(cherry picked from commit 9c784855067a8d10cef6088b14a58083e3918fdc)
Signed-off-by: Michael Spang <spang@chromium.org>

Change-Id: I39e971348828fdfb2d5d2accaab2d65eb3cb42bb
Reviewed-on: https://chromium-review.googlesource.com/206650
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Tested-by: Michael Spang <spang@chromium.org>
Merge branch 'chromeos-3.8' of https://chromium.googlesource.com/chromiumos/third_party/kernel into chromeos-3.8