]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/log
people/aperard/linux-chromebook.git
12 years agoCHERRY-PICK: arm: exynos: Fix the ISP Power down sequence
Doug Anderson [Sat, 26 Jan 2013 00:01:00 +0000 (16:01 -0800)]
CHERRY-PICK: arm: exynos: Fix the ISP Power down sequence

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

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

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

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

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

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

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

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

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

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

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

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

This fixes Bugzilla #43391.

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

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

This reverts commit d6a3750eef2e494e2f78160c5f8b37a7d810bff7.

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

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

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

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

This reverts commit 247bc03742545fec2f79939a3b9f738392a0f7b4.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Userspace will change it to enabled if needed.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This reverts commit 6fcfecca9575848120e8c9e35b3ad848b1e85f29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUG=chrome-os-partner:15774

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This fixes a crash when qc_deregister races devqmi_release.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUG=none
TEST=compile, boot

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

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

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

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

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

Enable commonly used Keyspan USB Serial devices.

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

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

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

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

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

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

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

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

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

upstream: commit 6e2361720b9da9ec830d407da058ca1827e62b12

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

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

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

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

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

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

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

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

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

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

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

BUG=none
TEST=none

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

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

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

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

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

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

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

Conflicts:
sound/pci/hda/patch_realtek.c

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

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

This reverts commit 77d7f6636bc9f65eb1e8b7769c0f2674f7136e8a.

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

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

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

12 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

12 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

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