]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/log
people/aperard/linux-chromebook.git
12 years agodocs: Xen ARM DT bindings
Stefano Stabellini [Tue, 18 Sep 2012 09:57:47 +0000 (09:57 +0000)]
docs: Xen ARM DT bindings

Add a doc to describe the Xen ARM device tree bindings

Changes in v5:

- add a comment about the size of the grant table memory region;
- add a comment about the required presence of a GIC node;
- specify that the described properties are part of a top-level
"hypervisor" node;
- specify #address-cells and #size-cells for the example.

Changes in v4:

- "xen,xen" should be last as it is less specific;
- update reg property using 2 address-cells and 2 size-cells.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
CC: devicetree-discuss@lists.ozlabs.org
CC: David Vrabel <david.vrabel@citrix.com>
CC: Rob Herring <robherring2@gmail.com>
CC: Dave Martin <dave.martin@linaro.org>
12 years agoxen/arm: empty implementation of grant_table arch specific functions
Stefano Stabellini [Wed, 8 Aug 2012 16:34:11 +0000 (16:34 +0000)]
xen/arm: empty implementation of grant_table arch specific functions

Changes in v2:

- return -ENOSYS rather than -1.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen/arm: sync_bitops
Stefano Stabellini [Wed, 8 Aug 2012 16:34:01 +0000 (16:34 +0000)]
xen/arm: sync_bitops

sync_bitops functions are equivalent to the SMP implementation of the
original functions, independently from CONFIG_SMP being defined.

We need them because _set_bit etc are not SMP safe if !CONFIG_SMP. But
under Xen you might be communicating with a completely external entity
who might be on another CPU (e.g. two uniprocessor guests communicating
via event channels and grant tables). So we need a variant of the bit
ops which are SMP safe even on a UP kernel.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen/arm: page.h definitions
Stefano Stabellini [Wed, 8 Aug 2012 16:33:46 +0000 (16:33 +0000)]
xen/arm: page.h definitions

ARM Xen guests always use paging in hardware, like PV on HVM guests in
the X86 world.

Changes in v3:

- improve comments.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen/arm: hypercalls
Stefano Stabellini [Fri, 14 Sep 2012 13:33:21 +0000 (13:33 +0000)]
xen/arm: hypercalls

Use r12 to pass the hypercall number to the hypervisor.

We need a register to pass the hypercall number because we might not
know it at compile time and HVC only takes an immediate argument.

Among the available registers r12 seems to be the best choice because it
is defined as "intra-procedure call scratch register".

Use the ISS to pass an hypervisor specific tag.

Changes in v2:
- define an HYPERCALL macro for 5 arguments hypercall wrappers, even if
at the moment is unused;
- use ldm instead of pop;
- fix up comments.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoarm: initial Xen support
Stefano Stabellini [Fri, 14 Sep 2012 13:53:39 +0000 (13:53 +0000)]
arm: initial Xen support

- Basic hypervisor.h and interface.h definitions.
- Skeleton enlighten.c, set xen_start_info to an empty struct.
- Make xen_initial_domain dependent on the SIF_PRIVILIGED_BIT.

The new code only compiles when CONFIG_XEN is set, that is going to be
added to arch/arm/Kconfig in patch #11 "xen/arm: introduce CONFIG_XEN on
ARM".

Changes in v3:

- improve comments.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen/arm: compile and run xenbus
Stefano Stabellini [Fri, 14 Sep 2012 11:13:12 +0000 (12:13 +0100)]
xen/arm: compile and run xenbus

bind_evtchn_to_irqhandler can legitimately return 0 (irq 0): it is not
an error.

If Linux is running as an HVM domain and is running as Dom0, use
xenstored_local_init to initialize the xenstore page and event channel.

Changes in v4:
- do not xs_reset_watches on dom0.

Changes in v2:
- refactor xenbus_init.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[v5: Fixed case switch indentations]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:
drivers/xen/xenbus/xenbus_xs.c

12 years agoxen: resynchronise grant table status codes with upstream
Ian Campbell [Fri, 14 Sep 2012 07:19:01 +0000 (08:19 +0100)]
xen: resynchronise grant table status codes with upstream

Adds GNTST_address_too_big and GNTST_eagain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen: missing includes
Stefano Stabellini [Mon, 6 Aug 2012 14:27:09 +0000 (15:27 +0100)]
xen: missing includes

Changes in v2:
- remove pvclock hack;
- remove include linux/types.h from xen/interface/xen.h.
v3:
- Compile under IA64
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
Stefano Stabellini [Wed, 22 Aug 2012 16:20:15 +0000 (17:20 +0100)]
xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST

Reset the IRQ_NOAUTOEN and IRQ_NOREQUEST flags that are enabled by
default on ARM. If IRQ_NOAUTOEN is set, __setup_irq doesn't call
irq_startup, that is responsible for calling irq_unmask at startup time.
As a result event channels remain masked.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen: allow privcmd for HVM guests
Stefano Stabellini [Wed, 22 Aug 2012 16:20:16 +0000 (17:20 +0100)]
xen: allow privcmd for HVM guests

This patch removes the "return -ENOSYS" for auto_translated_physmap
guests from privcmd_mmap, thus it allows ARM guests to issue privcmd
mmap calls. However privcmd mmap calls are still going to fail for HVM
and hybrid guests on x86 because the xen_remap_domain_mfn_range
implementation is currently PV only.

Changes in v2:

- better commit message;
- return -EINVAL from xen_remap_domain_mfn_range if
  auto_translated_physmap.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen: Introduce xen_pfn_t for pfn and mfn types
Stefano Stabellini [Wed, 22 Aug 2012 16:20:14 +0000 (17:20 +0100)]
xen: Introduce xen_pfn_t for pfn and mfn types

All the original Xen headers have xen_pfn_t as mfn and pfn type, however
when they have been imported in Linux, xen_pfn_t has been replaced with
unsigned long. That might work for x86 and ia64 but it does not for arm.
Bring back xen_pfn_t and let each architecture define xen_pfn_t as they
see fit.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen/events: fix unmask_evtchn for PV on HVM guests
Stefano Stabellini [Wed, 22 Aug 2012 16:20:11 +0000 (17:20 +0100)]
xen/events: fix unmask_evtchn for PV on HVM guests

When unmask_evtchn is called, if we already have an event pending, we
just set evtchn_pending_sel waiting for local_irq_enable to be called.
That is because PV guests set the irq_enable pvops to
xen_irq_enable_direct in xen_setup_vcpu_info_placement:
xen_irq_enable_direct is implemented in assembly in
arch/x86/xen/xen-asm.S and call xen_force_evtchn_callback if
XEN_vcpu_info_pending is set.

However HVM guests (and ARM guests) do not change or do not have the
irq_enable pvop, so evtchn_unmask cannot work properly for them.

Considering that having the pending_irq bit set when unmask_evtchn is
called is not very common, and it is simpler to keep the
native_irq_enable implementation for HVM guests (and ARM guests), the
best thing to do is just use the EVTCHNOP_unmask hypercall (Xen
re-injects pending events in response).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agodebug: Xen dts, add dom0 bootarg, remove second cpu, remove dump-oops.
Anthony PERARD [Tue, 19 Feb 2013 16:51:29 +0000 (16:51 +0000)]
debug: Xen dts, add dom0 bootarg, remove second cpu, remove dump-oops.

12 years agofixup! DEBUG Xen: have proper gic
Anthony PERARD [Tue, 19 Feb 2013 16:50:37 +0000 (16:50 +0000)]
fixup! DEBUG Xen: have proper gic

12 years agoHACK! arm: set v7 translation table entries as uncachable
David Vrabel [Mon, 17 Dec 2012 12:30:58 +0000 (12:30 +0000)]
HACK! arm: set v7 translation table entries as uncachable

There appears to be a bug in the model where the MMU does not
correctly see updates to translation table entries if they are marked
as cachable.  This bug only happens when running under the Xen
hypervisor.

As a workaround, mark the entries as uncachable.  This decreases
performance.

[ijc - rebase, applying to both proc-v7-{2,3}level.S]

12 years agoARM: 7511/1: opcodes: Opcode definitions for the Virtualization Extensions
Dave Martin [Mon, 3 Sep 2012 12:49:25 +0000 (13:49 +0100)]
ARM: 7511/1: opcodes: Opcode definitions for the Virtualization Extensions

For now, this patch just adds a definition for the HVC instruction.
More can be added here later, as needed.

Now that we have a real example of how to use the opcode injection
macros properly, this patch also adds a cross-reference from the
explanation in opcodes.h (since without an example, figuring out
how to use the macros is not that easy).

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Conflicts:
arch/arm/include/asm/opcodes.h

12 years agoDEBUG Xen: have proper gic
Anthony PERARD [Fri, 30 Nov 2012 12:25:59 +0000 (12:25 +0000)]
DEBUG Xen: have proper gic

12 years agoCHERRY-PICK: CHROMIUM: Input: synaptics - skip trackpoint reconnect
Chung-yih Wang [Tue, 19 Feb 2013 10:47:05 +0000 (18:47 +0800)]
CHERRY-PICK: CHROMIUM: Input: synaptics - skip trackpoint reconnect

Since trackpoint properties are probed in the boot time, it should
be safe to skip the reconnect function as we don't need to
probe the properties again to reduce the latency of unresponsiveness.

BUG=chrome-os-partner:15015
TEST=on device; use powerd_suspend and then hit a key to wake it up
   see if the trackpoint/trackpoint could be active in 3~4 seconds
   after resume instead of 7 seconds long

Signed-off-by: Chung-yih Wang <cywang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43510
Tested-by: Agnes Cheng <agnescheng@google.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Gediminas Ramanauskas <gedis@chromium.org>
(cherry picked from commit 6e600b92ec9ff57a6e4935ae31f3b6425c4c3344)

Change-Id: Ibb4f979d0aacad9f66ef4bd1047e97f6343446ab
Signed-off-by: Chung-yih Wang <cywang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43766
Reviewed-by: Gediminas Ramanauskas <gedis@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
12 years agoRevert "CHROMIUM: bluetooth/usb: hack to cover up dma after free corruption"
Sonny Rao [Mon, 25 Feb 2013 21:41:58 +0000 (13:41 -0800)]
Revert "CHROMIUM: bluetooth/usb: hack to cover up dma after free corruption"

This reverts commit 27aeb810c5f03bbb434378e0c4b4bc3f25b35a2e.

Merge to R25 was premature, reverting.

BUG=chrome-os-partner:17614
TEST=none

Change-Id: I9999a3f4562b4aa5348edc3aba707896f55efe56
Reviewed-on: https://gerrit.chromium.org/gerrit/43942
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
12 years agoCHROMIUM: bluetooth/usb: hack to cover up dma after free corruption
Sonny Rao [Thu, 21 Feb 2013 01:45:06 +0000 (17:45 -0800)]
CHROMIUM: bluetooth/usb: hack to cover up dma after free corruption

This is a horrible, gross hack to cover up the fact that we
sometimes get an apparent DMA from the interrupt endpoint on the
bluetooth module after shutting it down.  This ends up manifesting as
random kernel crashes, often from other users of kmalloc-16.

Since we don't have root cause (yet?) and can't do much about it, put
in this band-aid which will leak around 64 bytes of memory every time we
suspend/resume a usb bluetooth device.  We make no attempt to free
this memory because we don't know when the DMA could come in and it's
a relatively small amount so probably not worth trying to free it
later.

Another issue is that SLUB will mix together objects from different
slabs if they are all the same size.  So, in order to get a separate
slab in /proc/slabinfo, we turn on some of the slab debugging options.
The main reason for doing this is to let us track how much memory got
leaked through slabinfo.  This will trigger a BUG_ON() in
kmem_cache_create() if the kernel is compiled with
CONFIG_SLAB && !CONFIG_DEBUG_SLAB.

One day, when we have a real fix, we should remove this abomination.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chrome-os-partner:12507
BUG=chrome-os-partner:17614
TEST=repeated suspend resume, should not see a kernel crash

Change-Id: Iebdfe033d178c664a91fce1164b255aa1c322ad0
Reviewed-on: https://gerrit.chromium.org/gerrit/43682
Commit-Queue: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43918

12 years agoCHERRY-PICK: CHROMIUM: sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
Mathias Krause [Sat, 23 Feb 2013 18:29:07 +0000 (10:29 -0800)]
CHERRY-PICK: CHROMIUM: sock_diag: Fix out-of-bounds access to sock_diag_handlers[]

Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access opening
doors for a privilege escalation.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
BUG=chromium-os:39185
TEST=link build, exploit PoC fails

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43867
Reviewed-by: Olof Johansson <olofj@chromium.org>
Change-Id: I4b4e35eed77a39fa7e0415008b8e1a034feacf49
(cherry picked from ToT commit 947e5e383ef70e673a05325830e560119ab2ce3f)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43872
Reviewed-by: Julien Tinnes <jln@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
12 years agoCHROMIUM: USB: option: don't show error when urb is killed in an expected way
Ben Chan [Thu, 21 Feb 2013 01:33:43 +0000 (17:33 -0800)]
CHROMIUM: USB: option: don't show error when urb is killed in an expected way

When a device supported by the option driver is suspended, the interrupt
urb is killed and option_instat_callback() is invoked with the urb's
status set to -ENOENT. The patch prevents the option driver from
spamming the log with a message 'option_instat_callback: error -2' under
such scenario.

BUG=chrome-os-partner:17918
TEST=Tested the following on link:
1. Put the system on battery so that USB auto-suspend is turned on for
   the Novatel E362 modem.
2. Verify that the option kernel drive no longer prints the following
   error to /var/log/messages:

       option: option_instat_callback: error -2

(cherry picked from commit b09ec140d31136176eee94bfb49f46eb7cf2ffda)

Change-Id: I6e286a3cbf4087a88a06682f8b32d45109d84364
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43907

12 years agoCHERRY-PICK: UPSTREAM: ext4: ignore last group w/o enough space when resizing instead...
Yongqiang Yang [Wed, 5 Sep 2012 05:21:50 +0000 (01:21 -0400)]
CHERRY-PICK: UPSTREAM: ext4: ignore last group w/o enough space when resizing instead of BUG'ing

If the last group does not have enough space for group tables, ignore
it instead of calling BUG_ON().

Reported-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
BUG=chromium-os:36118
TEST=link build, resize still works

(cherry picked from upstream commit 03c1c29053f678234dbd51bf3d65f3b7529021de)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42679
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I36ce1c515b951b84e77de96fb00cf1acc6c6c25e
(cherry picked from ToT commit 7f6b7cb382b190fc491459f9928916f8b387b4b4)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43859
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHERRY-PICK: UPSTREAM: wake_up_process() should be never used to wakeup a TASK_STOPPE...
Oleg Nesterov [Mon, 21 Jan 2013 19:48:17 +0000 (20:48 +0100)]
CHERRY-PICK: UPSTREAM: wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task

wake_up_process() should never wakeup a TASK_STOPPED/TRACED task.
Change it to use TASK_NORMAL and add the WARN_ON().

TASK_ALL has no other users, probably can be killed.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
BUG=chromium-os:38610
TEST=link build

(cherry picked from upstream commit 9067ac85d533651b98c2ff903182a20cbb361fcb)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43145
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I5cadeba230dc6d27403bfc6c3522075c4385295b
(cherry picked from ToT commit 28d8d1bb8bed3679240993c0e30040ec0b3e3db2)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43664
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
12 years agoCHERRY-PICK: UPSTREAM: ptrace: ensure arch_ptrace/ptrace_request can never race with...
Oleg Nesterov [Mon, 21 Jan 2013 19:48:00 +0000 (20:48 +0100)]
CHERRY-PICK: UPSTREAM: ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL

putreg() assumes that the tracee is not running and pt_regs_access() can
safely play with its stack.  However a killed tracee can return from
ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
that debugger can actually read/modify the kernel stack until the tracee
does SAVE_REST again.

set_task_blockstep() can race with SIGKILL too and in some sense this
race is even worse, the very fact the tracee can be woken up breaks the
logic.

As Linus suggested we can clear TASK_WAKEKILL around the arch_ptrace()
call, this ensures that nobody can ever wakeup the tracee while the
debugger looks at it.  Not only this fixes the mentioned problems, we
can do some cleanups/simplifications in arch_ptrace() paths.

Probably ptrace_unfreeze_traced() needs more callers, for example it
makes sense to make the tracee killable for oom-killer before
access_process_vm().

While at it, add the comment into may_ptrace_stop() to explain why
ptrace_stop() still can't rely on SIGKILL and signal_pending_state().

Reported-by: Salman Qazi <sqazi@google.com>
Reported-by: Suleiman Souhlal <suleiman@google.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
BUG=chromium-os:38610
TEST=link build

(cherry picked from upstream commit 9899d11f654474d2d54ea52ceaa2a1f4db3abd68)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43144
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: Id8100beee1789f5e678adc59c33e5935df31fba4
(cherry picked from ToT commit 10b55a2686c6c3dabf57d8f21e595422eb4ad391)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43663
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
12 years agoCHERRY-PICK: UPSTREAM: ptrace: introduce signal_wake_up_state() and ptrace_signal_wak...
Oleg Nesterov [Mon, 21 Jan 2013 19:47:41 +0000 (20:47 +0100)]
CHERRY-PICK: UPSTREAM: ptrace: introduce signal_wake_up_state() and ptrace_signal_wake_up()

Cleanup and preparation for the next change.

signal_wake_up(resume => true) is overused. None of ptrace/jctl callers
actually want to wakeup a TASK_WAKEKILL task, but they can't specify the
necessary mask.

Turn signal_wake_up() into signal_wake_up_state(state), reintroduce
signal_wake_up() as a trivial helper, and add ptrace_signal_wake_up()
which adds __TASK_TRACED.

This way ptrace_signal_wake_up() can work "inside" ptrace_request()
even if the tracee doesn't have the TASK_WAKEKILL bit set.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
BUG=chromium-os:38610
TEST=link build

(cherry picked from upstream commit 910ffdb18a6408e14febbb6e4b6840fd2c928c82)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43143
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I8db6f9a37db76bc7801f476582d4945997cfca16
(cherry picked from ToT commit 8898e85d0d3549daa88ab837441d932d3c836d56)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43662
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
12 years agoCHERRY-PICK: CHROMIUM: msr: whitelist the i915 thermal control for wrmsr
Kees Cook [Fri, 8 Feb 2013 01:01:21 +0000 (17:01 -0800)]
CHERRY-PICK: CHROMIUM: msr: whitelist the i915 thermal control for wrmsr

Deny all userspace MSR writes except those explicitly whitelisted for
i915 thermal controls. Without this, processes with CAP_SYS_RAWIO can
run arbitrary kernel code via MSR writing.

BUG=chromium-os:38756
TEST=link build, wrmsr works only on i915 thermal registers

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42910
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: Iaba154c76d48414633a4df8d07fe94b2a5e81a90
(cherry picked from ToT commit 3b16706f52c471365ed9a391c4803fd7cfcb0c0d)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43573
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
12 years agoCHERRY-PICK: UPSTREAM: x86/msr: Add capabilities check
Alan Cox [Thu, 15 Nov 2012 13:06:22 +0000 (13:06 +0000)]
CHERRY-PICK: UPSTREAM: x86/msr: Add capabilities check

At the moment the MSR driver only relies upon file system
checks. This means that anything as root with any capability set
can write to MSRs. Historically that wasn't very interesting but
on modern processors the MSRs are such that writing to them
provides several ways to execute arbitary code in kernel space.
Sample code and documentation on doing this is circulating and
MSR attacks are used on Windows 64bit rootkits already.

In the Linux case you still need to be able to open the device
file so the impact is fairly limited and reduces the security of
some capability and security model based systems down towards
that of a generic "root owns the box" setup.

Therefore they should require CAP_SYS_RAWIO to prevent an
elevation of capabilities. The impact of this is fairly minimal
on most setups because they don't have heavy use of
capabilities. Those using SELinux, SMACK or AppArmor rules might
want to consider if their rulesets on the MSR driver could be
tighter.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Horses <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
BUG=chromium-os:38633
TEST=link build, reading MSR correctly fails as uid 0 without caps:
 (can't use iotools with minijail because iotools is statically linked)
 `minijail0 -c 0 /usr/local/bin/python -c 'from struct import *; \
    m = open("/dev/cpu/0/msr"); m.seek(0x3a); \
    print "0x%016x" % (unpack("Q", m.read(8)))'`

(cherry picked from upstream commit c903f0456bc69176912dee6dd25c6a66ee1aed00)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42684
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I5c1d481170e3640e9d88e98c30975195d410f5a5
(cherry picked from ToT commit d4e180354493bb09423798e8833b76334b6cc215)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43572
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
12 years agoCHROMIUM: atkbd: improve workaround for chromeos EC bug
Luigi Semenzato [Thu, 14 Feb 2013 20:36:50 +0000 (12:36 -0800)]
CHROMIUM: atkbd: improve workaround for chromeos EC bug

This makes the workaround for commit b483f9730b97ba8812340cf1584b491d5aa1e774
(https://gerrit.chromium.org/gerrit/43049, "CHROMIUM: atkbd: workaround
for ChromeOS EC keyboard enable bug") work properly by re-enabling the
keyboard IRQ which was accidentally disabled.

BUG=chrome-os-partner:17810
TEST=tested with > 200 power cycles and > 30 workaround triggers
BRANCH=none

Change-Id: Ia8a817f665a3575eebeb1ba2ec3aa89f80c3e0e3
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43301

12 years agoCHROMIUM: ALSA: hda - Hack in a delay when turning codec on.
Dylan Reid [Wed, 13 Feb 2013 03:11:47 +0000 (19:11 -0800)]
CHROMIUM: ALSA: hda - Hack in a delay when turning codec on.

Add a 10msec delay before and after powering on the codec.  It might
make link more likely to produce audio.

BUG=chrome-os-partner:17393
TEST=modified loopback test for 20 hours without losing audio.

Change-Id: I62822ae47b8a538c9537be42f8d6b3f3852dbb11
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43162
Commit-Queue: Trond Wuellner <trond@chromium.org>
Commit-Queue: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
(cherry picked from commit 33a8c942738f3bdf4581682dadf6e4a8ff32c3c6)
Reviewed-on: https://gerrit.chromium.org/gerrit/43166

12 years agoCHROMIUM: atkbd: workaround for ChromeOS EC keyboard enable bug
Luigi Semenzato [Mon, 11 Feb 2013 19:47:48 +0000 (11:47 -0800)]
CHROMIUM: atkbd: workaround for ChromeOS EC keyboard enable bug

The ChromeOS EC enables keystrokes too early, and the driver
can get scancodes when it's expecting a response from the
GETID request.  The workaround consists of repeating the request
a few times if it fails.

BUG=chrome-os-partner:17005
TEST=verified that the workaround works around the bug
BRANCH=none

Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Change-Id: Ica4ad7ed1564c07ab196b302d1a33732a48c680f
Reviewed-on: https://gerrit.chromium.org/gerrit/43165
Commit-Queue: Trond Wuellner <trond@chromium.org>
Reviewed-by: Trond Wuellner <trond@chromium.org>
Tested-by: Trond Wuellner <trond@chromium.org>
12 years agoCHROMIUM: drivers/backlight: allow setting a resume_brightness
Stéphane Marchesin [Tue, 13 Nov 2012 01:31:44 +0000 (17:31 -0800)]
CHROMIUM: drivers/backlight: allow setting a resume_brightness

This lets us set a resume-time backlight value.

BUG=chrome-os-partner:13364
TEST=by hand; automated testcase tracked in crosbug.com/36747

Change-Id: I59ebea1ba3fa59beccdce0970a0e846ee858062c
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
[olofj: added reference to testcase bug and fixed checkpatch error]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37974
Reviewed-on: https://gerrit.chromium.org/gerrit/42350
Reviewed-by: Daniel Erat <derat@chromium.org>
12 years agoCHROMIUM: drm/i915: Improve RC6p stability
Stéphane Marchesin [Thu, 24 Jan 2013 03:00:34 +0000 (19:00 -0800)]
CHROMIUM: drm/i915: Improve RC6p stability

When the CPU is loaded and the GPU tries to switch RC6p modes, the GPU
sometimes gets stuck in RC6p mode and doesn't come out of it. I suspect
that our voltage rail is too weak and sometimes falls behind.

This change throttles down the number of RC6p transitions we do to appease it.

The change also disables clock gating which seems to help. Upstream commit
which does that is 0f846f81a154cc1818416918d22939bda73da194
(drm/i915: disable RCBP and VDS unit clock gating on SNB and VL)

I tested this on multiple Link machines for hours. The number of RC6 problems
went down from ~ one every 15 minutes to ~ one every 25 hours. So this is not
a complete solution, but I suspect there might be another, more difficult to
reproduce, problem. In any case it reduces the issue significantly, to the
point where we might be able to forget about it.

I measured the power usage on idle before/after this patch and saw no
difference. Obviously when the GPU load varies, it will consume more power
since it now takes more time to adapt.

Also note that not all machines seem to react equally. Some crash fairly
often, and some less often. So this will improve the situation to different
extents for different people.

BUG=chrome-os-partner:16886,chrome-os-partner:11474
TEST=ran the factory stress test (RunIn.Stress) on multiple Link machines for
TEST=about 100 hours, saw only 4 RC6 crashes.

Change-Id: Id4db166986d0e34d60e7d15ce8c7f601293111e2
Reviewed-on: https://gerrit.chromium.org/gerrit/42084
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42655

12 years agoCHROMIUM: xhci: crude USB resume fix for Stout (temporary)
Julius Werner [Thu, 31 Jan 2013 02:02:45 +0000 (18:02 -0800)]
CHROMIUM: xhci: crude USB resume fix for Stout (temporary)

Stout's USB 3.0 ports show a variety of nasty issues after resume, some
of which are more reproducible than others. They all have in common that
the host controller bails with "Device not responding to set address."
during enumeration. A trace pulled from a USB cable showed that the host
controller just fills the bus with garbage and does not even generate
correct SOF sequences.

This seems like a large and time-consuming problem that could hide
anywhere in the USB software or hardware stack. With Stout being close
to release, we need an interim solution to make it usable while we find
the underlying problem.

This patch sets the XHCI_RESET_ON_RESUME quirk flag on Stout, which
makes device reenumeration after resume work, but it creates a new
issue that makes the host controller hang on the next suspend while
trying to save its state. This looks like an unrelated hardware bug...
but since we don't actually need to save state when we will reset
anyway, we can just add some code to skip that step in xhci_suspend().

This patch is intended to be temporary, and should be reverted as soon
as the root cause for this is found and fixed.

BUG=chrome-os-partner:16781
TEST=Plug a USB device into the yellow port on the right. Run lsusb. Run
powerd_suspend and wake the machine. Run lsusb again and ensure that the
output stayed the same.

Original-Change-Id: Id21ab972c698d02c14937509f699c9bc659b70c0
Signed-off-by: Julius Werner <jwerner@chromium.org>
(cherry picked from commit 8b145d803ef366508c212072db0cd01718247241)

Applied without conflicts to R25. Tested on 3428.124.0 stout canary image.

Change-Id: I10bbe5414f1f52762ddd6a97e4231ab544b8e3b4
Reviewed-on: https://gerrit.chromium.org/gerrit/42541
Reviewed-by: Paul Taysom <taysom@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
Tested-by: Julius Werner <jwerner@chromium.org>
12 years agoCHERRY-PICK: UPSTREAM: /proc/pid/status: add "Seccomp" field
Kees Cook [Tue, 18 Dec 2012 00:03:14 +0000 (16:03 -0800)]
CHERRY-PICK: UPSTREAM: /proc/pid/status: add "Seccomp" field

It is currently impossible to examine the state of seccomp for a given
process.  While attaching with gdb and attempting "call
prctl(PR_GET_SECCOMP,...)" will work with some situations, it is not
reliable.  If the process is in seccomp mode 1, this query will kill the
process (prctl not allowed), if the process is in mode 2 with prctl not
allowed, it will similarly be killed, and in weird cases, if prctl is
filtered to return errno 0, it can look like seccomp is disabled.

When reviewing the state of running processes, there should be a way to
externally examine the seccomp mode.  ("Did this build of Chrome end up
using seccomp?" "Did my distro ship ssh with seccomp enabled?")

This adds the "Seccomp" line to /proc/$pid/status.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: James Morris <jmorris@namei.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from upstream commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41959
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
BUG=chromium-os:38441
TEST=link build, "Seccomp" field visible in "status" file

Change-Id: Iba02cd3323908bd2c761393ce3ccef3cc85f2bd6
(cherry picked from ToT commit 9283927e50378bb8bb2fbfc53b615b02d546f090)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42411
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
12 years agoCHERRY-PICK: Revert "HACK: arm: exynos: Force 0.8x instead of bypass for VDD_INT"
Doug Anderson [Fri, 25 Jan 2013 22:27:01 +0000 (14:27 -0800)]
CHERRY-PICK: Revert "HACK: arm: exynos: Force 0.8x instead of bypass for VDD_INT"

This reverts commit 466db2af679e46c5ab65c53e38b802a1e4ae3351.

BUG=chrome-os-partner:17442
TEST=With future CL to fix root cause, verify that suspend/resume
work.

Change-Id: Ief4ef599ccc44601ce1bc6aa23c588090bf6b088
Original-Change-Id:  Ic48ee710b623d72670db965700c215dfe280d6ea
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit e40c7e68a8622b04fe76f1d9759252de6209bbf4)

Reviewed-on: https://gerrit.chromium.org/gerrit/42239

12 years agoCHERRY-PICK: arm: exynos: Fix the ISP Power down sequence
Doug Anderson [Sat, 26 Jan 2013 00:01:00 +0000 (16:01 -0800)]
CHERRY-PICK: arm: exynos: Fix the ISP Power down sequence

This totally moves the ISP power down configuration to its own
function so we can make sure power sequencing is exactly as the
Samsung HW team suggests.  At the moment we're not using the ISP for
anything, so this should be fine.

Following is the suggested power down sequence for ISP:
- 0x10042288 --> 0x10000 (ISP A5 Disable WFE)
- 0x10042280 --> 0x0 (ISP A5 Power Off)
- 0x10041584 --> 0x0 (SYS_PWR_CFG off for CMU_RESET_ISP)
- 0x10044020 --> 0x0 (ISP Block Power Off)

Before this patch our order looks more like:
- 0x10044020 --> 0x0 (ISP Block Power Off)
- 0x10042280 --> 0x0 (ISP A5 Power Off)
- 0x10042288 --> 0x0 (ISP A5 Disable WFI / WFE)
- 0x10041584 --> 0x0 (SYS_PWR_CFG off for CMU_RESET_ISP)

We now match the suggested order except that we actually write
0x10042288 as 0x0 to disable WFE and WFI.  This matches what was set
to the register before this patch and has been OKed by the Samsung LSI
hardware team.

BUG=chrome-os-partner:15327
BUG=chrome-os-partner:17442
TEST=Revert 0.8 ABB (see Ic48ee710b623d72670db965700c215dfe280d6ea)
and then use suspend_at_boot.conf script from chrome-os-partner:15327
comment #71 to test on a device that had suspend/resume problems
without this.

Change-Id: I3ce50683e50dabd42d49d5c3d33c36dd1d24dced
Original-Change-Id:  Ia3bb141a6c94a6b3656944b6b3a2f1e0645adf8d
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 2b3c6353074a62f8b58e6abd53f9821aaa391b32)

Reviewed-on: https://gerrit.chromium.org/gerrit/42238

12 years agoCHERRY-PICK: UPSTREAM: SCSI & usb-storage: add try_rc_10_first flag
Shawn Nematbakhsh [Thu, 24 Jan 2013 05:18:06 +0000 (21:18 -0800)]
CHERRY-PICK: UPSTREAM: SCSI & usb-storage: add try_rc_10_first flag

Several bug reports have been received recently for USB mass-storage
devices that don't handle READ CAPACITY(16) commands properly.  They
report bogus sizes, in some cases becoming unusable as a result.

The bugs were triggered by commit
09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI & usb-storage: add
flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
overriding the SCSI level reported by devices.  By default, the sd
driver will try READ CAPACITY(16) first for any device whose level is
above SCSI_SPC_2.

It seems likely that any device large enough to require the use of
READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
CAPACITY(10) commands properly.  Indeed, I don't know of any devices
that don't handle READ CAPACITY(10) properly.

Therefore this patch (as1559) adds a new flag telling the sd driver
to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
for every USB mass-storage device.  If a device really is larger than
2 TB, sd will fall back to READ CAPACITY(16) just as it used to.

This fixes Bugzilla #43391.

BUG=chrome-os-partner:16619
TEST=Manual. Build recovery image on previously failing USB disk, verify
recovery install on generic x86 platform.

Change-Id: I0ab1718a573076caa8a3433791371245a8b9c656
Original-Change-Id: I82899c04e2f2b65292a8f55505b347a2b72f8f6e
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Hans de Goede <hdegoede@redhat.com>
CC: "James E.J. Bottomley" <JBottomley@parallels.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41913
Reviewed-on: https://gerrit.chromium.org/gerrit/42229
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
12 years agoCHERRY-PICK: Revert "BACKPORT: r8169: enable internal ASPM..."
Shawn Nematbakhsh [Tue, 15 Jan 2013 17:50:29 +0000 (09:50 -0800)]
CHERRY-PICK: Revert "BACKPORT: r8169: enable internal ASPM..."

This reverts commit d6a3750eef2e494e2f78160c5f8b37a7d810bff7.

The original change had the undesired side-effect of delaying link
status detection, and no acceptable solution was found.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
BUG=chrome-os-partner:16247.
TEST=manual. Test ethernet plug/unplug, verify no delay in link status
detect.

Change-Id: I8f52e0fc315fb413c70d48f1fa7e6fd2b98322a8
Original-Change-Id: I7b7c312a47d065fd25c61949f71436cfe6cbc985
Reviewed-on: https://gerrit.chromium.org/gerrit/41287
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42191

12 years agoRevert "PM / Sleep: Mitigate race between the freezer and request_firmware()"
Sonny Rao [Fri, 25 Jan 2013 23:31:17 +0000 (15:31 -0800)]
Revert "PM / Sleep: Mitigate race between the freezer and request_firmware()"

This reverts commit 247bc03742545fec2f79939a3b9f738392a0f7b4.

This patch caused a deadlock between khubd and the suspend process.
This was reliably reproducible when we did a suspend immediately after
a resume, and the khubd kernel thread was busy probing USB devices.

The sequence was that khubd would be running and probing USB devices
when we try to suspend and the freezer would activate, and eventually
khubd would call request_firmware() while holding a device lock, and
request_firmware would call usermodehelper_read_trylock().
Because the UMH is in state UMH_FREEZING, usermode_helper_read_trylock
would end up calling try_to_freeze() and would then be frozen while
holding a device lock.  After the freezer finished, it would then try
to suspend each device and would deadlock on the USB hub device that
was being held by khubd.

Reverting this merely results in a WARN_ON from request_firmware() and
no deadlock, and upon the subsequent resume, khubd will successfully
get the firmware and the devices work correctly.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chrome-os-partner:17270
TEST=(needs an autotest test) currently manual:
use the set_short_powerd_timeouts script to all the device to
idle-suspend quickly, wait for an idle suspend with the lid open
(about 30  seconds). Then hit the trackpad and quickly close the lid.
The device should resume and then suspend again within a few seconds.

Change-Id: Idfc5d40f0f1cc88ca335502454bf675f152df477
Reviewed-on: https://gerrit.chromium.org/gerrit/42228
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts - Set T9 in mxt_resume based on lid state
Benson Leung [Mon, 28 Jan 2013 23:26:25 +0000 (15:26 -0800)]
CHROMIUM: Input: atmel_mxt_ts - Set T9 in mxt_resume based on lid state

This is an x86 specific change for the short term.
When the lid is closed on resume, make sure T9 is disabled.
to prevent the lid from affecting the touch device and causing
stray touches. If lid is open, restore operational settings for T9.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17465
TEST=Close the lid to suspend in guest mode.
Open the lid slowly, until you see the lights indicating resuming.
Close the lid immediately upon seeing the system resume from
the status light.
The system should stay in S0. Check via ssh:
cat /sys/kernel/debug/atmel_mxt_ts/2-004a/object
Check that T9 is 0x00.
On a normal suspend/resume, where the lid is opened,
check that touch device is functional.

Change-Id: I8b671c5926f510228af6327985b2c6717d226c1a
Reviewed-on: https://gerrit.chromium.org/gerrit/42184
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42214
Reviewed-by: Danielle Drew <ddrew@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts - Disable T9 on mxt_stop
Benson Leung [Mon, 28 Jan 2013 23:31:26 +0000 (15:31 -0800)]
CHROMIUM: Input: atmel_mxt_ts - Disable T9 on mxt_stop

Instead of using 0x81 to keep the object enabled,
disable T9 on mxt_stop by writing 0x00 to it.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17465
TEST=stop powerd (on R25 also stop powerm)
close the lid, or use a magnet to trigger the lid sensor.
cat /sys/kernel/debug/atmel_mxt_ts/2-004a/object
Look for Type: 9, byte 0. Check that this is 0x00
when lid is closed. When opened, this should return
to 0x83.

Change-Id: I87e9e13567bba7c0993e4c1ceec12f98fbe2f8ac
Reviewed-on: https://gerrit.chromium.org/gerrit/42183
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42213
Reviewed-by: Danielle Drew <ddrew@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts - mxt_stop on lid close
Benson Leung [Sat, 26 Jan 2013 01:45:56 +0000 (17:45 -0800)]
CHROMIUM: Input: atmel_mxt_ts - mxt_stop on lid close

This is an x86 specific change for the short term.
When the lid is closed, issue an mxt_stop to turn off scanning
to prevent the lid from affecting the touch device and causing
stray touches.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17465
TEST=From test mode, run evtest, and watch the atmel_mxt device.
Close and open the lid. Make sure there are no touch data comes
from the atmel driver when the lid is being closed.

Change-Id: Ic022b6f44feaa309eb13f677f69809d6ef3f9b91
Reviewed-on: https://gerrit.chromium.org/gerrit/42080
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42212
Reviewed-by: Danielle Drew <ddrew@chromium.org>
12 years agoCHROMIUM: ALSA: hda/ca0132 - configure DMIC gain block.
Chee Kin Cheong [Wed, 23 Jan 2013 12:44:28 +0000 (04:44 -0800)]
CHROMIUM: ALSA: hda/ca0132 - configure DMIC gain block.

Configure the DMIC input gain block when switching to use DMIC.  This
provides 20dB of additional input gain when using the built-in digital
microphone.

This should be changed to export a control to user-space, but keep it
simple for the R25 release.

BUG=chrome-os-partner:16865
TEST=arecord a reference signal and check that there is now 20dB of
gain applied.  Hangout and check that the participant on the other
side can hear you.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I2a748f5774e50e513b1107fc3119641aa227453b
Reviewed-on: https://gerrit.chromium.org/gerrit/41816
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
(cherry picked from commit f750359e101d20f00cf1504f75d1df3c2d9b28d0)
Reviewed-on: https://gerrit.chromium.org/gerrit/42134

12 years agoCHERRY-PICK: CHROMIUM: drm/exynos: dp: Add force_connected flag
Sean Paul [Fri, 25 Jan 2013 22:09:04 +0000 (17:09 -0500)]
CHERRY-PICK: CHROMIUM: drm/exynos: dp: Add force_connected flag

Add a new flag to the DisplayPort platform data to optionally force
is_connected to return true. This is useful for cases such as ours where
we don't have a proper DP monitor connected, but rather a noisy bridge
that doesn't know when it's actually ready to assert hotplug.

This will also prevent drm from assuming we're disconnected and detaching
our encoder from the connector (thus losing us forever as a result of
the interrupt scheme in the driver, which needs to be fixed).

BUG=chromium-os:38006
TEST=Tested manually using Doug's reproduction instructions in c17 on the bug

Change-Id: I5d71248ca8e4506cdae09f55b331a2582deb7267
Original-Change-Id:  If2034458d9de93259e92a0f3eb8f386c340b0d7d
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
(cherry picked from commit 657dd039a241ae12510fe126329ac9f03aec4bbe)

Reviewed-on: https://gerrit.chromium.org/gerrit/42144
Commit-Queue: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
12 years agoCHERRY-PICK: HACK: arm: exynos: Force 0.8x instead of bypass for VDD_INT
Abhilash Kesavan [Fri, 18 Jan 2013 06:47:43 +0000 (12:17 +0530)]
CHERRY-PICK: HACK: arm: exynos: Force 0.8x instead of bypass for VDD_INT

Increase the INT voltage margins for all speed groups. According to
the h/w guys at Samsung this is fine except for a power increase.  At
the moment this is considered an interrim (but safe) fix while Samsung
looks for a root cause.

Side notes:
* ABB 1.0x appears to work better than bypass (which makes no sense)
  but still doesn't work as well as ABB 0.8x (this patch).
* ABB 1.2x also appears to work.  It ran 690 cycles of the test below
  before I stopped it.
* Leaving ABB off and increasing VDD_INT also appears to work to some
  extent, but not as well as this patch.

BUG=chrome-os-partner:15327
TEST=Run the following test on a device that fails 100% without
  this patch:
  1. Reboot
  2. suspend_stress_test -c5 --backup_rtc
  3. Goto step 1
  With this patch I went through 728 cycles of the above with no
  hangs at suspend.  Testing was done via an init script that is
  attached at comment #71 of the referenced bug.
TEST=Run the above test on several devices that have no problems
  without this patch.  Confirm that this patch doesn't introduce
  additional suspend/resume problems.
TEST=General stability testing should be performed.

Change-Id: Ibe26b8e6805d7206b3d98ae2a72704ef9633eeb3
Original-Change-Id:  I5925ace16e7bc00207f2218c4ccb4cc6453ec44a
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 466db2af679e46c5ab65c53e38b802a1e4ae3351)

Reviewed-on: https://gerrit.chromium.org/gerrit/41958
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts : Set power/wakeup to disabled by default.
Benson Leung [Sat, 19 Jan 2013 01:35:52 +0000 (17:35 -0800)]
CHROMIUM: Input: atmel_mxt_ts : Set power/wakeup to disabled by default.

Userspace will change it to enabled if needed.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17336
TEST=cat /sys/bus/i2c/devices/2-004a/power/wakeup
Check that it returns "disabled"
Suspend the system using powerd_suspend.
Check that the touch device 2-004a does not wake the system.

Reviewed-on: https://gerrit.chromium.org/gerrit/41679
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
(cherry picked from commit 6625e780bacf270b6da346751819d2825f09c20a)

Change-Id: I99fe9106c47a0fca765ead7478c8f9d7bfb251e9
Reviewed-on: https://gerrit.chromium.org/gerrit/41686
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts : On Tpads, enable T42, disable T19 on suspend
Benson Leung [Sat, 19 Jan 2013 01:35:19 +0000 (17:35 -0800)]
CHROMIUM: Input: atmel_mxt_ts : On Tpads, enable T42, disable T19 on suspend

To work around an issue where an idle-suspended system may wake
unnecessarily when the lid is closed because the B panel comes close to
the trackpad, enable touch suppression (t42) when suspending. Also
disable T19, for the button, to allow the button to be pressed if
the case is flexed without the system waking.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17336
TEST=1. Suspend the system with powerd_suspend with lid open.
2. Touch the touchpad. Make sure the system still wakes.
3. Suspend again with powerd_suspend
4. Close the lid. Ensure the system does not wake by observing the system
status light.

Reviewed-on: https://gerrit.chromium.org/gerrit/41678
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
(cherry picked from commit 6988c8d813d863007df2ba3f418172d07b63ece6)

Change-Id: I5e56d3846b491cb292e0fc00905048c2726bf412
Reviewed-on: https://gerrit.chromium.org/gerrit/41685
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: ALSA: hda/ca0132 - log all chip io errors.
Dylan Reid [Wed, 19 Dec 2012 18:34:34 +0000 (10:34 -0800)]
CHROMIUM: ALSA: hda/ca0132 - log all chip io errors.

Any time that a transaction with the chip times out log it as an error.

BUG=chrome-os-partner:14465
TEST=none.

Change-Id: I5b08a9c64d3ae8d48107b193604c6c751bf67499
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39982
(cherry picked from commit eb5fb55122a5d725217a6d34bcae91bacaa53958)
Reviewed-on: https://gerrit.chromium.org/gerrit/41581

12 years agoCHROMIUM: ALSA: ASoC: max98095 - disable analog inputs to speaker mux.
Dylan Reid [Thu, 17 Jan 2013 04:29:23 +0000 (20:29 -0800)]
CHROMIUM: ALSA: ASoC: max98095 - disable analog inputs to speaker mux.

ChromeOS only ever uses the DAC1 input, and routing the analog inputs
can be harmful (since they are actually DMIC inputs on Lucas).

BUG=chromium-os:37217
TEST=in dev mode run alsamixer and check available Speaker mux inputs.

Change-Id: I77c5b2a829e8c63035ac8006fa8eca722ed50dd0
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41510
Reviewed-by: Evan Ragsdale <evan.ragsdale@maximintegrated.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit f26950bc5125103403fc3e438c769bc7160e6976)
Reviewed-on: https://gerrit.chromium.org/gerrit/41565

12 years agodrm/i915: Honor i915_min_freq post resume
Sameer Nanda [Wed, 16 Jan 2013 22:27:37 +0000 (14:27 -0800)]
drm/i915: Honor i915_min_freq post resume

The i915_min_freq setting was not getting honored on the resume path.
Fixed it.

BUG=chrome-os-partner:16439
TEST="cat /sys/kernel/debug/dri/0/i915_min_freq" and remember the value
returned. Do a suspend/resume cycle. cat the i915_min_freq file again,
it must return the same value as read earlier.

Original-Change-Id: Ie3cc8e8794a59c154b511e24e468daef94a44765
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41461
(cherry picked from commit b57da6083079196f955b8217517afd0e1e4a0e21)

Change-Id: I608349c9f7983c24bafa0f9883384cd7c6545f83
Reviewed-on: https://gerrit.chromium.org/gerrit/41572
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Sameer Nanda <snanda@chromium.org>
Tested-by: Sameer Nanda <snanda@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts: Use correct max touch_major in mxt_release_all_fingers()
Yufeng Shen [Thu, 10 Jan 2013 20:00:42 +0000 (15:00 -0500)]
CHROMIUM: Input: atmel_mxt_ts: Use correct max touch_major in mxt_release_all_fingers()

We hard-coded the maximal touch_major value to be 255 in mxt_release_all_fingers().
Fixing this by using the queried actual maximal touch_major value.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chrome-os-partner:17176
TEST=1. Run evtest on the touch device
     2. Keep touching the device while closing the lid.
     3. Release the touch after the system suspends.
     4. Open the lid to resume the system
     5. Check evtest result and see that there is release events with correct
        touch major value.

Change-Id: I4c3bbb37c25c0df67c752a8b6943f6c127f01aa7
Reviewed-on: https://gerrit.chromium.org/gerrit/41031
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41567
Reviewed-by: Yufeng Shen <miletus@chromium.org>
12 years agoRevert "CHROMIUMOS: mwifiex: Disable transmit aggregation"
Paul Stewart [Wed, 16 Jan 2013 23:00:17 +0000 (15:00 -0800)]
Revert "CHROMIUMOS: mwifiex: Disable transmit aggregation"

New firmware fixes this issue, so this change is no longer necessary.

This reverts commit 6fcfecca9575848120e8c9e35b3ad848b1e85f29

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:16279
TEST=Associate with Android AP

Change-Id: Id20b77139ae2b07139ea1fde01446810d404f0d1
Reviewed-on: https://gerrit.chromium.org/gerrit/41469
Commit-Queue: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
12 years agoCHROMIUM: Input: atmel_mxt_ts - Add support for T65, Lensbending Correction
Benson Leung [Thu, 10 Jan 2013 01:30:44 +0000 (17:30 -0800)]
CHROMIUM: Input: atmel_mxt_ts - Add support for T65, Lensbending Correction

Add T65 object to list of supported objects, and mark it readable
and writable.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17253
TEST=cat /sys/kernel/debug/atmel_mxt_ts/2-004a/object
Check that the following object appears:
Type: 65
[ 0]: 00 (0)
[ 1]: 00 (0)
[ 2]: 00 (0)
[ 3]: 00 (0)
[ 4]: 00 (0)
[ 5]: 00 (0)
[ 6]: 00 (0)
[ 7]: 00 (0)
[ 8]: 00 (0)
[ 9]: 00 (0)
[10]: 00 (0)
[11]: 00 (0)
[12]: 00 (0)
[13]: 00 (0)
[14]: 00 (0)
[15]: 00 (0)
[16]: 00 (0)

Reviewed-on: https://gerrit.chromium.org/gerrit/41310
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
(cherry picked from commit 5fd7e4778bd22252de5611a894d061a3bb64c4a2)

Change-Id: I81091cf58b41fccf9d12891114cacef47611b390
Reviewed-on: https://gerrit.chromium.org/gerrit/41423
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: ALSA: hda/ca0132 - Add thorough codec init.
Chee Kin Cheong [Wed, 19 Dec 2012 16:49:06 +0000 (08:49 -0800)]
CHROMIUM: ALSA: hda/ca0132 - Add thorough codec init.

During ca0132_init, check that the codec is ready and if not, reset
and re-initialize.

BUG=chrome-os-partner:14465
TEST=suspend/resume and play youtube.

Change-Id: I70a406042cfb8af80e9d0835d136be2df33f5b28
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39981
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
(cherry picked from commit 63ce7c56ac8a9dc1135140726f218d22232a5451)
Reviewed-on: https://gerrit.chromium.org/gerrit/41072

12 years agoCHERRY-PICK: exynos5: asv: Call the core ASV code early
Abhilash Kesavan [Fri, 21 Dec 2012 04:14:39 +0000 (09:44 +0530)]
CHERRY-PICK: exynos5: asv: Call the core ASV code early

Change the priority of ASV code initialization. The core ASV code
finds the speed group, lot id and exposes it to various consumer
drivers like busfreq, G3D and CPUfreq. Among these, the G3D driver
is getting called before the core code and thus is always getting
the ASV speed group as 0. Fix this by calling the core ASV early.

BUG=chrome-os-partner:16796
TEST=Checked that G3D, ARM and INT drivers are all getting the same
ASV group on 2 different boards (1 MP and 1 PVT). Also, verified that
the voltages match that speed group.

Change-Id: Ib2ba155cdd968f7ca74d122d6716fb0a9a228c99
Original-Change-Id:  I1ca234a770bbd8b2d590a83377ee44527327066b
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 0947da07a809fe38b056ca0618a071cbb198a0e9)

Reviewed-on: https://gerrit.chromium.org/gerrit/40952
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHERRY-PICK: arm: exynos: Enable CHIP ID clock
Abhilash Kesavan [Fri, 14 Dec 2012 06:02:19 +0000 (11:32 +0530)]
CHERRY-PICK: arm: exynos: Enable CHIP ID clock

The bootloader may gate the CLK_CHIPID_APBIF which will cause
an invalid value to be read for the Package ID in ASV. Explicitly
enable the clock in the ASV driver.

BUG=chrome-os-partner:16796
TEST=Boot 5 different snows to the login screen. Verify that the clock
is enabled and the appropriate speed group is being selected. Do a few
suspend/resume cycles with reboots.

Change-Id: Id5a0ec599c7aedc9ae98297fbc035fce887c8bd5
Original-Change-Id:  Ib094b748301b7e882a50ae056bd9f0f795c133e5
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit eeb5bd2fd266d9980fa4ee73be4c37ff732f0f3b)

Reviewed-on: https://gerrit.chromium.org/gerrit/40951
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHERRY-PICK: arm: exynos: Use MIF ASV group
Doug Anderson [Fri, 14 Dec 2012 19:21:12 +0000 (11:21 -0800)]
CHERRY-PICK: arm: exynos: Use MIF ASV group

The original code doesn't use the MIF ASV group.  Add code to read it.

There are 2 ASV groups for the fused chips ASV0 at 1.05V and ASV1 at
1V. For the non-fused chips the MIF voltage remains at 1V.

BUG=chrome-os-partner:16820
TEST=Verified that we never change MIF voltage, so this doesn't affect
us right now.
TEST=Saw printout about MIF ASV group at bootup.

Change-Id: Ifaf5d2437a7a24964ed5eae2be6704e95d7b7f29
Original-Change-Id:  Ia264991c11469a22a986c385a03b2a0478fb237f
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
(cherry picked from commit abb563d27cc5be426dcfd1467a52b7c029d46345)

Reviewed-on: https://gerrit.chromium.org/gerrit/40950
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agodrm/i915: Make intel_dp_aux_native_read timeout
Stéphane Marchesin [Tue, 18 Dec 2012 22:08:16 +0000 (14:08 -0800)]
drm/i915: Make intel_dp_aux_native_read timeout

Some adapters return DEFER indefinitely, which results in being stuck in the
kernel, which triggers the watchdog, which reboots. To avoid this, limit to
100 tries, after which we return an error and pring a message.

BUG=chrome-os-partner:15612
TEST=by hand, use the apple miniDP to dual-link adapter, plug a 30 inch
TEST=monitor, the machine shouldn't reboot spontaneously (the monitor still
TEST=won't work, but that is a separate bug).

Change-Id: I842f6edd0da3b67eab8613410bf61474fc40ba7a
Reviewed-on: https://gerrit.chromium.org/gerrit/39888
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>

12 years agoarm: exynos: Don't force ASV group 0 to ASV group 1
Doug Anderson [Fri, 14 Dec 2012 19:21:12 +0000 (11:21 -0800)]
arm: exynos: Don't force ASV group 0 to ASV group 1

The old ASV code had a bug where it would never use group 0.  That
makes sense for the "original" table, but not for the new table and
not for any fused values.

BUG=chrome-os-partner:16820
TEST=Test across a wide variety of devices

Change-Id: Ifc44ed51c9d6f2effee4f0134160f74c320f4335
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39711
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
12 years agoarm: exynos: Call ABB code when using a fused speed group
Doug Anderson [Fri, 14 Dec 2012 21:19:04 +0000 (13:19 -0800)]
arm: exynos: Call ABB code when using a fused speed group

The previous checkin titled "Add Adaptive Body Bias Control for
exynos5" only added ABB when not using a fused speed group.  Fix it to
also use ABB when using a non-fused speed group.

BUG=chrome-os-partner:16820
TEST=Test this plus the CHIP_ID patch on a wide variety of devices,
including those that had suspend/resume problems.

Change-Id: Ib08a6729488fc3eb97cc102f01138fea914eb8ce
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39714
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
12 years agoCHROMIUM: Input: cyapa - Allow filename to be changed in update_fw
Benson Leung [Sun, 16 Dec 2012 00:29:51 +0000 (16:29 -0800)]
CHROMIUM: Input: cyapa - Allow filename to be changed in update_fw

Allow the name of the designated firmware to be passed as the
argument to update_fw from user space. This will allow user space
to specify which firmware to load.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:36911,chromium-os:37150
TEST=Make sure you are using chromeos-touch-firmware-daisy-2.4-r2
which contains firmware 2.4 stable, but 3 trial firmwares linked
from /lib/firmware/cyapa.bin-trial[1-3]
Check by manually issuing the command from user space:
1. echo -n cyapa.bin-trial1 > /sys/bus/i2c/devices/1-0067/update_fw
2. cat /sys/bus/i2c/devices/1-0067/firmware_version
3. double check that that returns 2.7
4. echo -n cyapa.bin-trial3 > /sys/bus/i2c/devices/1-0067/update_fw
5. cat /sys/bus/i2c/devices/1-0067/firmware_version
6. double check that that returns 2.9
7. echo -n cyapa.bin > /sys/bus/i2c/devices/1-0067/update_fw
8. cat /sys/bus/i2c/devices/1-0067/firmware_version
9. Check that that returns 2.4

Change-Id: Id51b8ae6439ac822d8c77a96aee43a1c6f67cf1b
Reviewed-on: https://gerrit.chromium.org/gerrit/39839
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it
Sonny Rao [Fri, 14 Dec 2012 22:48:30 +0000 (14:48 -0800)]
CHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it

The cpu_thermal generic thermal management code has a bug where once
max cpu frequency has been lowered in sysfs (scaling_max_freq) it is
not possible to raise the max back up later.  The bug is that the
notifer gets called by __cpufreq_set_policy() before the user policy
max is raised, and is incorrectly trying to enforce the max frequency
policy even when we are trying to change the policy.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chromium-os:36435
TEST=kernel_CpufreqMinMax

Change-Id: I12ad4ef5aad544333cad4a9ff1e81f04d1cfa5e8
Reviewed-on: https://gerrit.chromium.org/gerrit/39793
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
12 years agoCHROMIUM: usb: add VID/PID of Novatel Wireless Gobi 3000 E396U modem
Ben Chan [Fri, 14 Dec 2012 23:58:18 +0000 (15:58 -0800)]
CHROMIUM: usb: add VID/PID of Novatel Wireless Gobi 3000 E396U modem

BUG=chrome-os-partner:16830
TEST=`emerge-daisy chromeos-kernel`

Change-Id: I85dffdf4f4096aca98e2431555e65597205cf78a
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39763
Reviewed-by: Sameer Nanda <snanda@chromium.org>
12 years agoCHROMIUM: ALSA:hda/ca0132 - initialize AEC level.
Dylan Reid [Wed, 12 Dec 2012 18:53:21 +0000 (10:53 -0800)]
CHROMIUM: ALSA:hda/ca0132 - initialize AEC level.

Set the AEC level to max during init.  After testing with various
levels, the maximum value proved to work the best.

BUG=chrome-os-partner:13065
TEST=hangout, listen for echo.

Change-Id: I237b9af5f9e0f8de7331d96f40e1fc5eb6379f79
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39593
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
12 years agoCHROMIUM: rts_pstor: fix formatting, writing, copying failures with
agnescheng [Thu, 13 Dec 2012 08:44:05 +0000 (16:44 +0800)]
CHROMIUM: rts_pstor: fix formatting, writing, copying failures with
specific SDSDB cards.

Patch from Realtek to correct init option for specific SD cards -
Realtek found those cards cannot be successfully written (read is OK)
because current mount option causes writes(maybe to update the access time) when read.

TEST=insert SDSDB/SDSC card, format and cannot copy files to the card.

BUG=chrome-os-partner:15774

Signed-off-by: Agnes Cheng <agnescheng@chromium.org>
Change-Id: I194db3ce22107208e103dafc3fa9dae3db33d087
Reviewed-on: https://gerrit.chromium.org/gerrit/39646
Commit-Ready: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
12 years agoCHROMIUM: MALI: fix sysfs memory file
Mandeep Singh Baines [Tue, 13 Nov 2012 00:55:32 +0000 (16:55 -0800)]
CHROMIUM: MALI: fix sysfs memory file

The sysfs file which reports memory was broken by the recent
update go wk45.

BUG=chromium-os:36060,chrome-os-partner:16814
TEST=Verified that the sysfs file now reports the correct data

localhost ~ # cat /sys/devices/platform/mali.0/memory
57143296 bytes
localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/devices/platform/mali.0/memory
28672 bytes
localhost ~ # start ui
ui start/running, process 4791
localhost ~ # cat /sys/devices/platform/mali.0/memory
51875840 bytes
localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/devices/platform/mali.0/memory
28672 bytes

Change-Id: I6df9bf70028ac0bc18fe993242c65dc87c430fd2
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39730
Reviewed-by: Anush Elangovan <anush@google.com>
12 years agoCHROMIUM: atkbd: Fix scancode handling on reconnect / resume from suspend.
Shawn Nematbakhsh [Fri, 14 Dec 2012 03:28:02 +0000 (19:28 -0800)]
CHROMIUM: atkbd: Fix scancode handling on reconnect / resume from suspend.

On resume from suspend there is a possibility for multi-byte scancodes
to be handled incorrectly. atkbd_reconnect disables the processing of
scancodes in software by calling atkbd_disable, but the keyboard may
still be active because no disconnect command was sent. Later, software
handling is re-enabled. If a multi-byte scancode sent from the keyboard
straddles the re-enable, only the latter byte(s) will be handled.

In practice, this leads to cases where multi-byte break codes (ex. "e0
4d" - break code for right-arrow) are misread as make codes ("4d" - make
code for numeric 6), leading to one or more unwanted, untyped characters
being interpreted.

The solution implemented here involves sending command f5 (reset
disable) to the keyboard prior to disabling software handling of codes.
Later, the command to re-enable the keyboard is sent only after we are
prepared to handle scancodes.

TEST=spam right/left arrow keys during resume for many iterations,
verify that no phantom characters are seen.
BUG=chrome-os-partner:16605

Change-Id: Ieba1e42398c2f4f6a1623afa3ed82903dc393045
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39690
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
12 years agoarm: exynos: Fix potential buffer overrun in printk with asv
Doug Anderson [Fri, 14 Dec 2012 16:56:34 +0000 (08:56 -0800)]
arm: exynos: Fix potential buffer overrun in printk with asv

The asv code stores 5 characters in in a 5-byte array.  It properly
compares against this with strncmp, but then goes and passes the
character array to printk() which could read off the end.

Terminate the array properly, then go ahead and promote the printout
to print all the details we have every time.

BUG=chrome-os-partner:16820
TEST=Boot and see message printed out.

Change-Id: I8fb7044a8e14c6ce43d8866be2eee5ca167addbb
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39710
Reviewed-by: Bryan Freed <bfreed@chromium.org>
12 years agoMALI: Allow kbase to cancel a lock before it is acquired
Ray Smith [Tue, 20 Nov 2012 12:53:23 +0000 (12:53 +0000)]
MALI: Allow kbase to cancel a lock before it is acquired

This is based on Ib42b8e5c8039fd5f900885f097418b87d9614225,
most of which has been integrated into the wk45 release but
this particular commit is to account for local changes to
KDS in this repo.

BUG=chrome-os-partner:12480
TEST=Boot snow

Change-Id: I2092f4ec50f300e325a2cc54967b62dcb040fbd5
Reviewed-on: https://gerrit.chromium.org/gerrit/38389
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Anush Elangovan <anush@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
Commit-Ready: Anush Elangovan <anush@chromium.org>

12 years agoMALI: Update to wk45 r1p2-06bet0 release
Ray Smith [Tue, 20 Nov 2012 11:57:34 +0000 (11:57 +0000)]
MALI: Update to wk45 r1p2-06bet0 release

Change-Id: I9c50a50150c2c7de5265b72ee5adb8f4d561de35
Reviewed-on: https://gerrit.chromium.org/gerrit/38388
Reviewed-by: Gabriele Paoloni <gabriele.paoloni@arm.com>
Tested-by: Anush Elangovan <anush@chromium.org>
Reviewed-by: Anush Elangovan <anush@chromium.org>
Commit-Ready: Anush Elangovan <anush@chromium.org>

12 years agoCHROMIUM: gobi: Take clients_lock in qc_deregister
Michael Spang [Wed, 14 Nov 2012 22:51:39 +0000 (17:51 -0500)]
CHROMIUM: gobi: Take clients_lock in qc_deregister

It is not legal to access the clients list without taking
clients_lock. This change makes qc_deregister take the lock while
finding new clients to free.

This fixes a crash when qc_deregister races devqmi_release.

BUG=chrome-os-partner:15854
TEST=suspend_stress_test

Change-Id: I7c0c4c8dcb6b09c6a4414ee3e5878c56d5788d00
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38066
Reviewed-by: Ben Chan <benchan@chromium.org>
12 years agoHID: multitouch: Add advanced silicon cooltouch controllers
Dave Parker [Wed, 12 Dec 2012 01:32:12 +0000 (17:32 -0800)]
HID: multitouch: Add advanced silicon cooltouch controllers

BUG=None
TEST=Boot kernel on machine with cooltouch controller attached.
Verify hid_multitouch module is loaded for the USB device.

Change-Id: I89c6e29ae7696ed23ca44fb45076d888584e1a05
Signed-off-by: Dave Parker <dparker@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39576
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoHID: multitouch: Add support for Atmel maXTouch 03eb:8417
Dave Parker [Wed, 12 Dec 2012 20:52:08 +0000 (12:52 -0800)]
HID: multitouch: Add support for Atmel maXTouch 03eb:8417

BUG=None
TEST=Boot kernel on machine with atmel controller attached.
Verify usb_multitouch module is loaded for the device.

Change-Id: Ia975a44626dec6c87b72de2c115eb7fa2bb1a9f2
Signed-off-by: Dave Parker <dparker@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39600
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: sysrq: add ability for sysrq-x to signal chrome/X
Sonny Rao [Mon, 10 Dec 2012 19:06:02 +0000 (11:06 -0800)]
CHROMIUM: sysrq: add ability for sysrq-x to signal chrome/X

Because we weren't getting reports of actual kernel issues, and
we've already trained some users to hit sysrq-x when the system
appears to freeze, we decided to have sysrq-x try a few other things
in addition to crashing the kernel.  For the first keypress it will
try to find the Chrome browser process, by looking for the one which
has the  session_manager as a parent, and send a SIGABRT to that.  If
there is a second sysrq-x within 5 seconds, it will send a SIGABRT to
the X process, and if there's a third then it will crash the kernel as
before.

BUG=chromium-os:36901
TEST=manual (debugging feature):
 hold down alt-volup then x - chrome should crash
 repeat immediately afterward - session should restart
 repeat and machine should reboot

Change-Id: I127256b7777aee4a4d84a958f2c061d7b6de318b
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39527
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: drm/exynos: fbdev: Offset is always zero
Daniel Kurtz [Mon, 10 Dec 2012 07:34:24 +0000 (15:34 +0800)]
CHROMIUM: drm/exynos: fbdev: Offset is always zero

A freshly filled fb_info will always have .xoffset and .yoffset = 0.
So, computing an offset during during fbdev_update is not necessary,
since it is only called in the fbdev_probe/fbdev_create path.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test; manual check fbdev created and shows chromeball at boot

Change-Id: I648e16200cf3840a69e59a8f8d4dea69541c9cf7
Reviewed-on: https://gerrit.chromium.org/gerrit/39479
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: fb: Cleanup exynos_drm_fb_init
Daniel Kurtz [Mon, 10 Dec 2012 06:35:28 +0000 (14:35 +0800)]
CHROMIUM: drm/exynos: fb: Cleanup exynos_drm_fb_init

Return a pointer to an exynos_drm_fb instead of its drm_framebuffer field.
This seems more logical.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test

Change-Id: I990e186ca09769b725de3d10e5b20ae34470a322
Reviewed-on: https://gerrit.chromium.org/gerrit/39478
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: fb: exynos_drm_fb functions take an exynos_drm_fb
Daniel Kurtz [Mon, 10 Dec 2012 06:12:55 +0000 (14:12 +0800)]
CHROMIUM: drm/exynos: fb: exynos_drm_fb functions take an exynos_drm_fb

This is a simple refactoring that reduces some casting, and hopefully
reduces some of the driver's layer violations.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test

Change-Id: I2089215c2dc6fbbc6850126504114d1fe3b00401
Reviewed-on: https://gerrit.chromium.org/gerrit/39477
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: exynos: acquire/release for GEM objects
John Sheu [Wed, 7 Nov 2012 00:11:28 +0000 (16:11 -0800)]
CHROMIUM: exynos: acquire/release for GEM objects

* Adds acquire/release ioctls for Exynos GEM objects, to be used
  before/after CPU access.  Uses KDS for synchronization.

BUG=chrome-os-partner:11949
TEST=local build, run on snow

Change-Id: Ie4b04530701adf3054f150cfe5143680efceb531
Signed-off-by: John Sheu <sheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37756

12 years agoCHROMIUM: drm/exynos: gem: Remove useless size field
Daniel Kurtz [Mon, 10 Dec 2012 05:53:11 +0000 (13:53 +0800)]
CHROMIUM: drm/exynos: gem: Remove useless size field

exynos_drm_gem_obj, drm_gem_object, the dma_buf and the exynos_drm_gem_buf
all store a buffer's size.  This seems a bit excessive.
Remove the exynos_drm_gem_obj copy, since it is written to but never read.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test

Change-Id: I5bf057964351d08f40146f0e928e6eb8414f164f
Reviewed-on: https://gerrit.chromium.org/gerrit/39475
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: Remove vaddr from drm_overlay
Daniel Kurtz [Mon, 10 Dec 2012 05:51:40 +0000 (13:51 +0800)]
CHROMIUM: drm/exynos: Remove vaddr from drm_overlay

Consumers of the drm_overlay vaddr object only care about the dma_addr,
so they can program DMA in a display controller.  They never need to know
the corresponding vaddr.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test; booted w/ debug enabled and verified debug messages
     no longer include vaddr

Change-Id: Ia96ebea8f39d4a733bc6732b6cc9be85f1a8c0e3
Reviewed-on: https://gerrit.chromium.org/gerrit/39474
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: Fix typo in drm_gem.h
Daniel Kurtz [Mon, 10 Dec 2012 05:29:51 +0000 (13:29 +0800)]
CHROMIUM: drm/exynos: Fix typo in drm_gem.h

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test

Change-Id: I2c4c15e5bb906d353926738904d8c2edaa1ecbee
Reviewed-on: https://gerrit.chromium.org/gerrit/39473
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: gem: Fix alloc_page() error check
Daniel Kurtz [Fri, 7 Dec 2012 08:46:22 +0000 (16:46 +0800)]
CHROMIUM: drm/exynos: gem: Fix alloc_page() error check

alloc_page returns NULL if it can't allocate a page, not an error code.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test

Change-Id: I6eee98e82f50a43378fd046931d858bbc154e62f
Reviewed-on: https://gerrit.chromium.org/gerrit/39472
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: prime: Fix exynos_drm_gem_dmabuf_mmap
Daniel Kurtz [Mon, 10 Dec 2012 05:20:53 +0000 (13:20 +0800)]
CHROMIUM: drm/exynos: prime: Fix exynos_drm_gem_dmabuf_mmap

Exynos stores a pointer to an exynos_drm_gem_obj in dma_buf->priv, not
a pointer to its base drm_gem_object field.

While we are at it, fix up the functions name and some space/tab issues.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=Compile test; As far as I can tell, this function isn't actually used

Change-Id: I64e421537d11cc0ebebdae27b1a990e998ed101e
Reviewed-on: https://gerrit.chromium.org/gerrit/39471
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: drm/exynos: Don't set local parameter to NULL after kfree
Daniel Kurtz [Mon, 10 Dec 2012 05:27:22 +0000 (13:27 +0800)]
CHROMIUM: drm/exynos: Don't set local parameter to NULL after kfree

exynos_gem_obj is a parameter.  Setting it to NULL and then returning
does nothing.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test

Change-Id: I8e7e4fe591f55e3811e0b6f6e7b9c8e8129c7ff1
Reviewed-on: https://gerrit.chromium.org/gerrit/39470
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agoCHROMIUM: serial: samsung: Use printk instead of printascii for S3C_PMDBG
Michael Spang [Fri, 9 Nov 2012 03:09:24 +0000 (22:09 -0500)]
CHROMIUM: serial: samsung: Use printk instead of printascii for S3C_PMDBG

Users should use no_console_suspend if they want output during
suspend, rather than relying on DEBUG_LL. Using DEBUG_LL has two
disadvantages:

1. It doesn't respect power management. When the UART is suspended
   the clock is stopped, and trying to use DEBUG_LL will just hang.

   This means if the user selects CONFIG_SAMSUNG_PM_DEBUG but does
   NOT disable console suspend, the system will hang during suspend.

2. It skips syslog and other console devices such as pstore.

BUG=chrome-os-partner:10932
TEST=powerd_suspend with no_console_suspend but not SAMSUNG_PM_DEBUG

Signed-off-by: Michael Spang <spang@chromium.org>
Change-Id: Ieb511b164eb81119c9f1c59d793d37351a05f7c9
Reviewed-on: https://gerrit.chromium.org/gerrit/37755
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: drm/exynos: don't warn about non-kds modeset
Mandeep Singh Baines [Fri, 7 Dec 2012 18:34:51 +0000 (10:34 -0800)]
CHROMIUM: drm/exynos: don't warn about non-kds modeset

Now that the page_flip logic is shared with the mode_set code,
it's possible for us to call page_flip on a non-kds buffer.
Modify the warning to only check the non-modeset case.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=dmesg | grep non-kds

Change-Id: I2c23900fffd565886dcccf0e2b79fd04c1b0ab64
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39385
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agoCHROMIUM: drm/exynos: remove unused dev_priv in exynos_drm_fb_release_work_fn
Mandeep Singh Baines [Fri, 7 Dec 2012 18:03:48 +0000 (10:03 -0800)]
CHROMIUM: drm/exynos: remove unused dev_priv in exynos_drm_fb_release_work_fn

BUG=none
TEST=compile, boot

Change-Id: I9de6865e04bd4e296eafb11ac8f68f2298557ddd
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39384
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agoCHROMIUM: LSM: allow old style loads when locking disabled
Olof Johansson [Fri, 7 Dec 2012 19:42:19 +0000 (11:42 -0800)]
CHROMIUM: LSM: allow old style loads when locking disabled

This is needed when our kernel is used with other userspaces, i.e. Ubuntu
and other distros.

Enabling old-style module init when locking is explicitly disabled doesn't
open up any security exposure for users unless they have disabled
rootfs_verification AND module load restrictions. I.e. default users have
no added exposure.

BUG=chromium-os:37055
TEST=needs a new testcase (crosbug.com/37056)

Change-Id: If5ec577a4c7be64a7fa6a0be6a76f3044de42e14
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39383
Reviewed-by: Kees Cook <keescook@chromium.org>
12 years agoCHROMIUM: config: enable most Keyspan USB Serial models
Grant Grundler [Thu, 29 Nov 2012 16:51:04 +0000 (08:51 -0800)]
CHROMIUM: config: enable most Keyspan USB Serial models

Enable commonly used Keyspan USB Serial devices.

Note that something is already including ALL keyspan firmware in
chromeos-kernel builds.  So not enabling those in the configs.

BUG=chromium-os:35707
TEST=manual (connect USA-19HS and confirm drivers are loaded/device
recognized)

Change-Id: I78f65efeeb0575711dab2aa3b8bea989801a78ba
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39282
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: config: Enable BCM5974 support
Liam McLoughlin [Fri, 7 Dec 2012 17:41:31 +0000 (12:41 -0500)]
CHROMIUM: config: Enable BCM5974 support

This touchpad is found in many laptops with multitouch trackpads.
Not enabled for ARM since this isn't found in any ARM device to
my knowledge.

BUG=none
TEST=Build, boot on device with this touchpad, confirm touchpad works

Change-Id: I1cc0dd4b48da817ec13bea7a52d40136089ffa29
Signed-off-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39376
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: drm/exynos: Fix dithering.
Haixia Shi [Fri, 7 Dec 2012 02:47:12 +0000 (18:47 -0800)]
CHROMIUM: drm/exynos: Fix dithering.

There is only one dithering engine globally and it should always use
the settings for the root window.

BUG=chromium-os:37030
TEST=manually on daisy

Change-Id: Ic85805afc9410fc72be52da5916942b8187a07ed
Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39358
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agoCHROMIUM: UPSTREAM: staging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC
Seth Jennings [Mon, 25 Jun 2012 16:14:36 +0000 (11:14 -0500)]
CHROMIUM: UPSTREAM: staging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC

upstream: commit 6e2361720b9da9ec830d407da058ca1827e62b12

This patch switches zcache and zram dependency to ZSMALLOC
rather than X86.  There is no net change since ZSMALLOC
depends on X86, however, this prevent further changes to
these files as zsmalloc dependencies change.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chromium-os:36829
TEST=compile, verify that zram module is updated and /boot/config is correct

Change-Id: I91f6ed46549fe62a9fe3035063d98beb2f5d966a
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39289
Tested-by: Luigi Semenzato <semenzato@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Luigi Semenzato <semenzato@google.com>

12 years agoCHROMIUM: exynos: keep exynos_plane zpos on disable
John Sheu [Thu, 6 Dec 2012 01:23:26 +0000 (17:23 -0800)]
CHROMIUM: exynos: keep exynos_plane zpos on disable

Exynos DRM planes are implemented using overlay hardware.  Presently we
reset the overlay zpos back to default every time a plane is disabled.
Don't do this anymore.

Signed-off-by: John Sheu <sheu@chromium.org>
BUG=chromium-os:36991
TEST=local build, run on exynos

Change-Id: I4c3490ef05d1ecdfeea6cbf26f020b9a19ebe764
Reviewed-on: https://gerrit.chromium.org/gerrit/39296
Tested-by: John Sheu <sheu@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: John Sheu <sheu@chromium.org>

12 years agoCHROMIUM: serial: exynos: Resume UART earlier with SAMSUNG_PM_DEBUG
Michael Spang [Fri, 9 Nov 2012 19:33:47 +0000 (14:33 -0500)]
CHROMIUM: serial: exynos: Resume UART earlier with SAMSUNG_PM_DEBUG

Even with SAMSUNG_PM_DEBUG enabled, we're losing lots of console UART
output during resume. This patch makes SAMSUNG_PM_DEBUG correcly
resume the UART as early as possible, so that no output is lost.

BUG=chrome-os-partner:10932
TEST=powerd_suspend with no_console_suspend and SAMSUNG_PM_DEBUG

Change-Id: Ic892ed225c9075e8d72d851a4f2e22263ee6047d
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37734
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
12 years agoCHROMIUM: samsung: Add missing include guard to gpio-core.h
Michael Spang [Wed, 5 Dec 2012 22:54:05 +0000 (17:54 -0500)]
CHROMIUM: samsung: Add missing include guard to gpio-core.h

BUG=none
TEST=none

Change-Id: Ia45b20201d819410a0634aec76d74d19187ad10d
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39268
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
12 years agoCHROMIUM: exynos: dts: Switch LDO7 to 1.1V
Doug Anderson [Mon, 3 Dec 2012 18:24:23 +0000 (10:24 -0800)]
CHROMIUM: exynos: dts: Switch LDO7 to 1.1V

Apparently LDO7 is supposed to be 1.1V, not 1.0V.  This affects the
voltage fed to several PLLs through the pins VDD10_APLL, VDD10_BPLL,
...

BUG=chrome-os-partner:16533
TEST=Booted and saw this in dmesg:
  [    0.810183] vdd_ldo7: 1100 mV

Change-Id: I8dc67ab7e403ac55910b23b90749e44be63e8600
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39092
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Tested-by: Frank Hislop <frh@google.com>
12 years agoBACKPORT: ALSA: hda - Fix Acer Aspire models with analog mics.
Dylan Reid [Mon, 19 Nov 2012 06:56:40 +0000 (22:56 -0800)]
BACKPORT: ALSA: hda - Fix Acer Aspire models with analog mics.

The Acer Aspire AO756 has an analog built-in mic on nid 0x1b and an
external mic on nid 0x19.  The BIOS doesn't set this up.

The mic detect on this Acer Aspire netbook and Acer C7 ChromeBook is
only valid when the headphone is plugged.  The detect circuit relies on
the tip detect switch being closed on the jack.  Tell hda_jack to ignore
the mic sense unless the headphones are plugged.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 08a978db518dfceb37998bc74a7fed03540cfd08)

Conflicts:
sound/pci/hda/patch_realtek.c

[ Simple conflicts with the ZGB quirk we carry - dgreid ]

Change-Id: I6dc642e07cc9c1d50d51c56f7655c7554a2b7775
Reviewed-on: https://gerrit.chromium.org/gerrit/38487
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
12 years agoRevert "CHROMIUM: ALSA: hda/realtek - Ignore mic sense without headphones on Parrot."
Dylan Reid [Wed, 21 Nov 2012 01:47:03 +0000 (17:47 -0800)]
Revert "CHROMIUM: ALSA: hda/realtek - Ignore mic sense without headphones on Parrot."

This reverts commit 77d7f6636bc9f65eb1e8b7769c0f2674f7136e8a.

This will be replaced by the version I landed upstream in the next
commit.

Change-Id: Ifd47636d6bfd5d68d3f9d173448c9995d227778d
Reviewed-on: https://gerrit.chromium.org/gerrit/38486
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>