cascardo/linux.git
11 years agoCHROMIUM: v4l2-m2m: use CAPTURE queue lock
John Sheu [Tue, 11 Dec 2012 06:33:50 +0000 (22:33 -0800)]
CHROMIUM: v4l2-m2m: use CAPTURE queue lock

In v4l2_m2m_try_schedule(), use the CAPTURE queue lock when accessing
the CAPTURE queue, instead of relying on just holding the OUTPUT queue
lock.

Signed-off-by: John Sheu <sheu@google.com>
BUG=chrome-os-partner:10057
BUG=chrome-os-partner:14521
TEST=local build, run on exynos

Change-Id: I3f90d703dd051201f338d8e5758d3036150c78a2
Reviewed-on: https://gerrit.chromium.org/gerrit/39537
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>

11 years agoCHROMIUM: v4l2/exynos: move CID enums into videodev2.h
John Sheu [Sat, 5 Jan 2013 03:08:53 +0000 (19:08 -0800)]
CHROMIUM: v4l2/exynos: move CID enums into videodev2.h

<UPSTREAM MERGE NOT REQUIRED>

Move some #defines for V4L_CID_* values out of gsc-core.h and into
videodev2.h, where they belong, as they are part of the userspace API.

Signed-off-by: John Sheu <sheu@google.com>
BUG=chromium-os:37294
BUG=chrome-os-partner:10057
TEST=local build, run on snow

Change-Id: Ib06cd97f8c294a0d5f42f0b2adfefe4d761b256f
Reviewed-on: https://gerrit.chromium.org/gerrit/40499
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>

11 years agoCHROMIUM: exynos: reset external HSIC hub
Vincent Palatin [Fri, 26 Oct 2012 16:24:51 +0000 (09:24 -0700)]
CHROMIUM: exynos: reset external HSIC hub

The former code was only ensuring that the reset line was released but
neither doing an actual reset pulse if it was already before nor
ensuring we had proper reset timings.
If the HSIC hub was used before booting (e.g on Spring, the external
USB2 port is connected the HSIC hub, so the bootloader is using it to
boot from USB), we need to do a proper 100us low reset pulse, then wait
for 4 ms for the hub to finish initialization (as per SMSC 3503
datasheet).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14490
TEST=boot on Spring from a USB key connected to the external USB2 port
(which is connected to the HSIC hub
boot on Snow, do a "lsusb" and see the internal USB peripherals
connected the HSIC hub are there (e.g."ID 1410:a021 Novatel wireless"
 and "ID 2232:1037" which is webcam).

Change-Id: Idb15188aa1b1d502387a5e67b3598d016eeb6ab7
Reviewed-on: https://gerrit.chromium.org/gerrit/36693
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoUPSTREAM: ext4: avoid hang when mounting non-journal filesystems with orphan list
Theodore Ts'o [Thu, 27 Dec 2012 06:42:50 +0000 (01:42 -0500)]
UPSTREAM: ext4: avoid hang when mounting non-journal filesystems with orphan list

When trying to mount a file system which does not contain a journal,
but which does have a orphan list containing an inode which needs to
be truncated, the mount call with hang forever in
ext4_orphan_cleanup() because ext4_orphan_del() will return
immediately without removing the inode from the orphan list, leading
to an uninterruptible loop in kernel code which will busy out one of
the CPU's on the system.

This can be trivially reproduced by trying to mount the file system
found in tests/f_orphan_extents_inode/image.gz from the e2fsprogs
source tree.  If a malicious user were to put this on a USB stick, and
mount it on a Linux desktop which has automatic mounts enabled, this
could be considered a potential denial of service attack.  (Not a big
deal in practice, but professional paranoids worry about such things,
and have even been known to allocate CVE numbers for such problems.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Cc: stable@vger.kernel.org
BUG=chromium-os:37768
TEST=link build, manual test with corrupted filesystem image

(cherry picked from commit 0e9a9a1ad619e7e987815d20262d36a2f95717ca)
Change-Id: I5e985a85e94f3b38f0dd5d8c1517c0bccc93eb04
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41038
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: ext4: make orphan functions be no-op in no-journal mode
Anatol Pomozov [Tue, 18 Sep 2012 17:38:59 +0000 (13:38 -0400)]
UPSTREAM: ext4: make orphan functions be no-op in no-journal mode

Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
BUG=chromium-os:37768
TEST=link build, manual test with corrupted filesystem image

(cherry picked from commit c9b92530a723ac5ef8e352885a1862b18f31b2f5)
Change-Id: I408cdaaa8872435f530a063bc84c3ca602e01b18
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41037
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 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>
11 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

11 years agoCHERRY-PICK: ARM: EXYNOS4: Support Charger Manager
MyungJoo Ham [Thu, 23 Jun 2011 02:27:17 +0000 (11:27 +0900)]
CHERRY-PICK: ARM: EXYNOS4: Support Charger Manager

The configuration is supposed to support Exynos4-NURI. However, we
expect that the configuration is mostly compatible with other Exynos4
platforms.

v2
- Remove undefined field of struct charger_desc (measure_ambient_temp)

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Change-Id: Ib568676b0af5fb22ca8bae29dcc8f7fb61e492e4
(cherry picked from commits 914a452e6ef714492bbbfafcec389313a044e760
and 27be8be090694878b8ff05a0611a46af0a8fb598
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40163
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: ARM: EXYNOS4: Add PMU Wakeup-Stat Register Bits
MyungJoo Ham [Wed, 2 May 2012 02:09:26 +0000 (11:09 +0900)]
CHERRY-PICK: ARM: EXYNOS4: Add PMU Wakeup-Stat Register Bits

Change-Id: Id40ac31fe388bf266a013003e056d9dfe23d7404
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
(cherry picked from commit c7284202121b663559e615e87ad447ea3f6177fb
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40162
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: Samsung SoC: support Charger Manager.
MyungJoo Ham [Tue, 27 Mar 2012 07:18:43 +0000 (16:18 +0900)]
CHERRY-PICK: Samsung SoC: support Charger Manager.

Change-Id: I9b01982d5ab01185517a6b948fb660a50a7fafd0
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 914a452e6ef714492bbbfafcec389313a044e760
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40161
Commit-Queue: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoexynos5: asv: Call the core ASV code early
Abhilash Kesavan [Fri, 21 Dec 2012 04:14:39 +0000 (09:44 +0530)]
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: I1ca234a770bbd8b2d590a83377ee44527327066b
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/40076
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoCHERRY-PICK: charger-manager: Workaround for checking state of charger before initial...
Chanwoo Choi [Tue, 8 May 2012 04:43:59 +0000 (13:43 +0900)]
CHERRY-PICK: charger-manager: Workaround for checking state of charger before initializaing cm

Change-Id: I071ec6bb9d9a9e3b749572cecbfdcef5f7f8be3d
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
(cherry picked from commit eaef7ab292ec455123d425a519abc399e68048af
in branch charger-manager-for-next of
 git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40159
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: charger-manager: Provide cm_notify_event function for in-kernel use
Chanwoo Choi [Sat, 5 May 2012 13:26:47 +0000 (06:26 -0700)]
CHERRY-PICK: charger-manager: Provide cm_notify_event function for in-kernel use

By using cm_notify_event function, charger driver can report several
charger events (e.g. battery full and external power in/out, etc) to
Charger-Manager. Charger-Manager can properly and immediately control
chargers by the reported event.

Change-Id: Id791abfc9ab014cba7446f2467830a1af99eff0a
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
(cherry picked from commit d1c35d11cd03167d1479bfbe09998d9dfe361b32
in branch charger-manager-for-next of
 git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40158
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: charger-manager: Poll battery health in normal state
Chanwoo Choi [Sat, 5 May 2012 13:24:10 +0000 (06:24 -0700)]
CHERRY-PICK: charger-manager: Poll battery health in normal state

Charger-Manager needs to check battery health in normal state
as well as suspend-to-RAM state. When the battery is fully charged,
Charger-Manager needs to determine when the chargers restart charging.

This patch allows Charger-Manager to monitor battery health in normal
state and handle operation for chargers after battery is fully charged.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
(cherry picked from commit 6d193b13aee372996e45c34865aa37c3c603b228
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Change-Id: Iab84dc96254dae448cd18d3ba4458c48203b3d13
Reviewed-on: https://gerrit.chromium.org/gerrit/40157
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoarm: exynos: Enable CHIP ID clock
Abhilash Kesavan [Fri, 14 Dec 2012 06:02:19 +0000 (11:32 +0530)]
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: Ib094b748301b7e882a50ae056bd9f0f795c133e5
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39695

11 years agoarm: exynos: Use MIF ASV group
Doug Anderson [Fri, 14 Dec 2012 19:21:12 +0000 (11:21 -0800)]
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: Ia264991c11469a22a986c385a03b2a0478fb237f
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39784

11 years agoCHROMIUM: drm/exynos: dp: Handle bad hotplug IRQ
Vic Yang [Thu, 13 Dec 2012 02:09:51 +0000 (18:09 -0800)]
CHROMIUM: drm/exynos: dp: Handle bad hotplug IRQ

If the hotplug detect pin cannot be mapped to an IRQ number, we should
still be able to detect the display with polling loop. This CL prevents
driver initialization from failing in this case, and adds a call to
hotplug handling function in power on sequence.

Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:16280
TEST=on Snow and Spring, boot and see display.

Change-Id: Idaa908ac38e85b8dd10c367a4c1f8ec47a4432b9
Reviewed-on: https://gerrit.chromium.org/gerrit/40363
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: drm/exynos: Fix iommu cleanup paths.
Stéphane Marchesin [Fri, 4 Jan 2013 00:22:50 +0000 (16:22 -0800)]
CHROMIUM: drm/exynos: Fix iommu cleanup paths.

The cleanup paths don't destroy the iommu mapping, so they linger around when
init fails.

BUG=none
TEST=compiles, still works on snow

Change-Id: Ieef610db22154d37d307f4a589bd0830ef3fb97c
Reviewed-on: https://gerrit.chromium.org/gerrit/40410
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
11 years agoCHROMIUM: USB: serial: keyspan.c: initialize fw
Mandeep Singh Baines [Mon, 7 Jan 2013 21:53:30 +0000 (13:53 -0800)]
CHROMIUM: USB: serial: keyspan.c: initialize fw

The fw variable is initialized in request_ihex_firmware in the
non-failure case but the compiler is not smart enough to pick
this up so fixing this way.

Fixes the following warning:
drivers/usb/serial/keyspan.c:1298:18: warning: 'fw' may be used uninitialized in this function [-Wmaybe-uninitialized]

BUG=chromium-os:5542
TEST=compile

Change-Id: Id89b68bf4cc061b83615f8db52d2a80e6e9e5cb5
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40569
Reviewed-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: md: fix dm-bootcache string compare length
Simon Que [Mon, 7 Jan 2013 21:01:28 +0000 (13:01 -0800)]
CHROMIUM: md: fix dm-bootcache string compare length

The bootcache header has 12-character fields for date and time.
However, the __DATE__ string is only 9 characters long incl. null
terminator.  When comparing __DATE__ and __TIME__ to the header's
fields, we should use the lengths of __DATE__ and __TIME__, because they
are <= 12 (size of the header fields).

e.g.
  strncmp(hdr->date, __DATE__, sizeof(hdr->date))
  --> sizeof(hdr->date) is 12 but __DATE__ is only 9 characters long,
      so will throw a smatch error.

  strncmp(hdr->date, __DATE__, strlen(__DATE__) + 1)
  --> strlen(__DATE__) + 1 == 9, so this will not result in comparing
      a string that is shorter than the required length.

BUG=chromium-os:37656
TEST=Build kernel with USE=test, after this CL has been merged:
https://gerrit.chromium.org/gerrit/#/c/40054/
dm-bootcache.c should not throw any smatch errors about strncmp().

Change-Id: I88c7cbb96dc4da611b96609ef21b3787483c25db
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40549
Reviewed-by: Paul Taysom <taysom@chromium.org>
11 years agoCHROMIUM: mfd: chromeos_ec: remove unused variable
Mandeep Singh Baines [Mon, 7 Jan 2013 21:25:11 +0000 (13:25 -0800)]
CHROMIUM: mfd: chromeos_ec: remove unused variable

Fixes the following warning:

drivers/mfd/chromeos_ec_i2c.c:53:5: warning: unused variable 'res_code' [-Wunused-variable]

BUG=chromium-os:5542
TEST=compile

Change-Id: I10384461c14fbe26f082bae4a4375c26a88694e3
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40551
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: Bluetooth: Add MD222 [04ca:3008]
Scott James Remnant [Wed, 2 Jan 2013 22:01:14 +0000 (14:01 -0800)]
CHROMIUM: Bluetooth: Add MD222 [04ca:3008]

BUG=chromium-os:37579
TEST=hciconfig shows device and hcitool scan works

Change-Id: I365fd3c8c7863fc634613ae6ad18a01e600572e2
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40338
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: mwifiex: check wait_event_interruptible return value
Bing Zhao [Thu, 3 Jan 2013 01:45:19 +0000 (17:45 -0800)]
UPSTREAM: mwifiex: check wait_event_interruptible return value

wait_event_interruptible function returns -ERESTARTSYS if it's
interrupted by a signal. Driver should check the return value
and handle this case properly.

In mwifiex_wait_queue_complete() routine, as we are now checking
wait_event_interruptible return value, the condition check is not
required. Also, we have removed mwifiex_cancel_pending_ioctl()
call to avoid a chance of sending second command to FW by other path
as soon as we clear current command node. FW can not handle two
commands simultaneously.

Cc: "3.6+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
BUG=chrome-os-partner:16031,17015
TEST=Boot, associate, and run "rtcwake -s 10 -mmem" in a
"while/do/done" loop

Change-Id: I54deddb71864a5b638a559b9e51942bf1d46162d
Reviewed-on: https://gerrit.chromium.org/gerrit/40359
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoCHROMIUM: drm/exynos: fb: Don't return errors when unmapping fb gem objects
Daniel Kurtz [Thu, 3 Jan 2013 01:51:56 +0000 (09:51 +0800)]
CHROMIUM: drm/exynos: fb: Don't return errors when unmapping fb gem objects

Silently accept and ignore a NULL buffer or a buffer which has not yet
been mapped (i.e., its dma_addr is unset).

These aren't really errors (and I don't see how they are even possible).
Simplifying this lets the unmap function just return void.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check on device

Change-Id: Ib1fa50152b0444fbafc05ac8b712d69ffda962c5
Reviewed-on: https://gerrit.chromium.org/gerrit/40446
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly
Daniel Kurtz [Thu, 3 Jan 2013 02:37:06 +0000 (10:37 +0800)]
CHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly

When probing the fbdev, the drm_fb_helper may specify a visible area
(fb_width x fb_height) than is smaller than the total requested
framebuffer area (surface_width x surface_height).

Use these fb dimensions when setting the visible area in the "variable"
portion of the fb info.  This is consistent with other drm fbdev drivers
(i915, radeon, nouveau).

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=splash screen displayed properly at boot w/ no HDMI
TEST=splash screen displayed properly at boot w/ HDMI

Change-Id: Id209ea395a7e5eb993632ae4cfe4263b5af18138
Reviewed-on: https://gerrit.chromium.org/gerrit/40443
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Combine duplicate error handling in gem_create
Daniel Kurtz [Wed, 2 Jan 2013 10:25:58 +0000 (18:25 +0800)]
CHROMIUM: drm/exynos: gem: Combine duplicate error handling in gem_create

The error handling for buffer creation is the same for both CONTIG and
NONCONTIG, so refactor a bit.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check boot on device

Change-Id: I296198291f06fe3dda9b9989ea139badbba53004
Reviewed-on: https://gerrit.chromium.org/gerrit/40442
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Remove unused gem_get/put_dma_addr
Daniel Kurtz [Wed, 2 Jan 2013 10:22:18 +0000 (18:22 +0800)]
CHROMIUM: drm/exynos: gem: Remove unused gem_get/put_dma_addr

These functions are not used so remove them.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check boot on device

Change-Id: I4f25b7ee5104273587a15d9799b395bb1c1d8648
Reviewed-on: https://gerrit.chromium.org/gerrit/40441
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Remove gem_init_object
Daniel Kurtz [Wed, 2 Jan 2013 10:18:22 +0000 (18:18 +0800)]
CHROMIUM: drm/exynos: gem: Remove gem_init_object

This function does nothing interesting, it is only called in the unused
drm_gem_object_alloc path, and the drm gem core ignores a NULL callback
anyway.
So, save a little space by just leaving it out.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; boot/sanity check

Change-Id: Ief8ccf91c963ddc0a0cf4b1a1a973c6675437713
Reviewed-on: https://gerrit.chromium.org/gerrit/40440
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: dp: Fix a bug that IRQ number should be signed
Vic Yang [Thu, 3 Jan 2013 06:40:23 +0000 (14:40 +0800)]
CHROMIUM: drm/exynos: dp: Fix a bug that IRQ number should be signed

Negative IRQ value is used to represent error.

Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:16280
TEST=Boot on spring and see bad IRQ translated into driver error.

Change-Id: I8777c0531dceab6c952a50988764be949729e598
Reviewed-on: https://gerrit.chromium.org/gerrit/40364
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>

11 years agodrm/i915: Mark the FB's bo as busy when we pageflip
Stéphane Marchesin [Thu, 3 Jan 2013 01:21:16 +0000 (17:21 -0800)]
drm/i915: Mark the FB's bo as busy when we pageflip

Previously, the page flipping case wasn't accounted for, only front buffer
rendering. This change adds a hook from the page flip code to update the
busyness of the crtc in the page flip case.

BUG=chromium-os:37277
TEST=by hand

Change-Id: Iebf826e3dc073579ca1446d7b70bcbf06d7bba5d
Reviewed-on: https://gerrit.chromium.org/gerrit/40355
Tested-by: Jonathan Backer <backer@chromium.org>
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 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>
11 years agoCHROMIUM: Enable CONFIG_HID_MICROSOFT in base config.
Andrew de los Reyes [Wed, 2 Jan 2013 21:11:56 +0000 (13:11 -0800)]
CHROMIUM: Enable CONFIG_HID_MICROSOFT in base config.

This is needed for some MS mice and should be on all
systems. Specifically this was missing from ARM based devices.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:36240
TEST=Tested Link and Daisy to make sure the mouse worked on both.

Change-Id: I610d2593cd6b3e5eb2f19d4831e7e01c582db93a
Reviewed-on: https://gerrit.chromium.org/gerrit/40335
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Fix release ioctl arg type
Daniel Kurtz [Thu, 27 Dec 2012 03:26:21 +0000 (11:26 +0800)]
CHROMIUM: drm/exynos: gem: Fix release ioctl arg type

exynos_drm_gem_cpu_release_ioctl should use drm_exynos_gem_cpu_release
arguments.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=builds clean; sanity check display still functional on device

Change-Id: Ic877e679a56d31c6333cfd6dbdc1713248cccfc8
Reviewed-on: https://gerrit.chromium.org/gerrit/40230
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 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

11 years agoCHROMIUM: gobi: avoid NULL dereferencing in devqmi_ioctl
Ben Chan [Thu, 27 Dec 2012 00:17:21 +0000 (16:17 -0800)]
CHROMIUM: gobi: avoid NULL dereferencing in devqmi_ioctl

BUG=chrome-os-partner:16163
TEST=Run suspend/resume stress test on a system with Gobi 3000 modem.

Change-Id: I0a8c78036e4ec3579b0d0bb92697fe4d68f62cdb
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40229
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: add vbc_ec implementation
Che-Liang Chiou [Wed, 7 Nov 2012 02:07:56 +0000 (18:07 -0800)]
CHROMIUM: add vbc_ec implementation

This allows kernel to read/write vboot context from EC's nvram.

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

Change-Id: Iea90b1a70392fd4d234d7894b8fc52f6a71700f9
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37498
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoCHROMIUM: abstract vboot context access
Che-Liang Chiou [Wed, 7 Nov 2012 00:49:37 +0000 (16:49 -0800)]
CHROMIUM: abstract vboot context access

As vboot context is not limited to nvram, vboot context access should be
made abstract from storage device.

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

Change-Id: If236f7b12fa86d2a7bd81623c01e31a3f4f15fe5
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37497
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoKDS: fix BUG in change I4df35f08
Gabriele Paoloni [Mon, 3 Dec 2012 18:08:51 +0000 (18:08 +0000)]
KDS: fix BUG in change I4df35f08

In the implementation of change I4df35f08 the same name
is used for the macro "pos" parameter and "head" parameter.
As consequence "head" gets corrupted. this fix introduces an
auxiliar pointer for "head" and rearrange the code to make it
a bit more readable

BUG=chromium-os:36071,chrome-os-partner:15349,chrome-os-partner:14965
TEST=Tested on Daisy Board
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@arm.com>
Change-Id: Icee1c07c9a87f137cdfd87fb1fe04a83f41a44b1
Reviewed-on: https://gerrit.chromium.org/gerrit/39089
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agodrm/exynos: Cleanup unused kruft in exynos_hdmi.h
Sean Paul [Tue, 18 Dec 2012 19:47:52 +0000 (14:47 -0500)]
drm/exynos: Cleanup unused kruft in exynos_hdmi.h

These are no longer used, delete them.

BUG=None
TEST=Compiles

Change-Id: I31e6eba88f51514f289a571c48c36c43694fb3a7
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39959
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: config: enable test_module for autotest
Kees Cook [Tue, 18 Dec 2012 23:19:04 +0000 (15:19 -0800)]
CHROMIUM: config: enable test_module for autotest

Enable the "test_module" kernel module for use with autotest's
security_ModuleLocking test.

BUG=chromium-os:37353
TEST=daisy build, security_ModuleLocking passes when using "test_module"

Change-Id: I16eee5afd1664f0ab4a9ab48b6cb2beaa6f30017
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39919
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: add test_module module
Kees Cook [Tue, 18 Dec 2012 23:17:56 +0000 (15:17 -0800)]
CHROMIUM: add test_module module

Create a module for simple module loading tests.

BUG=chromium-os:37353
TEST=daisy build, security_ModuleLocking passes when using "test_module"

Change-Id: I7ac604b614d69c2f18266a2241a660629b418701
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39918
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: drm/exynos: make struct exynos_drm_crtc private
Mandeep Singh Baines [Mon, 17 Dec 2012 22:38:04 +0000 (14:38 -0800)]
CHROMIUM: drm/exynos: make struct exynos_drm_crtc private

struct exynos_drm_crtc is only used in exynos_drm_crtc.c.

BUG=none
TEST=Compiles. Boots.

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

11 years agoCHROMIUM: Input: cyapa - fix compile warning
Daniel Kurtz [Wed, 19 Dec 2012 03:26:51 +0000 (11:26 +0800)]
CHROMIUM: Input: cyapa - fix compile warning

The string pointed to by fw_name is non-mutable, so make it const char *.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36911
TEST=builds without following warning:
  drivers/input/mouse/cyapa.c: In function 'cyapa_update_fw_store':
  drivers/input/mouse/cyapa.c:1351:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Change-Id: I43a3fc57a9462cece94d0c1db8011ae3084f8744
Reviewed-on: https://gerrit.chromium.org/gerrit/39934
Reviewed-by: Benson Leung <bleung@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: mwifiex: reset card on cmd timeout
Thomas Pedersen [Wed, 12 Dec 2012 23:30:16 +0000 (15:30 -0800)]
CHROMIUM: mwifiex: reset card on cmd timeout

If mwifiex hits a commmand timeout the firmware likely
crashed, so trigger a card reset which will clear all
logical card state and reprobe the hardware. Implement
this for sdio which requires fondling of some extra gpio
pins.

Also linearize sdio work by putting all work on the same
work queue. This ensures no work is running when the sdio
reset takes place.

Based on work by Bing Zhao.

TEST=trigger reset by debugfs hook
BUG=chrome-os-partner:15389
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Change-Id: I3cf12ac88e7598f6daa60f38acea5e0c32302b31
Reviewed-on: https://gerrit.chromium.org/gerrit/39635
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 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>

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

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

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

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