cascardo/linux.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>

11 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>

11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoBACKPORT: ALSA: hda - Allow jack state to depend on another jack
Dylan Reid [Mon, 19 Nov 2012 18:48:07 +0000 (19:48 +0100)]
BACKPORT: ALSA: hda - Allow jack state to depend on another jack

Introduce the concept of a "gated" jack.  The gated jack's pin sense
is
only valid when the "gating" jack is plugged.  This requires checking
the gating jack when the gated jack changes and re-checking the gated
jack when the gating jack is plugged/unplugged.

This allows handling of devices where the mic jack detect floats when
the headphone jack is unplugged.

[Rewritten for fixing the possible snd_array reallocation, covering
 the missing callback calls and jack sync operations, as well as some
 code cleanups -- tiwai]

Signed-off-by: Dylan Reid <dgreid@chromium.org>
(cherry picked from commit 0619ba8c17b121ef0273be181198659b17d84247)

Conflicts:
sound/pci/hda/hda_jack.c
sound/pci/hda/hda_jack.h

[Removed callbacks not present in 3.4, and resolved conflicts
generated by non-existant phantom jacks. -- dgreid ]

Change-Id: I293240e6bac8b0fc828abd3e46968531562a66ac
Reviewed-on: https://gerrit.chromium.org/gerrit/38485
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>
11 years agoCHROMIUM: serial: samsung: Drain UARTs with SAMSUNG_PM_DEBUG
Michael Spang [Fri, 9 Nov 2012 04:16:04 +0000 (23:16 -0500)]
CHROMIUM: serial: samsung: Drain UARTs with SAMSUNG_PM_DEBUG

We're losing the last characters output to the console in suspend. To
avoid this, wait for the transmitter to empty as late as possible.

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

Change-Id: I7f6fbffd0f30458853f0ae67f496d3915ad0d0dc
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37735
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: serial: samsung: Avoid waiting forever for TX ready
Michael Spang [Fri, 9 Nov 2012 01:06:06 +0000 (20:06 -0500)]
CHROMIUM: serial: samsung: Avoid waiting forever for TX ready

The no_console_suspend option allows the console to write to the UART
during early resume, before the serial port itself is resumed. Such
writes hang indefinitely waiting for TX ready.

This adds a check to the console putchar function to drop characters
instead of hanging if the port hasn't been initialized. That way, we
can use no_console_suspend without risk of hanging.

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

Change-Id: I64e8def33fe984b97776206451e6030d6c761355
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37714

11 years agoCHROMIUM: exynos: dts: update configuration for Spring proto-1
Vincent Palatin [Fri, 16 Nov 2012 17:32:27 +0000 (09:32 -0800)]
CHROMIUM: exynos: dts: update configuration for Spring proto-1

- we have now an HDMI output, re-activate it.
- disable the OHCI controller until the hardware is fixed :
  This OHCI controller has no individual port power support,
  so activating the controller always enables the port power on port 0
  independantly of the EHCI state or the port power bit. This will then
  turn on the VBUS regulator and might create an electrical conflict
  with the USB boost.
- disable port 0 on EHCI to keep the VBUS regular off.
- tune the eDP bridge regulator configuration :
  it needs to be on even if the bootloader is not using the screen.
- disable high-speed mode on Wifi SDIO until we find the issue.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14489
TEST=boot on Spring.

Change-Id: Ibcfc2848d932026a711833471af908867659f74b
Reviewed-on: https://gerrit.chromium.org/gerrit/38223
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: usb: allow to de-activate some ports on EHCI root hub
Vincent Palatin [Fri, 16 Nov 2012 20:22:44 +0000 (12:22 -0800)]
CHROMIUM: usb: allow to de-activate some ports on EHCI root hub

To optimize power consumption and sometimes avoid electrical conflicts
on the board, we might want to avoid activating some of the ports on
the root hub.
The platform specific part of the driver can optionally provide a bitmap
of the enabled ports. By default, all ports are enabled.

This might be reverted once we have another mechanism to control VBUS
regulator on the next hardware revision.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14490
TEST=boot on Spring, verify that port 0 regulator is not enabled and
port 1 is detecting a USB key correctly.
boot on Snow, verify that port 0 is detecting a USB key

Change-Id: Ib08d18a105e366b37f5117a6f7c0e1e56e04dce5
Reviewed-on: https://gerrit.chromium.org/gerrit/38222
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: drm/exynos: fix leak (regression) in destroy_fb path
Mandeep Singh Baines [Tue, 6 Nov 2012 18:53:33 +0000 (10:53 -0800)]
CHROMIUM: drm/exynos: fix leak (regression) in destroy_fb path

We need to put the dma_buf. I accidentally removed the put in:

commit 1cc84420cfd8b3e98d23314213282ad70a2b9b55
Author: Mandeep Singh Baines <msb@chromium.org>
Date:   Wed Nov 28 21:18:57 2012 -0800

    CHROMIUM: drm/exynos: remove KDS calls from destroy_fb

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Verified leak is gone.

Before:

localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
2 objects, 8454144 bytes
localhost ~ # start ui
ui start/running, process 27060
localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
4 objects, 16908288 bytes
localhost ~ # start ui
ui start/running, process 29745
localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
6 objects, 25362432 bytes

After:

localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
0 objects, 0 bytes
localhost ~ # start ui
ui start/running, process 3642
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
5 objects, 12709888 bytes
localhost ~ # stop ui
ui stop/waiting
localhost ~ # start ui
ui start/running, process 4628
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
5 objects, 12709888 bytes
localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
0 objects, 0 bytes
localhost ~ # start ui
ui start/running, process 6797
localhost ~ # stop ui
ui stop/waiting
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
0 objects, 0 bytes

Change-Id: I75dde125cfc93432a6b2f1bca7166c703c8487cb
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39218
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: Input: cyapa - More reliable cyapa_get_state.
Benson Leung [Tue, 20 Nov 2012 07:16:54 +0000 (23:16 -0800)]
CHROMIUM: Input: cyapa - More reliable cyapa_get_state.

In cyapa_get_state, add an additional check for OP_STATUS_SRC bit
in REG_OP_STATUS. This bit should only be set when in operational
mode.

Under some conditions, the REG_OP_STATUS may return 0x89,
with the device status bits being 0b01, indicating the operational
mode firmware is busy executing a command from the host. Handle this
status and return state CYAPA_STATE_OP if we are not in bootloader based
on OP_STATUS_SRC.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:16217
TEST=Test Lumpy (Samsung Series 5 550) and Snow (Samsung Chromebook ARM)
using this driver.
1. Cold boot the system (power on the system from full on)
2. Warm reboot the system (reboot the system using command sudo reboot)
Check that the touchpad is detected in both cases and is functional.
3. Force a firmware update and check that it succeeds.
/opt/google/touchpad/firmware/chromeos_touch_firmwareupdate -d cyapa -f

Furthermore, see crosbug.com/p/16217 for detailed repro steps.
System with this patch should survive the suspend/resume test
with a grounded metal probe touching the touchpad generating activity.
suspend_stress_test --wake_min 0 --wake_max 0 --backup_rtc

Change-Id: Ie2d513a3a868c6914776355222fad21935af88a5
Reviewed-on: https://gerrit.chromium.org/gerrit/38364
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Dudley Du <dudl@cypress.com>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: drm/i915: Don't turn off backlight and panel on prepare
Stéphane Marchesin [Wed, 31 Oct 2012 20:22:17 +0000 (13:22 -0700)]
CHROMIUM: drm/i915: Don't turn off backlight and panel on prepare

This is purely cosmetic, and brings down modeset time by a bit.

BUG=chrome-os-partner:13364
TEST=by hand

Change-Id: Idad3f6d16f08d2dd23dee877ea7845c423650e69
Reviewed-on: https://gerrit.chromium.org/gerrit/37049
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoBluetooth: btmrvl: enable RESET_ON_CLOSE quirk
Bing Zhao [Mon, 3 Dec 2012 19:52:13 +0000 (11:52 -0800)]
Bluetooth: btmrvl: enable RESET_ON_CLOSE quirk

When user brings down the HCI interface without explicitly
disconnecting the HID device(s) or resetting the HCI interface,
SD8797 firmware won't get the indication of "interface down".
This results that the SD8797 Wi-Fi stays at 1x1 mode without
switching back to 2x2 mode.

Work it around by setting RESET_ON_CLOSE bit to have the stack
reset the HCI interface upon close.

BUG=chrome-os-partner:14937
TEST=WiFi associates to 2.4GHz AP close enough; Bluetooth connects
to HID mouse; "iw mlan0 link" shows WiFi link tx bitrates at MCS7.
Uncheck "Enable bluetooth" checkbox, or issue "hciconfig hci0 down"
command, "iw mlan0 link" shows tx bitrates at MCS15 or MCS14.

Change-Id: Ic1468c3f60b504aa2efe80cbc72a22872b256f04
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39163
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
11 years agoUPSTREAM: Bluetooth: Rename HCI_QUIRK_NO_RESET to HCI_QUIRK_RESET_ON_CLOSE
Bing Zhao [Mon, 3 Dec 2012 19:38:10 +0000 (11:38 -0800)]
UPSTREAM: Bluetooth: Rename HCI_QUIRK_NO_RESET to HCI_QUIRK_RESET_ON_CLOSE

HCI_QUIRK_NO_RESET name is misleading - purpose of this quirk is to
reset device on close instead of init, not to not reset at all.
Rename it to HCI_QUIRK_RESET_ON_CLOSE to avoid confusion.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
BUG=chrome-os-partner:14937
TEST=WiFi associates to 2.4GHz AP close enough; Bluetooth connects
to HID mouse; "iw mlan0 link" shows WiFi link tx bitrates at MCS7.
Uncheck "Enable bluetooth" checkbox, or issue "hciconfig hci0 down"
command, "iw mlan0 link" shows tx bitrates at MCS15 or MCS14.

Change-Id: Ib83bdea24c9820efe321c02f10ffce43c42368e5
Reviewed-on: https://gerrit.chromium.org/gerrit/39162
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - Longer chip io timeout.
Dylan Reid [Tue, 4 Dec 2012 01:15:18 +0000 (17:15 -0800)]
CHROMIUM: ALSA: hda/ca0132 - Longer chip io timeout.

According to Creative there are some extreme circumstances where the
DSP can take > 1second to respond to a command.  I have asked them to
investigate further and eliminate this possibility.  Until the DSP
side can be fixed, lengthen the timeout to 2 seconds so the system
avoid resuming without audio.

BUG=chrome-os-partner:14465
TEST=suspend/resume for 4k cycles, never see DSP load failure.

Change-Id: If6f227fe31421361690be4301f513b17f79692a7
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39140
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
11 years agoCHROMIUM: scripts: Make genconfig clean configs
Doug Anderson [Mon, 3 Dec 2012 19:00:29 +0000 (11:00 -0800)]
CHROMIUM: scripts: Make genconfig clean configs

Right now genconfig just dumps out the raw output of concatenating all
of the relevant configs.  This makes it hard to diff.  Make it easier
by running "oldconfig" over this and also providing a savedefconfig.

BUG=None
TEST=Run ./chromeos/scripts/kernelconfig genconfig and look at
CONFIGS directory; try this even when the configs aren't normalized.

Change-Id: I19da6d54d5e550682737f0a23440fd2cc05dbd16
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39094
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: config: build zram module on all platforms
Luigi Semenzato [Fri, 30 Nov 2012 18:43:01 +0000 (10:43 -0800)]
CHROMIUM: config: build zram module on all platforms

BUG=chromium-os:16450
TEST=compile and run for ARM and 32-bit x86.  Compile only for x86_64.

Change-Id: I1bada1b29babff3cd2eb3fe7d308820cfb1f1b95
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39002
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: UPSTREAM: staging: zsmalloc: remove x86 dependency
Seth Jennings [Mon, 2 Jul 2012 21:15:49 +0000 (16:15 -0500)]
CHROMIUM: UPSTREAM: staging: zsmalloc: remove x86 dependency

This patch replaces the page table assisted object mapping
method, which has x86 dependencies, with a arch-independent
method that does a simple copy into a temporary per-cpu
buffer.

While a copy seems like it would be worse than mapping the pages,
tests demonstrate the copying is always faster and, in the case of
running inside a KVM guest, roughly 4x faster.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chromium-os:36829
TEST=extensive manual testing

Change-Id: I8b41c92eb146c5cf0af40682802ba443f7810a0b
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38999
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: BACKPORT: staging: zsmalloc: Finish conversion to a separate module
Ben Hutchings [Wed, 20 Jun 2012 01:31:11 +0000 (02:31 +0100)]
CHROMIUM: BACKPORT: staging: zsmalloc: Finish conversion to a separate module

Need BACKPORT, rather than UPSTREAM, since it won't apply cleanly because
we had already fixed the MODULE_LICENSE problem.

---original comment:

ZSMALLOC is tristate, but the code has no MODULE_LICENSE and since it
depends on GPL-only symbols it cannot be loaded as a module.  This in
turn breaks zram which now depends on it.  I assume it's meant to be
Dual BSD/GPL like the other z-stuff.

There is also no module_exit, which will make it impossible to unload.
Add the appropriate module_init and module_exit declarations suggested
by comments.

Reported-by: Christian Ohm <chr.ohm@gmx.net>
References: http://bugs.debian.org/677273
Cc: stable@vger.kernel.org # v3.4
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:

drivers/staging/zsmalloc/zsmalloc-main.c

BUG=chromium-os:36829
TEST=extensively tested manually

Change-Id: I82bc7ffffe3007b82601ec71f43873be2059586c
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38998
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - fix suspend_acq_interval_ms compile warning
Daniel Kurtz [Mon, 3 Dec 2012 07:06:09 +0000 (15:06 +0800)]
CHROMIUM: Input: atmel_mxt_ts - fix suspend_acq_interval_ms compile warning

By chance, struct attribute's "attr" field is first, so its address is the
address of the struct attribute, so this typo has no functional effect, it
just suppresses this compiler warning:

drivers/input/touchscreen/atmel_mxt_ts.c:2059:2: warning: initialization from incompatible pointer type [enabled by default]
drivers/input/touchscreen/atmel_mxt_ts.c:2059:2: warning: (near initialization for 'mxt_power_attrs[0]') [enabled by default]

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36877
TEST=builds clean

Change-Id: If79a410afb82984472893673b97aa784249a3ca5
Reviewed-on: https://gerrit.chromium.org/gerrit/39069
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoRevert "HACK: tpm: Add tpm_ignore_suspend_errors debugfs file"
Jonathan Kliegman [Fri, 30 Nov 2012 15:07:09 +0000 (10:07 -0500)]
Revert "HACK: tpm: Add tpm_ignore_suspend_errors debugfs file"

This reverts commit 50d6900e931871224fb718c3b87e9a614a8dbf94.

With the TPM issues fixed from the rtc change, this hack is no longer
needed.

BUG=chrome-os-partner:14804
TEST=boot kernel, see sysfs file gone.  suspend/resume on snow

Change-Id: Ia9fae9a522387a1082dae825bd9c18a6bd8922bf
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39000
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - Prevent null dereferences when in bootloader
Benson Leung [Fri, 30 Nov 2012 23:26:49 +0000 (15:26 -0800)]
CHROMIUM: Input: atmel_mxt_ts - Prevent null dereferences when in bootloader

When we are in bootloader mode, the input_dev is not valid, and neither is
the object table. Several paths may result in something trying to dereference
these. This patch addresses the following :
1) mxt_resume calls input_unregister_device on input_dev.
2) mxt_suspend/resume reads and writes from the object table.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:16507
TEST=First, get the touch device into a bad state by doing the following:
1. Modify chromeos/config/base.config and set CONFIG_TOUCHSCREEN_ATMEL_MXT=m
2. Build, boot this kernel, and make sure that the touch device works.
3. /opt/google/touch/firmware/chromeos-touch-firmwareupdate.sh \
-d atmel_mxt_ts -n maxtouch-ts.fw -f
4. Before it can finish, CTRL-C to interrupt the firmware update.
   This will ensure that the touch device is stuck in bootloader mode.

Now, test that mxt_remove is not vulnerable:
1. rmmod atmel_mxt_ts
2. check that the system does not reboot.
3. modprobe chromeos_mxt_ts

Test that suspend/resume does is not vulnerable:
1. Close the lid to suspend the system.
2. Open the lid to suspend the system.
3. Check that the system did not reboot.

Change-Id: I83e517d21738cb75d0c2b0ab8bf16398044e52f3
Reviewed-on: https://gerrit.chromium.org/gerrit/39022
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: sound / hda: Fix D0 power state checking.
Shawn Nematbakhsh [Fri, 30 Nov 2012 20:35:27 +0000 (12:35 -0800)]
CHROMIUM: sound / hda: Fix D0 power state checking.

Power state checking for HDA cards is broken. According to the HDA spec, the
lower four bits of the power state register define the "set" power state and
the next four bits define the "actual" state. Subsequent bits have different
meanings. When we check the power state of our card during transition to D0,
we read the entire register and compare to AC_PWRST_D0 (0). This leads to
timeout of the wait loop and ~500ms wasted during resume if some upper
status bits are set.

Solution is to mask off all upper bits and compare only get + set state. If
these states are 0, it means the transition has completed.

This is fixed differently in the mainstream kernel repo, but there are some
extra dependencies involved. Therefore, this patch should NOT be carried
forward through the next kernel rebase.

DO NOT CARRY FORWARD.

TEST=Run power_Resume test on HDA card that reports PS-ClkStopOk status.
Confirm that resume time is no longer ~500 ms.
BUG=chrome-os-partner:15729

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I73dbe59ac8c19bad5c0eabdee5116da49d936e72
Reviewed-on: https://gerrit.chromium.org/gerrit/39012
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Shawn Nematbakhsh <shawnn@google.com>
Tested-by: Shawn Nematbakhsh <shawnn@google.com>
11 years agoBACKPORT: x86, fpu: avoid FPU lazy restore after suspend
Vincent Palatin [Fri, 30 Nov 2012 17:33:44 +0000 (09:33 -0800)]
BACKPORT: x86, fpu: avoid FPU lazy restore after suspend

When a cpu enters S3 state, the FPU state is lost.
After resuming for S3, if we try to lazy restore the FPU for a process running
on the same CPU, this will result in a corrupted FPU context.

Ensure that "fpu_owner_task" is properly invalided when (re-)initializing a CPU,
so nobody will try to lazy restore a state which doesn't exist in the hardware.

Cc: Duncan Laurie <dlaurie@chromium.org>
Cc: Olof Johansson <olofj@chromium.org>
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:16295
TEST=On Link, run thousands of suspend/resume cycles with 4 processes doing FPU
operations running as described in the bug.
Without the patch, a process is killed after a few hundreds cycles by a SIGFPE.

Change-Id: I33ee884dea6cad048cbe1aa60c64cbb5141d3f66
Reviewed-on: https://gerrit.chromium.org/gerrit/39006
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: unlock on error in init_usb()
Dan Carpenter [Thu, 29 Nov 2012 14:17:25 +0000 (17:17 +0300)]
UPSTREAM: staging: gdm72xx: unlock on error in init_usb()

We recently added locking here and there was an error path which is
missing an unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e143ef8f297d980037149fe2dc62af72621a0f5e)

Change-Id: I54263239917ce6394322b9c15f7621b2ef4c9383
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38997
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: use %pI4 format to print IPv4 address and remove last...
Shan Wei [Wed, 28 Nov 2012 02:54:31 +0000 (10:54 +0800)]
UPSTREAM: staging: gdm72xx: use %pI4 format to print IPv4 address and remove last usage of NIP6

commit cf4ca4874fc45 removed the definition of NIPQUAD and NIPQUAD_FMT,
and NIP6 also is out of date.

commit 2874762b31d8d replace deprecated NIPQUAD marco to C code, but we can use %pI4 to
print IPv4 address more simply. And remove constant condition judge.

Because DEBUG_SDU is not defined in gdm_wimax.h, no error message when compiling.

Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0df1a84e0ec875d1bc12ac6aca325cb3543a7ad6)

Change-Id: Ie062a0da205dc246ae578046994648ee932db85f
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38963
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: fix unused variable warning in gdm_usb_send
Ben Chan [Tue, 27 Nov 2012 04:18:45 +0000 (20:18 -0800)]
UPSTREAM: staging: gdm72xx: fix unused variable warning in gdm_usb_send

This patch fixes an unused variable warning in gdm_usb_send
(when CONFIG_WIMAX_GDM72XX_K_MODE=n), which was introduced in
commit 1a276b80466bbd195cf94ec7178f68f2ab351467 (staging:
gdm72xx: protect access of rx / tx structs).

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a7e4a982fe2a9375952798294ebfb38dc0ed6782)

Change-Id: Ifcc7f122a8342f51d697a48b55d604f71a582f52
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38962
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use dev_ printks in usb_boot.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:57 +0000 (20:05 +0900)]
UPSTREAM: staging/gdm72xx: Use dev_ printks in usb_boot.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3800178b94d218cbfe5decf60f48742a73b62301)

Change-Id: I6c865f1f19ecafbe23ef2f01e4533d8eb74ee254
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38961
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use dev_ printks in gdm_usb.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:43 +0000 (20:05 +0900)]
UPSTREAM: staging/gdm72xx: Use dev_ printks in gdm_usb.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a7d46832df45a41e880ea39ccd4882d012a589bb)

Change-Id: Ia854c90ac61c142fea7526a1e3f30a49e230528d
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38960
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use dev_ printks in sdio_boot.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:30 +0000 (20:05 +0900)]
UPSTREAM: staging/gdm72xx: Use dev_ printks in sdio_boot.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 626e557f3a84f391b8cc5a39ea42c821a1bf67b5)

Change-Id: Ic95b62dfcb8d553dfaf087adc1462ae2c75fdb2c
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38959
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use dev_ printks in gdm_sdio.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:16 +0000 (20:05 +0900)]
UPSTREAM: staging/gdm72xx: Use dev_ printks in gdm_sdio.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c9a796d6a6b8bbfaf5bd6f4fd9fb1c8e04bf9534)

Change-Id: I2ff14abbdb79cc04583ed6d2b752aec16ed59363
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38958
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use netdev_ or pr_ printks in netlink_k.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:02 +0000 (20:05 +0900)]
UPSTREAM: staging/gdm72xx: Use netdev_ or pr_ printks in netlink_k.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit cade0fe46fde08642674838a0d17389bd1b7ba4b)

Change-Id: I1e1c6d103773624f164ff338d0706db86672401c
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38957
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:04:42 +0000 (20:04 +0900)]
UPSTREAM: staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2d8390223a8909dfddb326fd3d912de80022dd10)

Change-Id: I4f7931f8ae9b7f1eb2fd0b836efd8424addecf8d
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38956
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: Use netdev_ or pr_ printks in gdm_wimax.c
YAMANE Toshiaki [Mon, 29 Oct 2012 11:03:47 +0000 (20:03 +0900)]
UPSTREAM: staging/gdm72xx: Use netdev_ or pr_ printks in gdm_wimax.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_emerg(netdev, ... then dev_emerg(dev, ... then pr_emerg(...  to printk(KERN_EMERG ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f57cee11374a0e3056313e0818e3ff2ebd0f496d)

Change-Id: I52dd62e9582eb64a1a8e2c4fd4d8ceb2bb65f9be
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38955
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: xhci: Add Lynx Point LP to list of Intel switchable hosts
Russell Webb [Fri, 9 Nov 2012 21:58:49 +0000 (13:58 -0800)]
UPSTREAM: xhci: Add Lynx Point LP to list of Intel switchable hosts

Like Lynx Point, Lynx Point LP is also switchable.  See
1c12443ab8eba71a658fae4572147e56d1f84f66 for more details.

This patch should be backported to stable kernels as old as 3.0,
that contain commit 69e848c2090aebba5698a1620604c7dccb448684
"Intel xhci: Support EHCI/xHCI port switching."

Signed-off-by: Russell Webb <russell.webb@linux.intel.com>
BUG=None
TEST=Boot from USB3 key in a USB3 port with Lynx Point LP Chipset

Change-Id: Id2406402f53dccd98c5b4916c55b69cf3ea7179e
Reviewed-on: https://gerrit.chromium.org/gerrit/37927
Commit-Ready: Russell Webb <russell.webb@intel.com>
Tested-by: Russell Webb <russell.webb@intel.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: xhci: Add Lynx Point to list of Intel switchable hosts.
Sarah Sharp [Thu, 9 Feb 2012 23:55:13 +0000 (15:55 -0800)]
UPSTREAM: xhci: Add Lynx Point to list of Intel switchable hosts.

The upcoming Intel Lynx Point chipset includes an xHCI host controller
that can have ports switched from the EHCI host controller, just like
the Intel Panther Point xHCI host.  This time, ports from both EHCI
hosts can be switched to the xHCI host controller.  The PCI config
registers to do the port switching are in the exact same place in the
xHCI PCI configuration registers, with the same semantics.

Hooray for shipping patches for next-gen hardware before the current gen
hardware is even available for purchase!

This patch should be backported to stable kernels as old as 3.0,
that contain commit 69e848c2090aebba5698a1620604c7dccb448684
"Intel xhci: Support EHCI/xHCI port switching."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
BUG=None
TEST=Boot from USB3 key in a USB3 port with Lynx Point Chipset

Change-Id: I38de395b5c7812bbc61fd11e0d27c3ec12514978
Reviewed-on: https://gerrit.chromium.org/gerrit/37926
Commit-Ready: Russell Webb <russell.webb@intel.com>
Tested-by: Russell Webb <russell.webb@intel.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: config: Statically link xhci
Russell Webb [Thu, 8 Nov 2012 19:22:04 +0000 (11:22 -0800)]
CHROMIUM: config: Statically link xhci

To support boot from USB3 devices, build in the XHCI driver

BUG=None
TEST=Boot with USB3 key in USB3 port

Change-Id: Ib83680b0ca42a2421aebb6011b632ab7efcdb138
Signed-off-by: Russell Webb <russell.webb@intel.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/37925
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: drm/exynos: remove vsync wait from destroy_fb
Mandeep Singh Baines [Tue, 6 Nov 2012 18:53:33 +0000 (10:53 -0800)]
CHROMIUM: drm/exynos: remove vsync wait from destroy_fb

The vsync wait is now unneccesary since we now have proper
refcounting in place.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch, HDMI plug/unplug, sign in/out, suspend/resume,
     idle suspend/resume.

Change-Id: Idb5fe8615021d35db3e5a4c6a528e8386a4d84d7
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37575

11 years agoCHROMIUM: drm/exynos: synchronize mode_set paths with page_flip
Mandeep Singh Baines [Wed, 7 Nov 2012 02:47:29 +0000 (18:47 -0800)]
CHROMIUM: drm/exynos: synchronize mode_set paths with page_flip

Call page_flip from the mode_set paths.

This should fix all remaining IOMMU page fault issues related
to flips and modesets. We may still have issues in the
DPMS paths.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch, HDMI plug/unplug, sign in/out, suspend/resume,
     idle suspend/resume.

Change-Id: I3fcfc47f46a98303972b362a4d5fc9f0e16c797c
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37574

11 years agoCHROMIUM: drm/exynos: remove KDS calls from destroy_fb
Mandeep Singh Baines [Thu, 29 Nov 2012 05:18:57 +0000 (21:18 -0800)]
CHROMIUM: drm/exynos: remove KDS calls from destroy_fb

The reference counting of exynos_fb makes the KDS code redundant.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch, sign in/out.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I4f0b327a8cbc6f5db775b5fc24475305d19e3610
Reviewed-on: https://gerrit.chromium.org/gerrit/38898

11 years agoCHROMIUM: drm/exynos: get/put the fb for every page flip
Mandeep Singh Baines [Wed, 28 Nov 2012 23:38:19 +0000 (15:38 -0800)]
CHROMIUM: drm/exynos: get/put the fb for every page flip

We had been using kds to prevent unmapping the fb while its
under scanout. But not all fbs are KDS-backed nor is it a
good idea to assume user-space is exporting all fbs.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch, sign in/out.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I33958f65f961d328db75c32c5597edd5666fb708
Reviewed-on: https://gerrit.chromium.org/gerrit/38897
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm/exynos: make exynos_drm_fb_release callable from atomic context
Mandeep Singh Baines [Wed, 28 Nov 2012 21:04:28 +0000 (13:04 -0800)]
CHROMIUM: drm/exynos: make exynos_drm_fb_release callable from atomic context

We want to be able to call fb_put from the finish_pageflip. To fix
the IOMMU page fault issue we need to grab/release a ref for every
page flip.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Verify that we aren't leaking (see below).

localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
5 objects, 12709888 bytes
localhost ~ # restart ui
ui start/running, process 3529
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
5 objects, 12709888 bytes

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I48507f23345e232ef8492e0d86aef9c25ae5a41b
Reviewed-on: https://gerrit.chromium.org/gerrit/38896

11 years agoCHROMIUM: drm/exynos: add refcount to exynos_drm_fb
Mandeep Singh Baines [Wed, 28 Nov 2012 19:43:36 +0000 (11:43 -0800)]
CHROMIUM: drm/exynos: add refcount to exynos_drm_fb

We will use the refcounting in a follow-up CL to prevent early
unmapping of fbs.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Verify that we aren't leaking (see below).

localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
5 objects, 12709888 bytes
localhost ~ # restart ui
ui start/running, process 3529
localhost ~ # cat /sys/kernel/debug/dri/0/exynos_gem_objects
5 objects, 12709888 bytes

Change-Id: Ia440a9f4d4d954f9c1807853e60a4117b70e6c8b
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38895

11 years agoCHROMIUM: drm/exynos: framebuffers should hold a gem object reference
Mandeep Singh Baines [Wed, 28 Nov 2012 06:39:43 +0000 (22:39 -0800)]
CHROMIUM: drm/exynos: framebuffers should hold a gem object reference

To prevent the fb from being freed from underneath us, we need to
hold a reference.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch, sign in/out.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I546e9f4c35d46215b4d354037441b3d48ba0734e
Reviewed-on: https://gerrit.chromium.org/gerrit/38894

11 years agoCHROMIUM: serial: samsung: Restore IRQ mask during noirq resume
Michael Spang [Fri, 9 Nov 2012 01:06:06 +0000 (20:06 -0500)]
CHROMIUM: serial: samsung: Restore IRQ mask during noirq resume

This closes a window where the system may hang in resume as soon as the
UART interrupt is enabled and before the mask is restored. The hang occurs
because the driver can't handle IRQs it thinks are masked.

This also removes the code to mask all irqs from s3c24xx_serial_resetport,
which would overwrite the restored mask. The mask is now always already
set when this function is called.

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

Change-Id: I421db634443d331ee8762236d08151c5be4d4e81
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37713
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoCHROMIUM: exynos: Fix lockdep warning in exynos_ohci_suspend
Michael Spang [Fri, 26 Oct 2012 21:55:34 +0000 (17:55 -0400)]
CHROMIUM: exynos: Fix lockdep warning in exynos_ohci_suspend

On the first suspend with lockdep (CONFIG_PROVE_LOCKING) enabled I get
the following warning:

[   27.873728] powerd_suspend/2517 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
[   27.873734]  (clocks_mutex){+.+...}, at: [<403ea954>] clk_get_sys+0x34/0xd8
[   27.873752]
[   27.873754] and this task is already holding:
[   27.873759]  (&(&ohci->lock)->rlock){-.....}, at: [<40335d6c>] exynos_ohci_suspend+0x34/0x94
[   27.873774] which would create a new lock dependency:
[   27.873779]  (&(&ohci->lock)->rlock){-.....} -> (clocks_mutex){+.+...}
[   27.873794]
[   27.873795] but this new dependency connects a HARDIRQ-irq-safe lock:
[   27.873800]  (&(&ohci->lock)->rlock){-.....}

We can avoid this by not calling phy_exit() with the OHCI mutex held.

TEST=suspend with CONFIG_PROVE_LOCKING enabled
BUG=chromium-os:35769

Change-Id: I1c1616b4958094bae5a97ea522262606f4aa749e
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36730
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agodrm/exynos: Remove the i2c drivers and use devtree
Sean Paul [Thu, 29 Nov 2012 21:37:05 +0000 (16:37 -0500)]
drm/exynos: Remove the i2c drivers and use devtree

The i2c client was previously being passed into the hdmi driver via a
dedicated i2c driver, and then a global variable. This patch removes all
of that and just uses the device tree to get the i2c_client. This patch
also properly references the client so we don't lose it before we're
done with it.

BUG=None
TEST=Tested boot & hotplug, no regressions found

Change-Id: I11b8565cecf6c8290851339f923c46ae5513dc74
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38940
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoRevert "mwifiex: change multi-port aggregation buffer size to 4K"
Alim Akhtar [Fri, 30 Nov 2012 06:51:43 +0000 (12:21 +0530)]
Revert "mwifiex: change multi-port aggregation buffer size to 4K"

This reverts commit 63653599adc03b37ec2620d151aea6eb7f706fc5.

As we have fixed the limitation of the SDIO stack to handle more then
4K of data, limiting mwifi driver to 4K is not needed.
Switing back to the original 8K/8K rx/tx buffer size for mwifi driver.

BUG=chrome-os-partner:10987
TEST=with CL 38513, we are not seeing the wifi error we use to see with
8k/8k buffer size and its improves the wifi performance.

Change-Id: Iee0f9274332aabd337d9ed461f5a3ffbff43e12a
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/38990
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

11 years agoUPSTREAM: mmc: sdio: Use multiple scatter/gather list
Kyoungil Kim [Mon, 22 Oct 2012 11:01:00 +0000 (20:01 +0900)]
UPSTREAM: mmc: sdio: Use multiple scatter/gather list

Before this patch, we always used only single sg entry for SDIO transfer.
This patch switches to using multiple sg entries. In the case of dwmci,
it supports only up to 4KB size per single sg entry. So if we want to
transfer more than 4KB, we should send more than 1 command.

When we tested before applying this patch, it took around 335 us for
5K(5120) bytes transfer with dwmci controller. After applying this patch,
it takes 242 us for 5K bytes. So this patch makes around 38% performance
improvement for 5K bytes transfer. If the transfer size is bigger, then
the performance improvement ratio will be increased.

BUG=chrome-os-partner:10987
BUG=chrome-os-partner:11963
TEST=with this CL we can use 8k/8k tx/rx buffer size from mwifi driver,
can see wifi performace improved. See bug 10987 for actual data.

Signed-off-by: Kyoungil Kim <ki0351.kim@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
(cherry picked from commit 221d82616bcea64dfa8787fc6fc78f669f8d2e3e)

Change-Id: Ia578078e610766b5dcb593506d07407b9e654d46
Reviewed-on: https://gerrit.chromium.org/gerrit/38513
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
11 years agoCHROMIUM: drm/exynos: Fix compile warning in dp_core
Daniel Kurtz [Thu, 29 Nov 2012 08:59:20 +0000 (16:59 +0800)]
CHROMIUM: drm/exynos: Fix compile warning in dp_core

In function 'exynos_dp_hotplug':
warning: 'voltage_swing' may be used uninitialized in this function
[-Wmaybe-uninitialized]

While it may be impossible for dp->link_train.lane_count to be 0, the
compiler can't know that.  If it is 0 for some reason, then voltage_swing
does not get set in the lane loop and therefore
exynos_dp_check_max_cr_loop() gets called with a bogus voltage_swing.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36770
TEST=builds without the warning

Change-Id: Ia19a0439487995bd600570e0f32bf4a4c31e4407
Reviewed-on: https://gerrit.chromium.org/gerrit/38901
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: refactor exynos_user_fb_create
Mandeep Singh Baines [Tue, 27 Nov 2012 21:20:42 +0000 (13:20 -0800)]
CHROMIUM: drm/exynos: refactor exynos_user_fb_create

Remove the obj parameter from exynos_drm_framebuffer_init.
This allows us to simplify the code and makes it easier to
implement some of later CLs in this series.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch. Sign out/Sign in.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I7440bfd4d318620cbbd24713063b26a197b46e50
Reviewed-on: https://gerrit.chromium.org/gerrit/38893

11 years agoBACKPORT: drm/i915: add register read IOCTL
Ben Widawsky [Thu, 12 Jul 2012 18:01:05 +0000 (11:01 -0700)]
BACKPORT: drm/i915: add register read IOCTL

The interface's immediate purpose is to do synchronous timestamp queries
as required by GL_TIMESTAMP. The GPU has a register for reading the
timestamp but because that would normally require root access through
libpciaccess, the IOCTL can provide this service instead.

Currently the implementation whitelists only the render ring timestamp
register, because that is the only thing we need to expose at this time.

v2: make size implicit based on the register offset
Add a generation check

Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jacek Lawrynowicz <jacek.lawrynowicz@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: fixup the ioctl numerb:]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit c0c7babc48c4f6943ed3070d04630ea3ac9272ee)
Signed-off-by: Frank Henigman <fjhenigman@chromium.org>
Conflicts:

drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
include/drm/i915_drm.h

BUG=chromium-os:36372
TEST=look for GL_ARB_timer_query chrome://gpu

Change-Id: If192a96c0b0ede868993556640679ddd18688300
Reviewed-on: https://gerrit.chromium.org/gerrit/38835
Commit-Ready: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Tested-by: Frank Henigman <fjhenigman@chromium.org>
11 years agoCHROMIUM: media: s5p-mfc: Change DPB flush mechanism
Arun Kumar K [Wed, 14 Nov 2012 12:31:39 +0000 (18:01 +0530)]
CHROMIUM: media: s5p-mfc: Change DPB flush mechanism

In stop_streaming, DPB_FLUSH was called un-conditionally earlier.
So it causes issues when the DPB_FLUSH command is given even before
MFC initialization is completed. The patch modifies the stop_streaming
function to call DPB_FLUSH only if the current state is RUNNING.
Also some cleanup is done for the DPB flush implementation.

BUG=chrome-os-partner:16083
TEST=Tested with VDA app and playback tested in browser

Change-Id: If8ab570ecbe5f1e1375b1c2f1b0aa500237eaa3a
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/38017
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Commit-Ready: Pawel Osciak <posciak@chromium.org>

11 years agoCHROMIUM: drm/exynos: fix leak in exynos_drm_framebuffer_init
Mandeep Singh Baines [Tue, 27 Nov 2012 21:20:42 +0000 (13:20 -0800)]
CHROMIUM: drm/exynos: fix leak in exynos_drm_framebuffer_init

There was a leak in one of the error paths.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=VT Switch. Browse some sites.

Change-Id: Iddb946c43c8b25ef3b66e3c5e9c73b5e564bb334
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38892
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm/exynos: Pass drm_display_mode to exynos_panel_ops.mode_set
Daniel Kurtz [Sat, 24 Nov 2012 13:22:39 +0000 (21:22 +0800)]
CHROMIUM: drm/exynos: Pass drm_display_mode to exynos_panel_ops.mode_set

Specifying the actual type is cleaner and lets the compiler type check
for us.  It will also make it possible to add some DRM_DEBUG messages
that access the mode object in the mode_set() handlers.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36608
TEST=builds clean

Change-Id: Ida2149a2e1bf3a3c57b528350f36e31fef8f6b4d
Reviewed-on: https://gerrit.chromium.org/gerrit/38889
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: Remove useless return
Daniel Kurtz [Sat, 24 Nov 2012 11:32:14 +0000 (19:32 +0800)]
CHROMIUM: drm/exynos: Remove useless return

What is the point of an explicit return from the end of a void function?

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=builds clean

Change-Id: Id5ad01de502bc219dbc04034e1f96e29f5a06b04
Reviewed-on: https://gerrit.chromium.org/gerrit/38888
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: Fix compiler warning in hdmi_get_edid
Daniel Kurtz [Sat, 24 Nov 2012 12:12:57 +0000 (20:12 +0800)]
CHROMIUM: drm/exynos: Fix compiler warning in hdmi_get_edid

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36607
TEST=compiles without:
  warning: return makes pointer from integer without a cast

Change-Id: I0d20f309180329f2875fcfd3259de87e56751cab
Reviewed-on: https://gerrit.chromium.org/gerrit/38887
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>
11 years agoCHROMIUM: config: normalize config (no functional change)
Grant Grundler [Thu, 29 Nov 2012 00:43:53 +0000 (16:43 -0800)]
CHROMIUM: config: normalize config (no functional change)

adds DRM_EXYNOS_DEBUG, DRM_PTN3460, XOR_BLOCKS
churn on MALI_HWC_TRACE, RT2X00_* options

BUG=chromium-os:36732
TEST=run ./chromeos/scripts/kernelconfig oldconfig and confirm
there are no additional changes.

Change-Id: I82cdf0cf490033c6defa2342c0840a61e0c0ccc5
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38879
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agomwifiex: fix struct member mismatch
Johannes Berg [Wed, 28 Nov 2012 20:53:45 +0000 (21:53 +0100)]
mwifiex: fix struct member mismatch

Using bss->information_elements and treating
bss->len_beacon_ies as its size is wrong, the
real size is len_information_elements.

Found while I was reviewing the use of this
cfg80211 API (as it is actually potentially
broken due to races.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=None
TEST=Boot, associate

Change-Id: I52a58aaa3b7abf66f032e9f1f4ce5248fdb60c89
Reviewed-on: https://gerrit.chromium.org/gerrit/38846
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132: Set effect settings during initialization.
Chih-Chung Chang [Tue, 27 Nov 2012 03:54:01 +0000 (11:54 +0800)]
CHROMIUM: ALSA: hda/ca0132: Set effect settings during initialization.

We did not restore the effect settings after resume, so the hardware
used default values for them. This caused "Surround" to be turned on
after resume.

Now we always set the effect settings in ca0132_init(), so the settings
in hardware and in kernel are in sync.

This patch is provided by Creative.

BUG=chrome-os-partner:16197
TEST=check the output from headphone.

Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Change-Id: Ida0977d2e50cf05e7a216de29df84ae356a3f45c
Reviewed-on: https://gerrit.chromium.org/gerrit/38719
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Chih-Chung Chang <chihchung@google.com>
Tested-by: Chih-Chung Chang <chihchung@google.com>
11 years agoCHROMIUM: chromeos_arm: factor out vbc access
Che-Liang Chiou [Mon, 19 Nov 2012 21:04:22 +0000 (13:04 -0800)]
CHROMIUM: chromeos_arm: factor out vbc access

Factor out vbc access from chromeos_arm in preparation for abstracting
vbc interface and for supporting access of vbc on ec.

Also, make it try to search device from phandle (though not it does not
fully work yet).

BUG=chrome-os-partner:15609
TEST=manual, add debugging sysfs entry to call
     chromeos_platform_read/write_vboot_context, and test that the
     driver can actually access vboot context on disk.

Change-Id: Iea610e35b2f299926ebd14b4ffbe73566d8ad7c7
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38324
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoCHROMIUM: config: Remove duplicate CONFIG_RT2xxx
Paul Stewart [Wed, 28 Nov 2012 20:32:46 +0000 (12:32 -0800)]
CHROMIUM: config: Remove duplicate CONFIG_RT2xxx

Fix-up entires so global chromeos/config/base.config entries
are all we need.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:36732,chromium-os:35699
TEST=emerge-{parrot,daisy,x86-alex} chromeos-kernel:
Ensure prepareconfig does not fail due to CONFIG_RT* (it fails in
all of these platforms but for other reasons than my changes)

Change-Id: I32be7178c5cf255392d9b015797b0a17cba5918f
Reviewed-on: https://gerrit.chromium.org/gerrit/38839
Tested-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>

11 years agoCHROMIUM: conifig: base added bootcache
Paul Taysom [Mon, 19 Nov 2012 21:44:03 +0000 (13:44 -0800)]
CHROMIUM: conifig: base added bootcache

Turned on the kernel configuration for bootcache. This does
not enable it for booting. Just compiles in the device
mapper for bootcache.

BUG=chromium-os:25441
TEST=autotest kernel_Bootcache.py

Change-Id: I299abac07c5d4fa5992c240f3197c7566d57bd83
Signed-off-by: Paul Taysom <taysom@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38330
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: arch/arm: Remove duplicated code in syscall_trace
Michael Spang [Fri, 23 Nov 2012 22:52:42 +0000 (17:52 -0500)]
CHROMIUM: arch/arm: Remove duplicated code in syscall_trace

This is breaking the ptrace syscall on ARM. Looks like a mismerge in
5ea62181 ("CHROMIUM: arch/arm: move secure_computing into trace").

TEST=ran "strace true"
BUG=chromium-os:36102

Change-Id: Ic377577216bed3672201ca71604f650c1b8b3f0c
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38602
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agosamsung: snow: bitfix: Bail if any pages in a bad chunk were skipped
Doug Anderson [Tue, 27 Nov 2012 21:24:30 +0000 (13:24 -0800)]
samsung: snow: bitfix: Bail if any pages in a bad chunk were skipped

If we didn't store recovery info for any of the pages in a bad chunk
then we'll consider it an unrecoverable error and reboot.  The old
code only checked the first page in the chunk.  With 8K chunks this
was only a 50% hit rate.

We could just choose to recover the page whose recovery info we have.
We don't do that because there is often more than one bit error in a
chunk and it seems better to error on the side of rebooting.

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

Change-Id: Ic578bcfaf19efa33f0cc118c9a2f5ca64e5063bb
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38752
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoregulator: tps65090: Retry FET enable in case of failure
Simon Glass [Mon, 26 Nov 2012 22:59:01 +0000 (14:59 -0800)]
regulator: tps65090: Retry FET enable in case of failure

Sometimes the FET fails to enable but instead gives a timeout error. This
may be a fault with the TPS65090. Turning off the FET and trying again seems
to clear the fault, so do this.

BUG=chrome-os-partner:16222
TEST=manual
Build and boot kernel using a firmware which does not enable the backlight.
See that LCD backlight turns on.

Also need to test on a unit which enhibits the 'no backlight on resume'
problem.

Change-Id: Idb5d867d32b4a290c6afd3d326e8c8f8678588d3
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38679
Reviewed-by: Michael Spang <spang@chromium.org>
Tested-by: Michael Spang <spang@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: rts_pstor: prevent deadlock and detection issues
Derek Basehore [Tue, 27 Nov 2012 04:07:12 +0000 (20:07 -0800)]
CHROMIUM: rts_pstor: prevent deadlock and detection issues

Patch from Realtek that fixes a deadlock issue when combined with removing the
sdhci_pci module from the kernel. This disables the card interrupt over the bus
and something else that's undocumented.

The change also prevents issues with the card reader either not detecting an SD
card insertion or removal.

TEST=suspend, insert sd card, resume
BUG=chrome-os-partner:14934, chrome-os-partner:16053

Change-Id: Ibe81ab819662b8d6721dcfe5357d12eaf2a2335d
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38713
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
11 years agoUPSTREAM: RTC: Avoid races between RTC alarm wakeup and suspend.
NeilBrown [Sun, 5 Aug 2012 20:56:20 +0000 (22:56 +0200)]
UPSTREAM: RTC: Avoid races between RTC alarm wakeup and suspend.

If an RTC alarm fires just as suspend is happening, it is possible for
suspend to complete and the alarm to be missed.

To avoid the race, we must register the event with the PM core.

As the event is made visible to userspace through a thread which is
only scheduled by the interrupt, we need a pm_stay_awake/pm_relax
pair preventing suspend from the interrupt until the thread completes
its work.

This makes the pm_wakeup_event() call in cmos_interrupt unnecessary as
it provides suspend protection for all RTCs that use rtc_update_irq.

BUG=chromium-os:36570
TEST=Fire wakealarm, check wakeup_count for increase:
  cat /sys/power/wakeup_count
  echo +1 >| /sys/class/rtc/rtc0/wakealarm
  sleep 1
  cat /sys/power/wakeup_count

Change-Id: I7dfc88bf6f95d0c5916b7e6ba751a56c62b5b82d
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38480
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoUPSTREAM: cpuidle: Measure idle state durations with monotonic clock
Julius Werner [Tue, 13 Nov 2012 02:10:14 +0000 (18:10 -0800)]
UPSTREAM: cpuidle: Measure idle state durations with monotonic clock

Many cpuidle drivers measure their time spent in an idle state by
reading the wallclock time before and after idling and calculating the
difference. This leads to erroneous results when the wallclock time gets
updated by another processor in the meantime, adding that clock
adjustment to the idle state's time counter.

If the clock adjustment was negative, the result is even worse due to an
erroneous cast from int to unsigned long long of the last_residency
variable. The negative 32 bit integer will zero-extend and result in a
forward time jump of roughly four billion milliseconds or 1.3 hours on
the idle state residency counter.

This patch changes all affected cpuidle drivers to either use the
monotonic clock for their measurements or make use of the generic time
measurement wrapper in cpuidle.c, which was already working correctly.
Some superfluous CLIs/STIs in the ACPI code are removed (interrupts
should always already be disabled before entering the idle function, and
not get reenabled until the generic wrapper has performed its second
measurement). It also removes the erroneous cast, making sure that
negative residency values are applied correctly even though they should
not appear anymore.

BUG=chrome-os-partner:15864
TEST=Print /sys/.../cpuidle/state*/time in a loop, and update the
system clock concurrently.

Has been accepted upstream by Rafael J. Wysocki at
https://lkml.org/lkml/2012/11/27/435

Change-Id: If53c1e60358f62679d29130b14a68487125ff164
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Len Brown <len.brown@intel.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/37874
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoCHROMIUM: config: Don't pre-empt RT2800USB module in ARM
Paul Stewart [Wed, 24 Oct 2012 23:03:04 +0000 (16:03 -0700)]
CHROMIUM: config: Don't pre-empt RT2800USB module in ARM

Allow RT2800USB module to build on ARM platforms.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:35699
TEST=Boot system, do "ifconfig"

Change-Id: Ib24debfda9cfe2956a53656c3209fd6f9fcea3c9
Reviewed-on: https://gerrit.chromium.org/gerrit/38744
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoBACKPORT: drm/i915/dp: allow configuring eDP panel fitting scaling mode
Yuly Novikov [Mon, 26 Nov 2012 21:04:32 +0000 (16:04 -0500)]
BACKPORT: drm/i915/dp: allow configuring eDP panel fitting scaling mode

LVDS allowed changing panel fitting scaling mode, while eDP didn't.
Copied relevant code from LVDS to eDP.
This also changed eDP default scaling mode to respect aspect ratio.

This patch was upstreamed as commits
53b41837935a4016852b30a6242a510e6927f9c7 and
8e740cd19fd3878453a3794e53c5252110697581,
which currently are on their way into linus' repo, and can be found in
git://people.freedesktop.org/~airlied/linux branch drm-next.

This version of the patch is a bit different from aforementioned commits,
but since backporting them would require cherry-picking 17 more commits,
it was decided to use this version instead.

BUG=chrome-os-partner:13682
TEST=Plug external monitor, switch to mirror mode,
check that aspect ratio is preserved (image is letterboxed/pillarboxed).

Signed-off-by: Yuly Novikov <ynovikov@chromium.org>
Change-Id: If1610945ccd1d69c3afa968916667fbb7de9ee40
Reviewed-on: https://gerrit.chromium.org/gerrit/33355
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: usb: dwc3: allow to configure the XHCI to use the internal clock
Vincent Palatin [Tue, 27 Nov 2012 00:13:41 +0000 (16:13 -0800)]
CHROMIUM: usb: dwc3: allow to configure the XHCI to use the internal clock

Remove the hardcoded assumption that we have an external PLL for the USB3 clock.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:16351
TEST=on Spring, plug on usb key on USB3 port and browse the content.

Change-Id: I0bf2a3604b3009abbcdfe3b0daf9d7fcccf1438c
Reviewed-on: https://gerrit.chromium.org/gerrit/38684
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>

11 years agoCHROMIUM: gobi: Move qcusbnet_put locking into free_dev
Michael Spang [Wed, 14 Nov 2012 23:27:08 +0000 (18:27 -0500)]
CHROMIUM: gobi: Move qcusbnet_put locking into free_dev

If the qcusbnet struct is freed through kobject_put instead of
qcusbnet_put, then we're not taking the lock that protects qcusbnet_list.
That's currently only possible if the struct is freed in cdev_put.

This bug was introduced in ae884f3 ("gobi: Keep struct qcusbnet alive
while cdev is alive").

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

Change-Id: Ic34f7132e0e1a5724f02149b33f45ca71fa876f1
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38078
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: exynos: dts: do not use external PLL for USB3 on Spring
Vincent Palatin [Tue, 27 Nov 2012 00:17:06 +0000 (16:17 -0800)]
CHROMIUM: exynos: dts: do not use external PLL for USB3 on Spring

Move the enable gpio configuration for the USB3 PLL to the machine
device tree files, and do not define it on Spring, so the dwc3 driver
assumes that we only use the internal clock.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:16351
TEST=on Spring, plug on usb key on USB3 port and browse the content.

Change-Id: If8f91a34a0cadedada2ad627681a7fe83a6e5c12
Reviewed-on: https://gerrit.chromium.org/gerrit/38685
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>

11 years agodrm/exynos: do not support CONTIG gem buffer allocation
Prathyush K [Mon, 19 Nov 2012 07:36:54 +0000 (13:06 +0530)]
drm/exynos: do not support CONTIG gem buffer allocation

Currently, drm framework only supports allocation and mapping of
non-contig gem buffers. In the next versions of drm (v3.7),
this option to choose contig/non-contig is not supported. So for now,
we just return error in case user asks for contig gem buffers.

BUG=chrome-os-partner:15569
TEST=Built kernel and booted on snow.

Change-Id: Ibb164e812f4d175b6601145dffab1aaec28de4f5
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/38291
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Akshu Agrawal <akshu@chromium.org>
11 years agoUPSTREAM: perf tools: do not flush maps on COMM for perf report
Luigi Semenzato [Tue, 21 Aug 2012 21:52:20 +0000 (14:52 -0700)]
UPSTREAM: perf tools: do not flush maps on COMM for perf report

This fixes a long-standing bug caused by the lack of separate COMM and EXEC
record types, which makes "perf report" lose track of symbols when a process
renames itself.

With this fix (suggested by Stephane Eranian), a COMM (rename) no longer
flushes the maps, which is the correct behavior.  An EXEC also no longer
flushes the maps, but this doesn't matter because as new mappings are created
(for the executable and the libraries) the old mappings are automatically
removed.  This is not by accident: the functionality is necessary because DLLs
can be explicitly loaded at any time with dlopen(), possibly on top of existing
text, so "perf report" handles correctly the clobbering of new mappings on top
of old ones.

An alternative patch (which I proposed earlier) would be to introduce a
separate PERF_RECORD_EXEC type, but it is a much larger change (about 300
lines) and is not necessary.

Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Stephane Eranian <eranian@google.com>
Acked-by: Stephane Eranian <eranian@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Olof Johansson <olofj@chromium.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Sonny Rao <sonnyrao@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Stephen Wilson <wilsons@start.ca>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vasiliy Kulikov <segoon@openwall.com>
Link: http://lkml.kernel.org/r/1345585940-6497-1-git-send-email-semenzato@chromium.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 9fdbf671ba7e8adb2cbb93d716232ebcab55f6bd)

BUG=chromium-os:26115
TEST=manual (see bug/original commit in 3.0)

Change-Id: Ie1fe97535430a989c3c925b30aa90e462e6eb37d
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38676
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
11 years agodrm/exynos: dp: Reduce video stream detection time
Sean Paul [Wed, 21 Nov 2012 17:38:40 +0000 (12:38 -0500)]
drm/exynos: dp: Reduce video stream detection time

Reduce the time we take for video stream detection by removing the
"done_count" wait of 1.1s since it's not blocking anything from
happening.

Also replace the msleep(100) with a usleep_range since we don't need to
wait 100ms to retry the detection.

BUG=chrome-os-partner:15261
TEST=Tested on snow, display on time reduced from 1.3s to 90ms

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ib4ef14352256b6b6627a3dff8bf77db2f368e547
Reviewed-on: https://gerrit.chromium.org/gerrit/38470
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agowatchdog: s3c2410: Avoid excessive petting during cpufreq
Doug Anderson [Fri, 7 Sep 2012 18:12:01 +0000 (11:12 -0700)]
watchdog: s3c2410: Avoid excessive petting during cpufreq

On more modern Samsung SoCs (like exynos5) the watchdog is
parented on a clock that doesn't change.  Avoid all of the extra
petting, disabling, and re-enabling of the watchdog in the case
that the clock never changes.

NOTE: As pointed out in
  <https://gerrit.chromium.org/gerrit/#/c/31465/>

...the proper way would be to register a notifier for the clock
directly, but CONFIG_COMMON_CLK isn't enabled.

BUG=chrome-os-partner:9403
TEST=If I open /dev/watchdog now it eventually dies.

Change-Id: I4f982dc85caf091444633aff94b90d524bdfe829
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32566
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Grant Grundler <grundler@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUMOS: mwifiex: Disable transmit aggregation
Paul Stewart [Wed, 21 Nov 2012 22:28:44 +0000 (14:28 -0800)]
CHROMIUMOS: mwifiex: Disable transmit aggregation

Disable requesting transmit aggregation.  In situations where
the firmware receives a particular type of ADDBA response, it
enters a Block-Ack-Request loop and no further frames are
transmitted.  Until this larger issue is addressed, we cannot
safely request aggregation.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:12192
TEST=Associate with modified mac80211-based AP which returns
a Block-Ack-ADDBA response with only 1 buffer allowed.

Change-Id: Icb532a118bb90eca867784fd9b05bf850404e974
Reviewed-on: https://gerrit.chromium.org/gerrit/38483
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: gobi: Fix qcusbnet leak in devqmi_open
Michael Spang [Tue, 13 Nov 2012 23:13:42 +0000 (18:13 -0500)]
CHROMIUM: gobi: Fix qcusbnet leak in devqmi_open

We're taking a reference to qcusbnet in devqmi_open and not releasing
it in the error path. This plugs that leak.

BUG=chrome-os-partner:16158
TEST=suspended the machine a few times, started and stopped cromo

Change-Id: I729aa5160baa4a64beaa1b7b92ac39e35319f799
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37953
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: gobi: Fix qcusbnet leak in QMI_CLOSE ioctl
Michael Spang [Tue, 13 Nov 2012 23:13:42 +0000 (18:13 -0500)]
CHROMIUM: gobi: Fix qcusbnet leak in QMI_CLOSE ioctl

The handle cleanup path in the QMI_CLOSE ioctl leaks a reference to
qcusbnet (taken in devqmi_open). This patch unifies that cleanup code
with the code from devqmi_release and fixes the leak.

BUG=chrome-os-partner:16158
TEST=suspended the machine a few times, started and stopped cromo

Change-Id: I970a20fd67ebf8d1e65526ccca41f13c2aa97b44
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37955
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
11 years agoCHROMIUM: gobi: Remove leaky replacement of fops in devqmi_write
Michael Spang [Wed, 14 Nov 2012 22:14:51 +0000 (17:14 -0500)]
CHROMIUM: gobi: Remove leaky replacement of fops in devqmi_write

The devqmi_write function sometimes overwrites devqmi_fops with
def_chr_fops. When that happens, the devqmi_fops reference is leaked,
and the file is never cleaned up because devqmi_release is not called.

It's not clear what this is for, and it looks like the other file
callbacks already check device_valid() before doing anything.
Therefore we can probably just remove this.

BUG=chrome-os-partner:16158
TEST=suspend_stress_test; stop cromo; cat /sys/module/gobi/refcnt

Change-Id: Ie8aecf98784165629864c90b60ee1c20d2106bef
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38058
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agodrm/exynos: Clean up fimd mode handling
Sean Paul [Tue, 20 Nov 2012 15:56:54 +0000 (10:56 -0500)]
drm/exynos: Clean up fimd mode handling

FIMD has been using the panel timing data straight from the driver's
platform data instead of the data that is provided via the drm layer.
This makes things difficult if we want to use EDID data from the dp
driver, since it would be ignored. This patch changes FIMD to just
use the platform panel data as a seed to get_panel. From then on, we use
the overlay data that is set via modeset.

This patch also removes the panel array, since we only want one
resolution from platform data.

BUG=chrome-os-partner:11158
TEST=Tested on snow, no regressions noted

Change-Id: I345c3663509e6820a745b85c4b9a37f77f42c0d2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38409
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agodrm/exynos: dp: Check hp gpio in hp detect function
Sean Paul [Mon, 19 Nov 2012 19:49:29 +0000 (14:49 -0500)]
drm/exynos: dp: Check hp gpio in hp detect function

Check the hotplug gpio in the hpd function so we know when it's
asserted. This fixes the return value of the is_connected callback.

BUG=chrome-os-partner:16280
TEST=None

Change-Id: I1ab0c7d830ecdc7b7f38ffd81895038978e4e57a
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38319
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agodrm/i2c: ptn3460: Add dev node check to ready wait
Sean Paul [Mon, 19 Nov 2012 19:41:09 +0000 (14:41 -0500)]
drm/i2c: ptn3460: Add dev node check to ready wait

Check for the ptn dev node in the ready wait function to avoid blocking
boards without ptn for 30 seconds.

BUG=chrome-os-partner:16280
TEST=None

Change-Id: I0057e7b72d9841447a56167617b9f081f5bbbe18
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38317
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: config: Add RT2800USB module
Paul Stewart [Wed, 24 Oct 2012 23:03:04 +0000 (16:03 -0700)]
CHROMIUM: config: Add RT2800USB module

Add support for the RT2800 USB WiFi device.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:35699
TEST=Boot system, do "ifconfig"
CQ-DEPEND=Iea82c1e6b1d7f9c5181cef11fcf25a5ee2da114b

Change-Id: Ic02543da81191c8e6bf39e9e90d8fc2c86128b39
Reviewed-on: https://gerrit.chromium.org/gerrit/36834
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agodrm/exynos: Let drm handle edid allocations
Sean Paul [Tue, 20 Nov 2012 19:19:00 +0000 (14:19 -0500)]
drm/exynos: Let drm handle edid allocations

There's no need to allocate edid twice and do a memcpy when drm helpers
exist to do just that. This patch cleans that interaction up, and
doesn't keep the edid hanging around in the connector.

BUG=chromium-os:36513
TEST=Tested on snow boot/hotplug/idle suspend/lid suspend

Change-Id: Ifb971a7a6c6ae66ce431b9a256886d9699adbd09
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38406

11 years agodrm/exynos: Add drm notification of hotplug to dp
Sean Paul [Tue, 20 Nov 2012 15:55:18 +0000 (10:55 -0500)]
drm/exynos: Add drm notification of hotplug to dp

Instead of polling the connector for hotplug, use the hotplug workqueue
to fire a drm hotplug notification when we detect a cable change.

This will also update userspace when the state has changed, and notify
fbdev.

At this point in time, the patch should be a no-op, but it's important
if we want to use EDID to mode set.

BUG=chrome-os-partner:11158
TEST=Tested on snow, no regressions detected

Change-Id: Ib6b0c789f6abc45a118a04dcb8a73e8e35fd4a85
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38408
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoRevert "DRM/exynos: Fix Memory Leak: free EDID block returned by drm_get_edid()."
Sean Paul [Tue, 20 Nov 2012 19:33:09 +0000 (11:33 -0800)]
Revert "DRM/exynos: Fix Memory Leak: free EDID block returned by drm_get_edid()."

This reverts commit e04984d087c95d7dd09be7cb6cb84e1f339c4f17. The patch causes kernel panic since it frees that memory twice once in the panel_op, and then again in the connector function.

Change-Id: I26173e1664733acea4abad9a731c4f7d98efe18a
Reviewed-on: https://gerrit.chromium.org/gerrit/38405
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
11 years agoCHROMIUM: platform: rename nvram to vbc
Che-Liang Chiou [Fri, 9 Nov 2012 01:34:50 +0000 (17:34 -0800)]
CHROMIUM: platform: rename nvram to vbc

As we are actually accessing vboot context and vboot context is not
limited to be stored on nvram, it is clearer to just call it vbc.

This change also removes obsolete comments and makes API interface
consistent (all read/write should return number of bytes instead of zero
on success).

BUG=none
TEST=manual, add debugging sysfs entry to read/write vboot context and
     make sure it works.

Change-Id: Ifd097a1a8af9edb776eed83fe47cb332f8a3445d
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37686
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoCHROMIUM: vmx: control vmx correctly on resume
Ronald G. Minnich [Fri, 16 Nov 2012 22:13:51 +0000 (14:13 -0800)]
CHROMIUM: vmx: control vmx correctly on resume

On x86 chromeos systems with vmx support, the feature is controlled by
the disablevmx flag. There are several boot paths for the CPUs
and this patch ensures that the resume path for the BSP is covered.

Rename cpu_disable_vmx to cpu_control_vmx. It's a bit more
descriptive since it does not disable vmx in all cases.
Further, have the function itself test the variable; this
is more in keeping with how other such capabilities
are controlled anyway and it keeps the variable in
file scope. Finally, make it all conditional on
CONFIG_CHROMEOS.

We use the variable to control the enable/disable instead
of saved CPU context. I could add the FEATURES MSR
to the saved context and use that on restore but
that adds more changes, and I've seen no evidence that anyone
outside chromeos is interested in disabling VMX, so it
makes more sense to me to limit the footprint of this
patch.

BUG=chrome-os-partner:10449
TEST=apply and boot with this patch.
dmesg | grep Disabling.VMX
Note that all four CPUs have it disabled.
Also
rdmsr 0 0x3a
and see the value.
Suspend any way you want. (powerd_suspend, close the lid, whatever).
Repeat and notice the Disabling message appears again,
for all four cores this time,
and the 0x3a MSRs all have the correct value.

Change-Id: Ie0160db31a1a058ce4d3e4f8752cd0e5d696ea84
Signed-off-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38235
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoDRM/exynos: Fix Memory Leak: free EDID block returned by drm_get_edid().
Stéphane Marchesin [Mon, 19 Nov 2012 23:01:46 +0000 (15:01 -0800)]
DRM/exynos: Fix Memory Leak: free EDID block returned by drm_get_edid().

This was just posted on the dri-devel list, and affects us also. It's
not a direct cherry-pick since we moved the code around.

BUG=none
TEST=by hand

Change-Id: Ibd76bc48094e466fe574af23d37c8df1e0262a8d
Signed-off-by: Egbert Eich <eich@suse.de>
Reviewed-on: https://gerrit.chromium.org/gerrit/38334
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>