cascardo/linux.git
11 years agoUPSTREAM: mwifiex: remove AMSDU_AGGR_CTRL command response handler
Bing Zhao [Wed, 12 Sep 2012 21:50:51 +0000 (14:50 -0700)]
UPSTREAM: mwifiex: remove AMSDU_AGGR_CTRL command response handler

HostCmd_CMD_AMSDU_AGGR_CTRL is never called with GET action.
So the code in mwifiex_ret_amsdu_aggr_ctrl() becomes redundant.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:13998
TEST=Build and run autotest suites

Change-Id: I92dff9846c954405a80af275cdfbff50fda6496d
Reviewed-on: https://gerrit.chromium.org/gerrit/33147
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: remove 11N_CFG command response handler
Bing Zhao [Wed, 12 Sep 2012 21:49:11 +0000 (14:49 -0700)]
UPSTREAM: mwifiex: remove 11N_CFG command response handler

HostCmd_CMD_11N_CFG is never called with GET action. So the code in
mwifiex_ret_11n_cfg() becomes redundant.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:13998
TEST=Build and run autotest suites

Change-Id: I83acad8fd48b2cee99260ad6cb4d94bf8e25f4fa
Reviewed-on: https://gerrit.chromium.org/gerrit/33146
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: remove get operation code for SUBSCRIBE EVENT command
Bing Zhao [Wed, 12 Sep 2012 21:46:05 +0000 (14:46 -0700)]
UPSTREAM: mwifiex: remove get operation code for SUBSCRIBE EVENT command

We don't send this command with GET action. Redundant code in
mwifiex_ret_subsc_evt() is removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:13998
TEST=Build and run autotest suites

Change-Id: I426e20adf7c509b253386694e4ae90c4b052a682
Reviewed-on: https://gerrit.chromium.org/gerrit/33145
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agos5p-mfc: Change scratch buffer size for VP8 decoder
Arun Kumar K [Tue, 11 Sep 2012 16:05:42 +0000 (21:35 +0530)]
s5p-mfc: Change scratch buffer size for VP8 decoder

Scratch buffer size of VP8 decoder is changed as per the
firmware v6.5. The earlier size was still using the v6.1
values.

BUG=none
TEST=Played VP8 test streams with secomx

Change-Id: Iefb71d0b520dc3922f1026ba795235b2961b8465
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32916
Commit-Ready: kiran <kiran@chromium.org>
Reviewed-by: kiran <kiran@chromium.org>
11 years agoiommu/exynos: change dev_err to dev_dbg when failed to add to genpd
Prathyush K [Tue, 11 Sep 2012 10:41:26 +0000 (16:11 +0530)]
iommu/exynos: change dev_err to dev_dbg when failed to add to genpd

A device is added to its genpd by finding the of node property
'samsung,pd'. If such a property is not found, then the device is not
added to any genpd which is currently the case with fimd, g2d, hdmi.
When this fails, we log the information using dev_err which is now
changed to dev_dbg.

These error messages should not appear during bootup.
[    0.101028] s5p-sysmmu s5p-sysmmu.2: failed to add to genpd
[    0.101119] s5p-sysmmu s5p-sysmmu.27: failed to add to genpd
[    0.101152] s5p-sysmmu s5p-sysmmu.28: failed to add to genpd

BUG=chrome-os-partner:13884
TEST=Booted on snow and the above error message do not appear.

Change-Id: I5f384a244aefaee07daf387269d9478c58128197
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32908
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: naveen krishna chatradhi <naveen@chromium.org>
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Commit-Ready: naveen krishna chatradhi <naveen@chromium.org>

11 years agoCHROMIUM: Input: atmel_mxt_ts - enable RPTEN if can wakeup from suspend
Yufeng Shen [Wed, 12 Sep 2012 16:42:16 +0000 (12:42 -0400)]
CHROMIUM: Input: atmel_mxt_ts - enable RPTEN if can wakeup from suspend

Currently when going into suspend and if wakeup is enabled,
the driver will check whether the T9_ctrl ENABLE bit is set and
if not, it will toggle the bit so that T9 object is enabled
to make wakeup possible during suspend.

With recent change to T9_ctrl's default value to be 0x81, it
is enabled (ENABLE bit set) but not reporting (RPTEN bit not
set) which prevents touches reported back during suspend.

To fix this, this patches adds checking that whether both ENABLE
and RPTEN bits are set, and if not, set both of them.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chrome-os-partner:9192
TEST=Use powerd_suspend to supend the device and then make sure
     touching the touch device wakes up the system.

Change-Id: I234531ae91627f7e1cccbef5810a18a5af6cbae9
Reviewed-on: https://gerrit.chromium.org/gerrit/33088
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
11 years agoUPSTREAM: mwifiex: support custom world regulatory domain
Bing Zhao [Tue, 11 Sep 2012 02:06:49 +0000 (19:06 -0700)]
UPSTREAM: mwifiex: support custom world regulatory domain

country 00 (world regulatory domain) doesn't define channels
52 - 64 and 100 - 140. Add these channels to our custom world
regulatory domain.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Enabled CONFIG_CFG80211_REG_DEBUG=y to confirm cfg80211 is
using our custom world regulatory domain as its default setting.
Also passed WiFiMatFunc.002Check11a test which checks channel 64.

Change-Id: I90069bff54cf63ee00bc5865269a0ebc7f66c7eb
Reviewed-on: https://gerrit.chromium.org/gerrit/33101
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoUPSTREAM: mwifiex: do not hint regulatory domain with f/w country code
Bing Zhao [Tue, 11 Sep 2012 01:52:20 +0000 (18:52 -0700)]
UPSTREAM: mwifiex: do not hint regulatory domain with f/w country code

We will use world regulatory domain (country 00) as default
when driver is loaded. Later after a successful association
cfg80211 will change the regulatory domain to a specific country
if the AP has advertised country IE.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Checked dmesg to confirm that we do not hint cfg80211 with
US regulatory domain for SD8797 card with US region code 0x10.
Also checked that cfg80211 does use default world regulatory
domain while disconnected, and change to US regulatory domain
after associated to AP with US country IE in beacon/prob_resp.

Change-Id: Id82ec3df35f94985f0f8679e04f40749b4dd0164
Reviewed-on: https://gerrit.chromium.org/gerrit/33100
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoUPSTREAM: mwifiex: use country ie of requested AP while associating
Bing Zhao [Tue, 11 Sep 2012 01:33:27 +0000 (18:33 -0700)]
UPSTREAM: mwifiex: use country ie of requested AP while associating

AP's country ie is parsed and 11d information is updated in firmware
while associating. Previous mwifiex_send_domain_info_cmd_fw() call in
association path is not necessary now. Hence it is removed in this
patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Enabled dynamic debug to dump the cmd 0x5b being sent to f/w
and verified the cmd body contains the country ie for the AP we are
associating.

Change-Id: Ia3d764433daf22bd8d3b90a3cfc49d2904189870
Reviewed-on: https://gerrit.chromium.org/gerrit/33099
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agodrm/i915: Expose adaptive backlight properties on LVDS connectors.
Stéphane Marchesin [Wed, 12 Sep 2012 17:36:32 +0000 (10:36 -0700)]
drm/i915: Expose adaptive backlight properties on LVDS connectors.

So far we only exposed it on eDP connectors. Let's also expose it on LVDS.

BUG=none
TEST=by hand, ran xrandr --verbose and checked the adaptive backlight
TEST=property is here

Change-Id: I70d836ff437ace10acf59c780aa5f06428ecef58
Reviewed-on: https://gerrit.chromium.org/gerrit/33098
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>

11 years agoCHROMIUM: ALSA: ASoC: max98095 0 Add built in EQ for 44.1k and 48k.
Dylan Reid [Tue, 7 Aug 2012 16:08:49 +0000 (09:08 -0700)]
CHROMIUM: ALSA: ASoC: max98095 0 Add built in EQ for 44.1k and 48k.

EQ setting supplied by Maxim after tuning a snow PVT device.
We need to move this to device tree eventually, but Samsung says it is
important for speaker protection to get it in right away.

BUG=chrome-os-partner:12039
TEST=listen to youtube with EQ enabled and disabled.

Change-Id: I269e70daa79c5c83834c801d3b0dd824da88607e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33065

11 years agoCHROMIUM: iommu/exynos: Fix free now that we're using kmem_cache
Doug Anderson [Wed, 12 Sep 2012 17:18:11 +0000 (10:18 -0700)]
CHROMIUM: iommu/exynos: Fix free now that we're using kmem_cache

The previous CL ("CHROMIUM: iommu/exynos: Fix allocation to be safer
in terms of alignment") introduced a potential bug where kfree() was
being called still in one case.  It doesn't appear that we run this
codepath in normal usage (so we actually have a memory leak), but it's
good to fix just in case.

BUG=chrome-os-partner:13948
TEST=boot with slub debugging turn on; play youtube video

Change-Id: Ie9aff3e180c95c6f9f3643efe8f98cf5b5693320
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33094
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoCHROMIUM: iommu/exynos: Fix allocation to be safer in terms of alignment
Sonny Rao [Wed, 12 Sep 2012 04:27:06 +0000 (21:27 -0700)]
CHROMIUM: iommu/exynos: Fix allocation to be safer in terms of alignment

The code was expecting kzalloc to align to the size of the allocation
even though that isn't guaranteed, and even had a BUG() to catch when it
happened.  This started triggering with SLUB debugging turned on.  Fix it
by using a slab which returns objects that are properly aligned.

BUG=chrome-os-partner:13948
TEST=boot with slub debugging turn on

Change-Id: Icdf9475233e8c80f090f624a4ca5497011d4aa33
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33053
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoUPSTREAM: kernel: panic: fix a possible deadlock in panic()
Vikram Mulukutla [Mon, 30 Jul 2012 21:39:58 +0000 (14:39 -0700)]
UPSTREAM: kernel: panic: fix a possible deadlock in panic()

panic_lock is meant to ensure that panic processing takes place only on
one cpu; if any of the other cpus encounter a panic, they will spin
waiting to be shut down.

However, this causes a regression in this scenario:

1. Cpu 0 encounters a panic and acquires the panic_lock
   and proceeds with the panic processing.
2. There is an interrupt on cpu 0 that also encounters
   an error condition and invokes panic.
3. This second invocation fails to acquire the panic_lock
   and enters the infinite while loop in panic_smp_self_stop.

Thus all panic processing is stopped, and the cpu is stuck for eternity
in the while(1) inside panic_smp_self_stop.

To address this, disable local interrupts with local_irq_disable before
acquiring the panic_lock.  This will prevent interrupt handlers from
executing during the panic processing, thus avoiding this particular
problem.

BUG=chrome-os-partner:13943
TEST=booted chrome and played back a Video file in the browser.

Change-Id: I156cd63ea18309ef59cbeb86f36282cbe79b4a4c
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 190320c3b6640d4104650f55ff69611e050ea06b)
Reviewed-on: https://gerrit.chromium.org/gerrit/33067
Reviewed-by: Abhinav Kochhar <kochhar.abhinav@gmail.com>
Tested-by: Abhinav Kochhar <kochhar.abhinav@gmail.com>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: mm: dma-mapping: fix compiler warning
Naveen Krishna Chatradhi [Tue, 11 Sep 2012 13:03:55 +0000 (18:33 +0530)]
CHROMIUM: mm: dma-mapping: fix compiler warning

Remove the following warning:
arch/arm/mm/dma-mapping.c: In function 'arm_dma_alloc':
arch/arm/mm/dma-mapping.c:582:122: warning: 'page' may be used uninitialized in this function [-Wmaybe-uninitialized]
arch/arm/mm/dma-mapping.c:542:15: note: 'page' was declared here

BUG=chromium-os:34287
TEST=emerge-daisy chromeos-kernel built without this warning.

Change-Id: I8469cef3d88adaf8262e2447c993748d708c7c34
Signed-off-by: Naveen Krishna Chatradhi <naveen@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32918
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoCHROMIUM: Bluetooth: Add MD222 [0489:e04e], [04ca:700b]
Scott James Remnant [Tue, 11 Sep 2012 20:38:52 +0000 (13:38 -0700)]
CHROMIUM: Bluetooth: Add MD222 [0489:e04e], [04ca:700b]

BUG=none
TEST=hciconfig shows device and hcitool scan works

Change-Id: I3544f7bc2dd7809cc00fbcb6f260a46429da7620
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32968
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoARM: dma-mapping: Skip cache maint for invalid page
Hiroshi Doyu [Sun, 9 Sep 2012 14:27:20 +0000 (19:57 +0530)]
ARM: dma-mapping: Skip cache maint for invalid page

Skip cache maint for invalid page but warn it.

BUG=chrome-os-partner:13935
TEST=Play VIDEO on Snow

Change-Id: I4dfd4f7a7c5f5559a45d115b369c0b44ebdca5db
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32665
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:04 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC

Make use of the same atomic pool as DMA does, and skip a kernel page
mapping which can involve sleep'able operations at allocating a kernel
page table.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I9452deb7ad6c42d53d4db0656c74e8844e9ec092
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 479ed93a4b98eef03fd8260f7ddc00019221c450)
Reviewed-on: https://gerrit.chromium.org/gerrit/32664
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:03 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()

Support atomic allocation in __iommu_get_pages().

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I2da41ab739f69e2a563365b7035ff8060b648401
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
[moved __atomic_get_pages() under #ifdef CONFIG_ARM_DMA_USE_IOMMU
 to avoid unused fuction warning for no-IOMMU case]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 665bad7bb911d392000fa69bc6b599c0df992504)
Reviewed-on: https://gerrit.chromium.org/gerrit/32663
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: Refactor out to introduce __in_atomic_pool
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:02 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: Refactor out to introduce __in_atomic_pool

Check the given range("start", "size") is included in "atomic_pool" or not.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I03e461bf5a66656321813385333722ea4e30e25a
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 21d0a75951ccf71f671eb24b61a8ad2b497be4b4)
Reviewed-on: https://gerrit.chromium.org/gerrit/32662
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: atomic_pool with struct page **pages
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:01 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: atomic_pool with struct page **pages

struct page **pages is necessary to align with non atomic path in
__iommu_get_pages(). atomic_pool() has the intialized **pages instead
of just *page.

BUG=chrome-os-partner:13935
TEST=Play VIDEO on Snow

Change-Id: Ia68cf6fc4530ff5fb6cd4f2b345c9b707a38bf55
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 6b3fe47264262fa082897ebe8ae01041eae65e14)
Reviewed-on: https://gerrit.chromium.org/gerrit/32661
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: DMA-Mapping: print warning when atomic coherent allocation fails
Marek Szyprowski [Wed, 22 Aug 2012 12:50:42 +0000 (14:50 +0200)]
UPSTREAM: ARM: DMA-Mapping: print warning when atomic coherent allocation fails

Print a loud warning when system runs out of memory from atomic DMA
coherent pool to let users notice the potential problem.

BUG=chrome-os-partner:13935
TEST=Compiled and booted

Change-Id: I80a82589ecf3da7fa5d6b8aa96130cf41a5ba3ea
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit fb71285f0c1633a85544784aae7577502274b77a)
Reviewed-on: https://gerrit.chromium.org/gerrit/32964
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: fix error path for memory allocation failure
Marek Szyprowski [Fri, 27 Jul 2012 15:12:50 +0000 (17:12 +0200)]
UPSTREAM: ARM: dma-mapping: fix error path for memory allocation failure

This patch fixes incorrect check in error path. When the allocation of
first page fails, the kernel ops appears due to accessing -1 element of
the pages array.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: Ib59f0b01a3674b6b15c99785e66587cb09421f99
Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 9fa8af91f0679f2abbebe1382b937264f3a8b981)
Reviewed-on: https://gerrit.chromium.org/gerrit/32963
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: add more sanity checks in arm_dma_mmap()
Marek Szyprowski [Mon, 30 Jul 2012 07:35:26 +0000 (09:35 +0200)]
UPSTREAM: ARM: dma-mapping: add more sanity checks in arm_dma_mmap()

Add some sanity checks and forbid mmaping of buffers into vma areas larger
than allocated dma buffer.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: Ie81e97810a105d271a6b386112e8ca5dc9176db4
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 50262a4bf38dd70486e9fce2b8235d5ae3e0f627)
Reviewed-on: https://gerrit.chromium.org/gerrit/32962
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoFIXUP: ARM: dma-mapping: remove custom consistent dma region
Doug Anderson [Tue, 11 Sep 2012 18:24:02 +0000 (11:24 -0700)]
FIXUP: ARM: dma-mapping: remove custom consistent dma region

This attempts to fix the above comment to match more closely
what landed upstream.  We originally had v3 of the patch but
it went up to v6.

There are still a few differences from upstream.  Most notably:
* I didn't take the VM_ARM_DMA_CONSISTENT stuff.  I wasn't sure
  how far reaching that was.
* We have a slightly different way for disabling CMA.  I didn't
  try to match upstream.

Note that part of the original patch moved to a separate
patch: "add more sanity checks in arm_dma_mmap()".  See the next
CL.

BUG=chrome-os-partner:13935
TEST=Bootup

Change-Id: I9a642884fbd3dcb17f68e687539a7772caf41f8c
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32961
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: modify condition check while freeing pages
Prathyush K [Mon, 16 Jul 2012 06:59:55 +0000 (08:59 +0200)]
UPSTREAM: ARM: dma-mapping: modify condition check while freeing pages

WARNING: at mm/vmalloc.c:1471 __iommu_free_buffer+0xcc/0xd0()
Trying to vfree() nonexistent vm area (ef095000)
Modules linked in:
[<c0015a18>] (unwind_backtrace+0x0/0xfc) from [<c0025a94>] (warn_slowpath_common+0x54/0x64)
[<c0025a94>] (warn_slowpath_common+0x54/0x64) from [<c0025b38>] (warn_slowpath_fmt+0x30/0x40)
[<c0025b38>] (warn_slowpath_fmt+0x30/0x40) from [<c0016de0>] (__iommu_free_buffer+0xcc/0xd0)
[<c0016de0>] (__iommu_free_buffer+0xcc/0xd0) from [<c0229a5c>] (exynos_drm_free_buf+0xe4/0x138)
[<c0229a5c>] (exynos_drm_free_buf+0xe4/0x138) from [<c022b358>] (exynos_drm_gem_destroy+0x80/0xfc)
[<c022b358>] (exynos_drm_gem_destroy+0x80/0xfc) from [<c0211230>] (drm_gem_object_free+0x28/0x34)
[<c0211230>] (drm_gem_object_free+0x28/0x34) from [<c0211bd0>] (drm_gem_object_release_handle+0xcc/0xd8)
[<c0211bd0>] (drm_gem_object_release_handle+0xcc/0xd8) from [<c01abe10>] (idr_for_each+0x74/0xb8)
[<c01abe10>] (idr_for_each+0x74/0xb8) from [<c02114e4>] (drm_gem_release+0x1c/0x30)
[<c02114e4>] (drm_gem_release+0x1c/0x30) from [<c0210ae8>] (drm_release+0x608/0x694)
[<c0210ae8>] (drm_release+0x608/0x694) from [<c00b75a0>] (fput+0xb8/0x228)
[<c00b75a0>] (fput+0xb8/0x228) from [<c00b40c4>] (filp_close+0x64/0x84)
[<c00b40c4>] (filp_close+0x64/0x84) from [<c0029d54>] (put_files_struct+0xe8/0x104)
[<c0029d54>] (put_files_struct+0xe8/0x104) from [<c002b930>] (do_exit+0x608/0x774)
[<c002b930>] (do_exit+0x608/0x774) from [<c002bae4>] (do_group_exit+0x48/0xb4)
[<c002bae4>] (do_group_exit+0x48/0xb4) from [<c002bb60>] (sys_exit_group+0x10/0x18)
[<c002bb60>] (sys_exit_group+0x10/0x18) from [<c000ee80>] (ret_fast_syscall+0x0/0x30)

This patch modifies the condition while freeing to match the condition
used while allocation. This fixes the above warning which arises when
array size is equal to PAGE_SIZE where allocation is done using kzalloc
but free is done using vfree.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I6541ff3e5269f373b4feadfcb616db91e4dc96c4
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 46c87852e99cf8ce97e207b11cde19085837e39c)
Reviewed-on: https://gerrit.chromium.org/gerrit/32936
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoBACKPORT: ASoC: samsung dma - Don't indicate support for pause/resume.
Dylan Reid [Sat, 1 Sep 2012 08:38:19 +0000 (01:38 -0700)]
BACKPORT: ASoC: samsung dma - Don't indicate support for pause/resume.

The pause and resume operations indicate that the stream can be
un-paused/resumed from the exact location they were paused/suspended.
This is not true for this driver, the pause and suspend triggers share
the same code path with stop, they flush all pending DMA transfers.
This drops all pending samples.  The pause_release/resume triggers are
the same as start, except that prepare won't be called beforehand,
nothing will be enqueued to the DMA engine and nothing will happen (no
audio).  Removing the pause flag will let apps know that it isn't
supported.  Removing the resume flag will cause user space to call
prepare and start instead of resume, so audio will continue playing when
the system wakes up.

Before removing the pause and resume flags, I tested this on an exynos
5250, using 'aplay -i'. Pause/un-pause leads to silence followed by a
write error.  Suspend/resume testing led to the same result.  Removing
the two flags fixes suspend/resume (since snd_pcm_prepare is called
again). And leads to a proper reporting of pause not supported.

BUG=chrome-os-partner:12258
TEST=suspend/resume while playing youtube.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 57b2d68863f281737d8596cb3d76d89d9cc54fd8)

Change-Id: I224deb6445be3464c064edd4e91641b6cd187b83
Reviewed-on: https://gerrit.chromium.org/gerrit/32866
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: trace: remove warning
Olof Johansson [Mon, 10 Sep 2012 16:51:42 +0000 (09:51 -0700)]
CHROMIUM: trace: remove warning

fs/exec.c:790:2: warning: passing argument 1 of ‘trace_open_exec’ discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=build, make sure warning is gone

Change-Id: Ia81f05aa28bb28327e3be7b438df281a0166bcb8
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32829
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: dm: verity: fix warnings
Olof Johansson [Mon, 10 Sep 2012 16:45:06 +0000 (09:45 -0700)]
CHROMIUM: dm: verity: fix warnings

Fixes:

drivers/md/dm-verity.c:109:1: warning: return from incompatible pointer type [enabled by default]
drivers/md/dm-verity.c:81:1: warning: return from incompatible pointer type [enabled by default]
drivers/md/dm-verity.c:85:1: warning: return from incompatible pointer type [enabled by default]

BUG=chromium-os:34287
TEST=build, check lack of warnings.

Change-Id: Iaff319f774a152e179836cb765ce951d97dbca9f
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32828
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoRevert "CHROMIUM: config: enable RCU_FAST_NO_HZ"
Stéphane Marchesin [Tue, 11 Sep 2012 02:15:52 +0000 (19:15 -0700)]
Revert "CHROMIUM: config: enable RCU_FAST_NO_HZ"

This reverts commit add52cca2810b40fd13495ad8c091b96135982f7
This commit breaks the interrupts for i915 on boot sometimes.
i915 needs interrupts to work to operate properly, so let's revert to
unbreak the miscellaneous canaries.

The symptoms are similar to what's described in the following thread:
http://comments.gmane.org/gmane.linux.kernel/1270773

BUG=chromium:145312,chrome-os-partner:13617
TEST=by hand: the interrupts work again and graphics isn't stuck on boot.

Change-Id: I0d3f550dc374ca0c81ddee9ba7d0e2793b318e31
Reviewed-on: https://gerrit.chromium.org/gerrit/32887
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm: exynos: fix compiler warning
Olof Johansson [Mon, 10 Sep 2012 23:29:35 +0000 (16:29 -0700)]
CHROMIUM: drm: exynos: fix compiler warning

drivers/gpu/drm/exynos/exynos_drm_fb.c:94:16: warning: assignment makes integer from pointer without a cast [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I9d4f22e683316cecdd49a245e1ba08a87e2f57d9
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32840
Reviewed-by: Anush Elangovan <anush@chromium.org>
11 years agoCHROMIUM: ARM: exynos: pm: add one __maybe_unused annotation
Olof Johansson [Mon, 10 Sep 2012 23:16:36 +0000 (16:16 -0700)]
CHROMIUM: ARM: exynos: pm: add one __maybe_unused annotation

It's hard to tell from the code flow (which is nasty in the first place) if the function will or will not be used, so
just mark it __maybe_unused for now.

Resolves:

arch/arm/mach-exynos/pm_domains.c:138:20: warning: 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function]

BUG=chromium-os:34287
TEST=none

Change-Id: Ieb8290edf595e33885b89eca29c83b460613a702
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32837
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: thermal: fix unused variable warning
Olof Johansson [Mon, 10 Sep 2012 16:56:06 +0000 (09:56 -0700)]
CHROMIUM: thermal: fix unused variable warning

drivers/thermal/thermal_sys.c:65:21: warning: ‘thermal_event_seqnum’ defined but not used [-Wunused-variable]

BUG=chromium-os:34287
TEST=none

Change-Id: Ie7610886e5235d80330848593d6e7e40db900128
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32831
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoCHROMIUM: ARM: exynos: ifdef out some unused variables
Olof Johansson [Mon, 10 Sep 2012 23:19:31 +0000 (16:19 -0700)]
CHROMIUM: ARM: exynos: ifdef out some unused variables

arch/arm/mach-exynos/mach-exynos5-dt.c:107:29: warning: 'smdk5250_fb_win1' defined but not used [-Wunused-variable]
arch/arm/mach-exynos/mach-exynos5-dt.c:126:29: warning: 'smdk5250_fb_win2' defined but not used [-Wunused-variable]
arch/arm/mach-exynos/mach-exynos5-dt.c:88:29: warning: 'smdk5250_fb_win0' defined but not used [-Wunused-variable]

BUG=chromium-os:34287
TEST=none

Change-Id: I6f1d030c87b18abccad796794ea40bf245d643cf
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32838
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: libata: remove warning
Olof Johansson [Mon, 10 Sep 2012 17:10:30 +0000 (10:10 -0700)]
CHROMIUM: libata: remove warning

drivers/ata/libata-core.c:5376:2: warning: assignment from incompatible pointer type [enabled by default]
drivers/ata/libata-core.c:5577:2: warning: assignment from incompatible pointer type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: Ic0af73ba8fbc4aefb5895d00ec0bc853fcbec192
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32834
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
11 years agodrm/exynos: Implements proper disable of LCD clock
Akshu Agrawal [Sat, 1 Sep 2012 01:40:35 +0000 (18:40 -0700)]
drm/exynos: Implements proper disable of LCD clock

Since fimd_power_on is called twice at bootup, fimd clock was
getting enabled twice and increasing its refcount to 2.
During the disable since the count was not equal to zero lcd clk
was not getting disabled.

BUG=chromeos-partner:13349
TEST= Tested display going off, poweroff command when display off.
Tested suspend/resume in display on and off state

Change-Id: Ifd49f25c8beecd78d35c009f2caceec50d8129c8
Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32083
Commit-Ready: Akshu Agrawal <akshu@chromium.org>
Reviewed-by: Akshu Agrawal <akshu@chromium.org>
Tested-by: Akshu Agrawal <akshu@chromium.org>
11 years agoCHROMIUM: drm: remove warning
Olof Johansson [Mon, 10 Sep 2012 17:09:05 +0000 (10:09 -0700)]
CHROMIUM: drm: remove warning

drivers/gpu/drm/drm_edid.c:1460:39: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I0817b80bd22c126456e74343c9b8ef67fa3d1830
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32833
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm: constify drm_mode_equal args
Olof Johansson [Mon, 10 Sep 2012 17:16:09 +0000 (10:16 -0700)]
CHROMIUM: drm: constify drm_mode_equal args

Resolves:

drivers/gpu/drm/drm_edid.c:1462:3: warning: passing argument 2 of ‘drm_mode_equal’ discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I1f4041b85bb3f2c40fd5654350e3a25423f9b8a1
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32835
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: power: tps65090: remove warning
Olof Johansson [Mon, 10 Sep 2012 22:49:28 +0000 (15:49 -0700)]
CHROMIUM: power: tps65090: remove warning

drivers/power/tps65090-charger.c:98:6: warning: unused variable 'irq' [-Wunused-variable]

BUG=chromium-os:34287
TEST=none

Change-Id: Ib4942a0f65b7f5a476686a53149007126140d253
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32836
Reviewed-by: Simon Que <sque@chromium.org>
11 years agoCHROMIUM: net: r8169: remove warning
Olof Johansson [Mon, 10 Sep 2012 17:06:10 +0000 (10:06 -0700)]
CHROMIUM: net: r8169: remove warning

drivers/net/ethernet/realtek/r8169.c:761:1: warning: return from incompatible pointer type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I3f58003a83739abebf5108eca4ca539dda186d1c
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32832
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoCHROMIUM: sd: Fix warning
Olof Johansson [Mon, 10 Sep 2012 16:54:38 +0000 (09:54 -0700)]
CHROMIUM: sd: Fix warning

drivers/scsi/sd.c:2676:2: warning: assignment from incompatible pointer type [enabled by default]
drivers/scsi/sd.c:2913:2: warning: assignment from incompatible pointer type [enabled by default]

Since there's no way to return an error, do a WARN_ON() in the error
case instead.

BUG=chromium-os:34287
TEST=none (we need an automated test for error injection here)

Change-Id: Idaf0c0184e81ef7bac63b1deeda1a7690aa48a42
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32830
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoCHROMIUM: sbs-battery: Fixed wrong dev_err() call
Doug Anderson [Mon, 10 Sep 2012 19:04:11 +0000 (12:04 -0700)]
CHROMIUM: sbs-battery: Fixed wrong dev_err() call

The dev_err() call was missing the dev and so would crash
whenever it was called.

BUG=chrome-os-partner:13857
TEST=Hack the "if" statement to always hit and rebuild kernel.
See the error printed properly.

Change-Id: Ic2f33e8db3259847d120558542c1d47d8ff4c09c
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32775
Reviewed-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
11 years agoCHROMIUM: config: Renormalize splitconfig
Doug Anderson [Mon, 10 Sep 2012 17:25:40 +0000 (10:25 -0700)]
CHROMIUM: config: Renormalize splitconfig

Just ran: ./chromeos/scripts/kernelconfig oldconfig
...and hit return for everything.  AKA: no functional change
here, this just tells us where we are.

BUG=None
TEST=Compiled and booted on one device.

Change-Id: I2221089cff75ea89150fa6981a7f5f97c5109eb6
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32765
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
11 years agoexynos5: usb: Fix EXYNOS5_USB_CFG to use SYSREG bank
Jonathan Kliegman [Mon, 10 Sep 2012 18:55:28 +0000 (14:55 -0400)]
exynos5: usb: Fix EXYNOS5_USB_CFG to use SYSREG bank

The EXYNOS5_USB_CFG register is in the SYSREG bank of register.
Fix the define to point to that and move it into the setup-usb-phy.c
file next to the EXYNOS4_USB_CFG register

BUG=chrome-os-partner:13859
TEST=Changed dev_dbg to dev_info and validated correct output
  Checked values of SYSREG(0x230) and PMUREG(0x230) and confirmed
  correct settings on boot.
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: I4d643ca982e3b92ed114d4651db9f98e7af7be0f
Reviewed-on: https://gerrit.chromium.org/gerrit/32773
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>

11 years agodrm/exynos: fimd: Disable all windows on power off
Sean Paul [Fri, 7 Sep 2012 18:14:51 +0000 (11:14 -0700)]
drm/exynos: fimd: Disable all windows on power off

Make sure we disable all windows when we power off. We were seeing
crashes on HDMI hotplug, this occurred because we DPMS off on hotplug,
then resize the scanout buffer. This resize deletes the old buffer,
which calls fimd_win_disable. This function returns early and the window
is never disabled. Then when we try to delete the buffer, we get a crash
in iommu, presumably because the buffer is still being used by the
enabled window.

BUG=chrome-os-partner:13349
TEST=Tested boot with hdmi and hotplug

Change-Id: I134d510ae4abc5604606f565ce7d631d96918477
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32568
Tested-by: Shirish S <shirish@chromium.org>
11 years agodrm/exynos: fimd: Fix compilation warning
Sean Paul [Fri, 7 Sep 2012 18:51:46 +0000 (11:51 -0700)]
drm/exynos: fimd: Fix compilation warning

This patch fixes a compilation warning (and possibly) use uninitialized
in fimd_display_power_on by returning early if we received an invalid
DPMS mode value.

BUG=chrome-os-partner:13349
TEST=Tested on snow

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

11 years agoCHROMIUM: dm: bootcache Device mapper for bootcache
Paul Taysom [Thu, 6 Sep 2012 20:41:20 +0000 (13:41 -0700)]
CHROMIUM: dm: bootcache Device mapper for bootcache

Missed the last set of changes in prevous delivery.
Changes from waitq to competion.

BUG=chromium-os:25441
TEST=boot the system with bootcache enabled

Change-Id: I452f8315f3e8544df72e7b202c2e365e39834a4b
Signed-off-by: Paul Taysom <taysom@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32427
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoARM: SAMSUNG: use spin_lock_irqsave() in clk_set_rate
Prathyush K [Mon, 3 Sep 2012 13:52:26 +0000 (19:22 +0530)]
ARM: SAMSUNG: use spin_lock_irqsave() in clk_set_rate

The clk_set_rate function has been modified to save and restore
IRQs during spin lock/unlock.

BUG=chrome-os-partner:13840
TEST=Booted kernel and ran video overnight.

Change-Id: I5c746303e141b8fc5e2ce1c0cb9943d5c8c6cd6d
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32650
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Abhinav Kochhar <kochhar.abhinav@gmail.com>
Tested-by: Abhinav Kochhar <kochhar.abhinav@gmail.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoRevert "UPSTREAM: dma: pl330: assign a new cookie when restarting tx descriptors...
Padmavathi Venna [Fri, 7 Sep 2012 09:04:53 +0000 (14:34 +0530)]
Revert "UPSTREAM: dma: pl330: assign a new cookie when restarting tx descriptors in cyclic mode"

This reverts commit d49ef2b0f56719541fa06135379e8490e8544d41.

As Vinod Koul has suggested a better way to handle, this patch is not
required now and his patch already got merged in the mainline and gerrit.

chrome-os-partner:12565
TEST=built for emerge-daisy chromeos-kernel and booted on one board.

Change-Id: I1cea5efd08e29ed3ebea898595a5227bd925f748
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32505
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoarm: exynos: add busfreq trace events
Sam Leffler [Fri, 7 Sep 2012 17:35:36 +0000 (10:35 -0700)]
arm: exynos: add busfreq trace events

Add exynos_busfreq_target_{mif,int} events to monitor operation
and remove printk that is now duplicate information.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chrome-os-partner:13801
TEST=monitor evevents while playing video

Change-Id: I0e82ad4afb72e6b4664dbd95d206186864a9266e
Reviewed-on: https://gerrit.chromium.org/gerrit/32560
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
11 years agoCHROMIUM: iio: isl29018: Support fractional ALS scaling.
Bryan Freed [Wed, 29 Aug 2012 04:10:25 +0000 (21:10 -0700)]
CHROMIUM: iio: isl29018: Support fractional ALS scaling.

The Industrial IO framework supports scaling ADC values by fractions,
but most drivers default to using whole numbers.
This change turns on fractional scaling in the isl29018 driver.

BUG=chrome-os-partner:11948
TEST='echo 1.5 > in_illuminance_calibscale', and verify it has the
     expected effect on in_illuminance0_input.

Change-Id: Ie8e2e55a2a2fe008de513abd955615f5d16204ce
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31683
Reviewed-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: mac80211: prevent work queueing while quiescing on suspend
Felix Fietkau [Fri, 7 Sep 2012 13:33:12 +0000 (15:33 +0200)]
CHROMIUM: mac80211: prevent work queueing while quiescing on suspend

Do not emit a warning in that case, since there is nothing else in mac80211
that would effectively prevent more work from being queued.

BUG=chrome-os-partner:10785
TEST=per crosbug.com/p/10785#c54

Change-Id: Ic14aee400184772cbe19af65f01de11f683559fe
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32602

11 years agoCHROMIUM: ath9k: improve resume reliability
Felix Fietkau [Fri, 7 Sep 2012 09:53:32 +0000 (11:53 +0200)]
CHROMIUM: ath9k: improve resume reliability

Ensure that drv_start() always returns true, as a failing hw start usually
eventually leads to crashes when there's still a station entry present.
Call a power-on reset after resume and also if a hw reset fails, this should
bring the hardware back to life again.

BUG=chrome-os-partner:10785
TEST=per crosbug.com/p/10785#c54

Change-Id: Ib397e9b06f60f5de9bf1611f9c414f823e1770ff
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32599

11 years agoCHROMIUM: ath9k: Change rateset calculation
Sujith Manoharan [Fri, 7 Sep 2012 18:20:50 +0000 (23:50 +0530)]
CHROMIUM: ath9k: Change rateset calculation

Commit "ath9k: Change rate control to use legacy rate as last MRR"
resulted in the mixing of HT/legacy rates in a single rateset,
which is undesirable. Revert this behavior.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: I37a718181269181d78ac1a11f91e4971acd96920
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32623

11 years agoCHROMIUM: ath9k: Fix RTS/CTS rate selection
Sujith Manoharan [Fri, 10 Aug 2012 11:16:57 +0000 (16:46 +0530)]
CHROMIUM: ath9k: Fix RTS/CTS rate selection

The current method of assigning the RTS/CTS rate is completely
broken for HT mode and breaks P2P operation. Fix this by using
the basic_rates provided to the driver by mac80211. For now,
choose the lowest supported basic rate for HT frames.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: I3ced4be51bec5b3f495df4cac1a6048b03e136f4
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32622

11 years agoCHROMIUM: ath9k: Fix a crash in 2 WIRE btcoex chipsets
Mohammed Shafi Shajakhan [Tue, 28 Aug 2012 06:44:48 +0000 (12:14 +0530)]
CHROMIUM: ath9k: Fix a crash in 2 WIRE btcoex chipsets

Generic timers for BTCOEX functionality is applicable
only for 3 WIRE BTCOEX (and MCI) chipsets.
Hence btcoex->no_stomp_timer is allocated only 3 WIRE
btcoex chipsets and in all the other cases its NULL.
Make sure we stop the generic timer only if
'btcoex->hw_timer_enabled' is true(only if its up and
running)

Fixes the following crash

[68757.020454] BUG: unable to handle kernel NULL pointer dereference at 0000000c
[68757.020916] IP: [<f9b055c3>] ath9k_hw_gen_timer_stop+0x13/0x80 [ath9k_hw]
[68757.021251] *pde = 00000000
[68757.024384] EIP: 0060:[<f9b055c3>] EFLAGS: 00010082 CPU: 0
[68757.024384] EIP is at ath9k_hw_gen_timer_stop+0x13/0x80 [ath9k_hw]
[68757.024384] EAX: d32d0000 EBX: d32d0000 ECX: 00000000 EDX: 00000000
[68757.024384] ESI: e67c24c0 EDI: 00000296 EBP: e137be2c ESP: e137be20
[68757.024384]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[68757.024384] CR0: 8005003b CR2: 0000000c CR3: 00b99000 CR4: 000407d0
[68757.024384] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[68757.024384] DR6: ffff0ff0 DR7: 00000400
[68757.024384] Process kworker/u:2 (pid: 8917, ti=e137a000 task=ea7a6860 task.ti=e137a000)
[68757.024384] Stack:
[68757.024384]  c06c4676 d32d0000 e67c24c0 e137be38 f81c9590 e67c1ca0 e137be40 f81c95d9
[68757.024384]  e137be64 f81cd1c5 00000246 00000002 d32d0000 e67c05e0 e67c1ca0 e67c05e0
[68757.024384]  00000000 e137beac f81cdfa0 e137be84 00000246 00000246 e67c1ca0 e67c1ca0
[68757.024384] Call Trace:
[68757.024384]  [<c06c4676>] ? _raw_spin_lock_irqsave+0x86/0xa0
[68757.024384]  [<f81c9590>] ath9k_gen_timer_stop+0x10/0x40 [ath9k]
[68757.024384]  [<f81c95d9>] ath9k_btcoex_stop_gen_timer+0x19/0x20 [ath9k]
[68757.024384]  [<f81cd1c5>] ath9k_ps_restore+0x85/0x110 [ath9k]
[68757.024384]  [<f81cdfa0>] ath9k_config+0x220/0x520 [ath9k]
[68757.024384]  [<f81cd47d>] ? ath9k_flush+0x15d/0x1b0 [ath9k]
[68757.024384]  [<f85c7ca5>] ieee80211_hw_config+0x135/0x2c0 [mac80211]
[68757.024384]  [<f860e3c8>] ieee80211_dynamic_ps_enable_work+0x198/0x5f0 [mac80211]

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Id28cc37261ad7b29564f8a54dfc79284bde6bbad
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32621

11 years agoCHROMIUM: ath9k_hw: Wait BT calibration to complete
Rajkumar Manoharan [Fri, 7 Sep 2012 18:07:35 +0000 (23:37 +0530)]
CHROMIUM: ath9k_hw: Wait BT calibration to complete

Whenever BT calibration requested, WLAN has to wait for the
calibration to be completed. Bt right now we defer the waiting
which is causing BT calibration failure. Fix that.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: I344d301c87e080d9d6efa079688b370b78b7eb22
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32620

11 years agoCHROMIUM: ath9k: fix interrupt storms on queued hardware reset
Felix Fietkau [Fri, 7 Sep 2012 17:55:24 +0000 (23:25 +0530)]
CHROMIUM: ath9k: fix interrupt storms on queued hardware reset

commit b74713d04effbacd3d126ce94cec18742187b6ce
"ath9k: Handle fatal interrupts properly" introduced a race condition,
where
IRQs are being left enabled, however the irq handler returns IRQ_HANDLED
while the reset is still queued without addressing the IRQ cause.
This leads to an IRQ storm that prevents the system from even getting to
the reset code.

Fix this by disabling IRQs in the handler without touching intr_ref_cnt.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: I10a6c530dc3dbda66ed5f54e09251f6f109d43c2
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32619

11 years agoCHROMIUM: ath9k: Fix race in reset-work usage
Rajkumar Manoharan [Fri, 7 Sep 2012 17:47:56 +0000 (23:17 +0530)]
CHROMIUM: ath9k: Fix race in reset-work usage

Using work_pending() to defer certain operations when
a HW-reset work has been queued is racy since the check
would return false when the work item is actually in
execution. Use SC_OP_HW_RESET instead to fix this race.
Also, unify the reset debug statistics maintenance.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Ia6240350542831d796c0374ac7eff71c96ec2a06
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32618

11 years agoCHROMIUM: ath9k: Fix powersave locking
Sujith Manoharan [Fri, 7 Sep 2012 17:01:39 +0000 (22:31 +0530)]
CHROMIUM: ath9k: Fix powersave locking

The 'ps_flags' is used/accessed in a variety of contexts
and requires proper locking. Use 'sc_pm_lock' appropriately.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Ib3cf758dbd5518d60355069d6cd0be19d91dfee0
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32617

11 years agoCHROMIUM: ath9k: Fix work handling
Sujith Manoharan [Fri, 7 Sep 2012 16:51:47 +0000 (22:21 +0530)]
CHROMIUM: ath9k: Fix work handling

* Currently, there is no synchronization between the reset
  work and the tx-poll work. Fix this and make sure that we
  bail out properly if a reset work is in progress.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: I4b1ca09bc9e6970c4e072e706f052245b60072c9
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32616

11 years agoCHROMIUM: ath9k: Prune ath9k_init_device
Sujith Manoharan [Fri, 7 Sep 2012 16:25:26 +0000 (21:55 +0530)]
CHROMIUM: ath9k: Prune ath9k_init_device

Instead of cluttering ath9k_init_device() with 'ath_softc'
specific initialization code, use ath9k_init_softc() to
setup driver-specific work routines, timers etc.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: I090c6bbaf2546e109af03c048e947fce25ca0c43
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32615

11 years agoCHROMIUM: ath9k_hw: Read and configure thermocal for AR9462
Rajkumar Manoharan [Fri, 7 Sep 2012 05:08:43 +0000 (10:38 +0530)]
CHROMIUM: ath9k_hw: Read and configure thermocal for AR9462

Read and configure thermometer calibration results read from
OTP card.

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Ie908981882c62a778fe88b78212a87bc77755810
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32614

11 years agoCHROMIUM: ath9k_hw: Read and apply thermometer settings from EEPROM
Rajkumar Manoharan [Fri, 7 Sep 2012 05:07:25 +0000 (10:37 +0530)]
CHROMIUM: ath9k_hw: Read and apply thermometer settings from EEPROM

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Ic7b2b8f52cd6fb5dc2de17dad874c73afd61af90
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32613

11 years agoCHROMIUM: ath9k_hw: use peak detection for 5GHz
Rajkumar Manoharan [Fri, 31 Aug 2012 17:16:59 +0000 (22:46 +0530)]
CHROMIUM: ath9k_hw: use peak detection for 5GHz

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Ie2b38c9fba61aae7ba17e569c2b09a2a11d4e880
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32612

11 years agoCHROMIUM: ath9k_hw: add 8 points for 5G temp slop
Rajkumar Manoharan [Mon, 3 Sep 2012 09:45:03 +0000 (15:15 +0530)]
CHROMIUM: ath9k_hw: add 8 points for 5G temp slop

BUG=chrome-os-partner:12560
TEST=compile

Change-Id: Ieb82e296f4aa0b72319188c0b0c207c3e0a161d5
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32611

11 years agoCHROMIUM: ath9k: properly deal with imbalance in station add/remove calls
Felix Fietkau [Thu, 30 Aug 2012 16:02:12 +0000 (18:02 +0200)]
CHROMIUM: ath9k: properly deal with imbalance in station add/remove calls

When this happens (usually in the suspend/resume path), invalid node list
pointers get dereferenced, leading to a crash.

BUG=chrome-os-partner:10785
TEST=compile

Change-Id: I7e731ad7004a1d9526808471d374e9646cbb0241
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31985
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agogpu: vithar: tune GPU clock governor
Sam Leffler [Tue, 28 Aug 2012 15:49:28 +0000 (08:49 -0700)]
gpu: vithar: tune GPU clock governor

Address some issues in the GPU frequency selection algorithm.

The main change is to use a weighted average of the last 4 samples of the
GPU utilisation value to drive frequency step up/down's and do it based
on the number of samples instead of consecutive out-of-range samples.
This smooths transitions where the previous algorithm would not transition
because of a single sample that was out-of-range (which can happen for
various reasons outside the GPU).  Four samples is chosen as a compromise
between smoothing bumps and quickly identifying changes.

Increase the sampling frequency and tune the up/down step thresholds to
be more aggresive up-shifting and to happen faster.  The new values are
optimized for performance (over power) based on a set of workloads.

Remove the mechanism that caused a clock boost when the GPU goes !busy
after a period of being idle.  This caused anomalies such as clock ramping
at the login screen due to periodic short updates (e.g. to re-draw the
clock face).  Instead of we depend on the normal clock ramp up mechanism
which has been tuned for faster response.

Remove the special handling to speed up-shifting when seeing 100%
utilisation samples.  This happens rarely (based on stats collected) and
is now handled by more frequent sampling and shorter up-shift thresholds.

While here: move the up/down thresholds to the infotbl (simplifies
code), change the up/down thresholds to be the minimum value required
(> replaced by >=), simplify utilisation calculation, and fix a bunch
of checkpatch complaints.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chrome-os-partner:13355
TEST=open multiple webgl demo's, video playback, static html content, and a new tab; monitor gpu clock to verify the algorithm chooses an "optimal clock" (relative to performance w/o dvfs); switch between tabs and verify the clock is changed "quickly" and there is no instability in the frequency selection

Change-Id: I826e574d9215147399eb4c49844fbcd9500c3273
Reviewed-on: https://gerrit.chromium.org/gerrit/31745
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

11 years agoexynos: busfreq: Lock the INT frequency to 200MHz
Abhilash Kesavan [Thu, 30 Aug 2012 23:28:31 +0000 (16:28 -0700)]
exynos: busfreq: Lock the INT frequency to 200MHz

HDMI/Mixer needs a minimum of 200MHz INT frequency. Range locking
to 200MHz should ideally occur just before streaming starts and
unlocked down to 160MHz on stream stop. This can be done via
runtime pm call-backs or in the HDMI driver itself using the dev
framework introduced by the busfreq patches. Currently just hardcode
in the busfreq driver. Note: There will be a hit of ~30mW in INT
power due to this.

BUG=chromeos-partner:13356
TEST=Ensure when HDMI is active INT is at 200MHz and does not drop
to 160MHz.

Change-Id: I4ecee442f8111b74930ff98965c824c54d11930d
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32017
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>

11 years agoexynos5: usb: Disable device clocks after programming PHY
Vivek Gautam [Wed, 22 Aug 2012 15:50:56 +0000 (11:50 -0400)]
exynos5: usb: Disable device clocks after programming PHY

This patch adds clock disable calls and supporting code
to disable the device clocks, requested in phy_init()
and phy_exit(), after programing the PHY for usb 2.0
and usb 3.0. This clock disabling was missing until now.

BUG=chrome-os-partner:13038
TEST=emerge-daisy chromeos-kernel; test with usb 2.0 and usb 3.0
MSD and usb HID; expect reduced leakage current after driver probe
and during suspend mode since, clocks are now gated
after prgramming PHY.

Change-Id: I86966bf461f27b760c1b17397cdeddca6767a930
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31113
Reviewed-by: Bryan Freed <bfreed@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: use list_move instead of list_del/list_add
Wei Yongjun [Thu, 6 Sep 2012 04:36:49 +0000 (12:36 +0800)]
UPSTREAM: staging: gdm72xx: use list_move instead of list_del/list_add

Using list_move() instead of list_del() + list_add().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 73295fe185e58b8c0b288fee61a8a994015ab4b2)

Change-Id: If2acdc5f7c17fdbb707b80e46e5e433733932454
Reviewed-on: https://gerrit.chromium.org/gerrit/32492
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: use list_move_tail instead of list_del/list_add_tail
Wei Yongjun [Wed, 5 Sep 2012 06:49:15 +0000 (14:49 +0800)]
UPSTREAM: staging: gdm72xx: use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e5d2cb4a0b59fa3f4ecc2d47ca6afacada7794d2)

Change-Id: Id8f64de79515de4cb64ecb189f496b4d4482777d
Reviewed-on: https://gerrit.chromium.org/gerrit/32491
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: Fix bogus test
Alan Cox [Tue, 4 Sep 2012 15:04:36 +0000 (16:04 +0100)]
UPSTREAM: staging: gdm72xx: Fix bogus test

Test the return as we should

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=46921
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f1efd9fe08a9ada843cd99f949a130555df045bd)

Change-Id: I38d763f5a741d71349484b49c9dbff4702b72743
Reviewed-on: https://gerrit.chromium.org/gerrit/32490
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: use kzalloc to allocate usb_tx structure
Devendra Naga [Sat, 25 Aug 2012 21:22:35 +0000 (02:52 +0530)]
UPSTREAM: staging: gdm72xx: use kzalloc to allocate usb_tx structure

the code under alloc_tx_struct does the allocation of usb_tx structure
using kmalloc, and memsets the allocated pointer, instead we can
directly use kzalloc so that the allocated memory is set with
zeros

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 07ad99c9e32173852997523eb920950902563941)

Change-Id: I623dd5512b116924c7a5fbaefbbd26296a14cdab
Reviewed-on: https://gerrit.chromium.org/gerrit/32489
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
11 years agodrm: edid: add support for E-DDC
Shirish S [Tue, 21 Aug 2012 03:01:51 +0000 (12:01 +0900)]
drm: edid: add support for E-DDC

The current logic for probing ddc is limited to
2 blocks (256 bytes), this patch adds support
for the 4 block (512) data.

To do this, a single 8-bit segment index is
passed to the display via the I2C address 30h.
Data from the selected segment is then immediately
read via the regular DDC2 address using a repeated
I2C 'START' signal.

BUG=chrome-os-partner:13173
TEST=Verified 4blk edid file is read properly in
HDMI protocol analyser.

Change-Id: Ifcd1a6de369c1cda5f341738373a1ed483d4b9fb
Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32378
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agoCHROMIUM: sbs-battery: probe should try talking to the device
Olof Johansson [Thu, 6 Sep 2012 17:40:17 +0000 (10:40 -0700)]
CHROMIUM: sbs-battery: probe should try talking to the device

Turns out this driver doesn't actually try talking to the device at probe
time, so if it's incorrectly configured in the device tree or platform
data (or if it's been removed from the system), then probe will succeed
and every later access will sit there and time out. The end result is
a system that thinks it has a battery but can never read status, which
isn't very useful.

Instead, just read any register (I chose status) at boot, and if that
fails, don't register the device.

BUG=chrome-os-partner:11381
TEST=modify device tree to have battery at other address, try booting
and make sure the 2 minute timeout is gone (and dmesg has the error
string in it).

Change-Id: I728910968a40a55de3b3c9a10921a3684ace215f
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32406
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: dmaengine: pl330: lock work_list in set residue.
Dylan Reid [Tue, 28 Aug 2012 22:04:43 +0000 (15:04 -0700)]
CHROMIUM: dmaengine: pl330: lock work_list in set residue.

This list can be changed due to cancelation or a completed transfer
while the set residue function is iterating over it.

BUG=chrome-os-partner:12565
TEST=aplay -B20000 file.wav, should be clear, run multimedia test from
vendor.

Change-Id: Idad680f9418734396daefa308b92337f4570349b
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32405
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - update latency values of DSP
Hsinyu Chao [Thu, 6 Sep 2012 16:46:45 +0000 (00:46 +0800)]
CHROMIUM: ALSA: hda/ca0132 - update latency values of DSP

Update latency values and exposed noise reduction effect.

BUG=chrome-os-partner:13065
TEST=build and install, run latency test program, the difference between
measured and reported value should be less then or around 1ms.

Change-Id: I27eb8852f31bff7d19175ba727240301ae547da8
Signed-off-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32402
Reviewed-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: ath9k: Fix TX filter usage
Sujith Manoharan [Wed, 29 Aug 2012 03:50:42 +0000 (09:20 +0530)]
CHROMIUM: ath9k: Fix TX filter usage

The TX filter bit for a station would be set by the HW
when a frame is not acked. A frame would be completed with
ATH9K_TXERR_FILT status only when the corresponding filter bit
for the destination station is already set.

Currently, un-acknowledged  packets are added to the pending queue
and retried, but the "clear_dest_mask" bit in the descriptor is
set only when the TX status has been ATH9K_TXERR_FILT. This results
in packet loss and the log shows:

wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746071
wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746076
wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746377
...
...

This issue can be resolved by making sure that the destination
mask is cleared when the packet is being retried and the earlier
TX status is ATH9K_TXERR_XRETRY.

BUG=chrome-os-partner:12518
TEST=compile

Change-Id: I134194485dca81bafc0c7a2a167596c78e568260
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: mukesh agrawal <quiche@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32192
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agoCHROMIUM: dm: bootcache Device mapper for bootcache
Paul Taysom [Wed, 29 Aug 2012 16:46:25 +0000 (09:46 -0700)]
CHROMIUM: dm: bootcache Device mapper for bootcache

Bootcache implements a simple cache for reading blocks sequentially
off the disk that would normally be read non-sequentially.

BUG=chromium-os:25441
TEST=boot the system with bootcache enabled

Change-Id: I97bd8ddb7740270b0ff0f207a66027158e77660e
Signed-off-by: Paul Taysom <taysom@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31712
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCleanup dpms
Shirish S [Thu, 30 Aug 2012 12:09:02 +0000 (21:09 +0900)]
Cleanup dpms

The fimd_dpms is just a dummy and its
functionality is achieved in
fimd_display_power_on.

BUG=chrome-os-partner:12049
TEST=Verified the
"DISPLAY=":0" xset dpms force off "
LCD goes black completely and return back when
"on"

Change-Id: Ie7c1c1488153512651289ee851ed667d90fe8154
Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31844
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agoUPSTREAM: ARM: 7438/1: fill possible PMD empty section gaps
Nicolas Pitre [Wed, 27 Jun 2012 16:28:57 +0000 (17:28 +0100)]
UPSTREAM: ARM: 7438/1: fill possible PMD empty section gaps

On ARM with the 2-level page table format, a PMD entry is represented by
two consecutive section entries covering 2MB of virtual space.

However, static mappings always were allowed to use separate 1MB section
entries.  This means in practice that a static mapping may create half
populated PMDs via create_mapping().

Since commit 0536bdf33f (ARM: move iotable mappings within the vmalloc
region) those static mappings are located in the vmalloc area. We must
ensure no such half populated PMDs are accessible once vmalloc() or
ioremap() start looking at the vmalloc area for nearby free virtual
address ranges, or various things leading to a kernel crash will happen.

Signed-off-by: Naveen Krishna Chatradhi <naveen@chromium.org>
(cherry picked from commit 19b52abe3c5d759661500a1dc810924369b2ad46)

BUG=None
TEST=built and booted on one board.

Change-Id: I3731dc511107f4b73e5cab047c80d28cd932022f
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: "R, Sricharan" <r.sricharan@ti.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-on: https://gerrit.chromium.org/gerrit/32386
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agos5p: ehci: Add essential clock gating in suspend/resume
Vivek Gautam [Thu, 23 Aug 2012 14:37:57 +0000 (10:37 -0400)]
s5p: ehci: Add essential clock gating in suspend/resume

This patch adds missing clock gating support while the ehci
controller goes into S2R. This would save us some power
while the system is suspended.

BUG=chrome-os-partner:13500
TEST=emerge-daisy chromeos-kernel; Test system S2R using
"powerd_suspend"; expect reduced leakage current when clocks
are gated in suspend mode.

NOTE: haven't measured power saving yet with this change.

Change-Id: Id7c7b79215f1ab3c7696414e3e5715767c540b6d
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31471
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoexynos: ohci: Add essential clock gating in suspend/resume
Vivek Gautam [Thu, 23 Aug 2012 14:33:29 +0000 (10:33 -0400)]
exynos: ohci: Add essential clock gating in suspend/resume

This patch adds missing clock gating support while the ohci
controller goes into S2R. This would save us some power
while the system is suspended.

BUG=chrome-os-partner:13500
TEST=emerge-daisy chromeos-kernel; Test system S2R using
"powerd_suspend"; expect reduced leakage current when clocks
are gated in suspend mode.

NOTE: haven't measured power saving yet with this change.

Change-Id: I1b03bd11677d50db7ab9d2a8f1a5385f577b7fa2
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31470
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - Change retry timeout method.
Chih-Chung Chang [Tue, 4 Sep 2012 05:45:15 +0000 (13:45 +0800)]
CHROMIUM: ALSA: hda/ca0132 - Change retry timeout method.

Originally we do 50 retries in chipio_send() and dspio_send().
Now it is changed to sleep for 1ms after each try, and timeout after 1 second.
Similar change is applied to wait for DMA done.

BUG=chrome-os-partner:12327
TEST=play youtube, suspend/resume 10 times.

Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Change-Id: I59e9350a48721a8e426bfba1da2f2aad7ee907a0
Reviewed-on: https://gerrit.chromium.org/gerrit/32128

11 years agoCHROMIUM: ALSA: hda/ca0132 - DMA patch from Creative.
Chih-Chung Chang [Mon, 3 Sep 2012 08:29:12 +0000 (16:29 +0800)]
CHROMIUM: ALSA: hda/ca0132 - DMA patch from Creative.

Add support for DSP firmware transfer to CA0132 codec.
Add transfer handler functions.
Call the new snd_hda_codec_load_dsp_xxx loader ops to control download.
Add chip access routines.

BUG=chrome-os-partner:12327

Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Change-Id: I2765f13c4209a55d3705e798cf016efe627de893
Reviewed-on: https://gerrit.chromium.org/gerrit/32127

11 years agoCHROMIUM: ALSA: Add new DSP loader callback routines
Chih-Chung Chang [Mon, 3 Sep 2012 03:25:33 +0000 (11:25 +0800)]
CHROMIUM: ALSA: Add new DSP loader callback routines

BUG=chrome-os-partner:12327

Change-Id: I1dff2d4d672b0b03eb486fb97295367db4b07354
Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32126
Reviewed-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: ALSA: Make snd_sgbuf_get_{ptr|addr}() available for non-SG cases.
Ian Minett [Thu, 30 Aug 2012 04:55:11 +0000 (21:55 -0700)]
CHROMIUM: ALSA: Make snd_sgbuf_get_{ptr|addr}() available for non-SG cases.

BUG=chrome-os-partner:12327

Change-Id: Iae062d860bc4044db79284290ff28b29c58b29ce
Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32134

11 years agoCHROMIUM: ramoops: Copy the entire buffer to deal with bit rot
Sameer Nanda [Tue, 4 Sep 2012 20:50:13 +0000 (13:50 -0700)]
CHROMIUM: ramoops: Copy the entire buffer to deal with bit rot

If unclean shutdown is done by yanking power rails, the RAM may be in a
state where it is not getting refreshed for a short period of time. This
can cause bit rotting in RAM and throw off the wraparound and buffer
size calculation logic. To get around this, copy the entire console
buffer. Note that this, of course, won't do anything to fix the bit
rotting but the intent here is that some logs are better than none.

BUG=chrome-os-partner:13249
TEST=on a snow or link system do a warm reboot by pressing
alt-volume_up-r keys together. The system should reboot. Upon bootup,
check contents of "/dev/pstore/console-ramoops" and ensure they are from
dmesg of the previous boot.

Change-Id: I68b2b10a6b3fc29329979cc0c659b440436b771f
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32180
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoexynos:gsc:modify number of output/capture buffers
Kiran AVND [Tue, 4 Sep 2012 11:44:18 +0000 (17:14 +0530)]
exynos:gsc:modify number of output/capture buffers

gscaler src buffer count as well as destination buffer
count increased to 32.
This is required to interface to MFC for csc, as MFC
demands 32 capture buffers for some H264 streams

BUG=streams with more than 16 dpb buffers fail
TEST=tested through browser for streams with 20 dpbs

Change-Id: I817d65c122eb8974b6c658f65fe48e1e1131c83e
Signed-off-by: Kiran AVND <avnd.kiran@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32133
Tested-by: kiran <kiran@chromium.org>
Reviewed-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Arun Mankuzhi <arun@chromium.org>
Reviewed-by: Arun Mankuzhi <arun@chromium.org>
11 years agoCHROMIUM: dm: fix newlines in printouts
Olof Johansson [Tue, 4 Sep 2012 18:38:23 +0000 (11:38 -0700)]
CHROMIUM: dm: fix newlines in printouts

Turns out that we print double newlines:

[    3.799802] device-mapper: init: attempting early device configuration.
[    3.799807]

So, don't add the newline at the end of DM*() macros.

BUG=none
TEST=look at dmesg after booting

Change-Id: I039a3451c5a757641f1c0211845fc0bdc218b2bc
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32154
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoarm: exynos: Gracefully exit on suspend failure
Abhilash Kesavan [Tue, 21 Aug 2012 11:48:15 +0000 (17:18 +0530)]
arm: exynos: Gracefully exit on suspend failure

As per Pg 641 Pt 7 of Exynos_5250_SCP_UM_REV1.00:

When there are pending interrupt events, WFI/WFE instruction are
ignored. To cancel the power-down sequence follow these steps:
1) Disable system power-down through CENTRAL_SEQ_CONFIGURATION
and CENTRAL_SEQ_CONFIGURATION_DMC registers
2) Clear WAKEUP_STAT and WAKEUP_MASK_DMC registers
3) Enable interrupt service routine for CPU

Code for early wakeup already exists; remove the panic on suspend
failure, clear the wakeup state register and return error from
cpu_suspend to indicate a failed suspend.

BUG=chrome-os-partner:12807
TEST=I still have not been able to reproduce this bug. I am on ToT
kernel, u-boot and ec running Jon's suspend_test.sh script. On
commenting out cpu_do_idle in the suspend code, the system resumes
successfully taking the early_wakeup path.
cat /sys/kernel/debug/suspend_stats shows
(success: 0
 fail: 1
 last_failed_errno: -16)

Change-Id: I082664ae77db6116bccff5555a8d43412c780277
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30992
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - make initialization faster.
Chih-Chung Chang [Fri, 31 Aug 2012 08:19:15 +0000 (16:19 +0800)]
CHROMIUM: ALSA: hda/ca0132 - make initialization faster.

Remove unnecessary dspio_send() from dspio_write_wait().
Check dsp status before sleep and sleep for shorter periods.

BUG=chrome-os-partner:12307
TEST=build and install, check dmesg.

Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Change-Id: I0e1d5b0d29c446f29beea704c1b2cca22524c142
Reviewed-on: https://gerrit.chromium.org/gerrit/32023
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Chih-Chung Chang <chihchung@chromium.org>
Commit-Ready: Chih-Chung Chang <chihchung@chromium.org>

11 years agoCHROMIUM: config: exynos5: enable xfrm_user module
Ben Chan [Sat, 1 Sep 2012 03:12:51 +0000 (20:12 -0700)]
CHROMIUM: config: exynos5: enable xfrm_user module

xfrm_user kernel module is needed for supporting LT2P/IPsec VPN via
strongSwan.

BUG=chromium-os:21495
TEST=Build chromeos-kernel and test L2TP/IPsec VPN.

Change-Id: Ic7635a1057642d8eaee0a15f6d1db210804a2912
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32084
Reviewed-by: Darin Petkov <petkov@chromium.org>
11 years agoHROMIUM: ALSA: hda/ca0132 - latency patch from Creative.
Hsinyu Chao [Thu, 30 Aug 2012 04:38:45 +0000 (12:38 +0800)]
HROMIUM: ALSA: hda/ca0132 - latency patch from Creative.

This change improves the latency and report the correct estimate
delay when dsp loaded or not. DSP parameter set incorrect issue has
also been fixed.

BUG=chrome-os-partner:12926
TEST=build kernel, record some sound by arecord command. Google hangout
should not hear echo.

Change-Id: Ibade3a0cfbd956379ff1690cd1e0f3f31eedd6f9
Signed-off-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31827
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
11 years agoUPSTREAM: [media] uvcvideo: Reset the bytesused field when recycling an erroneous...
Jayakrishnan Memana [Sun, 15 Jul 2012 13:54:03 +0000 (10:54 -0300)]
UPSTREAM: [media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer

Buffers marked as erroneous are recycled immediately by the driver if
the nodrop module parameter isn't set. The buffer payload size is reset
to 0, but the buffer bytesused field isn't. This results in the buffer
being immediately considered as complete, leading to an infinite loop in
interrupt context.

Fix the problem by resetting the bytesused field when recycling the
buffer.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jayakrishnan Memana <jayakrishnan.memana@maxim-ic.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
(cherry picked from commit 8a3f0ede2b3f5477122060af1a816c6bbf09fcd2)

BUG=chromium-os:33591
TEST=compile

Change-Id: Ibbb507bff1e57b7a92e84c36457de04d2115b3b8
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32071
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoCHROMIUM: gobi: call usbnet_disconnect after qc_deregister
Ben Chan [Fri, 31 Aug 2012 21:29:03 +0000 (14:29 -0700)]
CHROMIUM: gobi: call usbnet_disconnect after qc_deregister

usbnet_disconnect should be called after qc_deregister and at the end of
qcnet_disconnect as qc_deregister may still need to access the
underlying usb_device during client_free -> cid_free -> write_sync.

BUG=chrome-os-partner:12812
TEST=Tested the following on a system with a Gobi modem:
1. Run suspend/resume stress test.
2. Manually connect to a cellular network, suspend and then resume the
   system. Observe from syslog how qcusbnet is released and
   re-initialized.

Change-Id: I0e5f2fd12896992e0da5b99e8b92274f87e1640c
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32063
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agomedia:gscalar: fix csc RGB out/in format settings
Kiran AVND [Fri, 31 Aug 2012 08:22:40 +0000 (13:52 +0530)]
media:gscalar: fix csc RGB out/in format settings

macros used to set RGB output and input csc aren't correct.
This causes RGB(16,16,16) to appear where we expect RGB(0,0,0).

BUG:chrome-os-partner:13370
TEST: http://code.entropywave.com/test-media/gamut/gamut-theora-bt470.ogv
      Transcode using ffmpeg: to gamut-theora-bt470.mp4(h264 content)
      Play on snow; with HW decode enabled
      checkboard pattern not observed, playback similar to software decoding.

Change-Id: Ia12390e39f68bde6cb4a5a6202324b96761dd26e
Signed-off-by: Kiran AVND <avnd.kiran@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32020
Reviewed-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Tested-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Reviewed-by: Sunil Mazhavanchery <sunilm@samsung.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Kiran Avnd <kiran@chromium.org>

11 years agoRevert "CHROMIUM: ramoops: Copy the entire buffer to deal with bit rot"
Andrew de los Reyes [Fri, 31 Aug 2012 22:10:20 +0000 (15:10 -0700)]
Revert "CHROMIUM: ramoops: Copy the entire buffer to deal with bit rot"

This reverts commit 4aa82798833de5023d60a81cd1abd118da03a0f1

Change-Id: Ie3272c25d9c0f2aced79588faac172395d07afb4
Reviewed-on: https://gerrit.chromium.org/gerrit/32061
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
11 years agogpu: vithar: Fix compilation error when disabling T6XX_DVFS
Shariq Hasnain [Tue, 7 Aug 2012 14:00:16 +0000 (19:30 +0530)]
gpu: vithar: Fix compilation error when disabling T6XX_DVFS

This patch fixes the build errors that occur when T6XX_DVFS is disabled.

Signed-off-by: Shariq Hasnain <shariq.786@samsung.com>
BUG=None
TEST=Build tested with T6XX_DVFS disabled.

Change-Id: I999489ac6e55a92fc68bac5ff67fb91cf926865c
Reviewed-on: https://gerrit.chromium.org/gerrit/29584
Commit-Ready: shariq hasnain <shariq.786@samsung.com>
Reviewed-by: shariq hasnain <shariq.786@samsung.com>
Tested-by: shariq hasnain <shariq.786@samsung.com>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>