ASoC: msm: Support for the DTS PP commands and DEC params

Support for the DTS PP and DEC params. Configure it using the
params configured from the userspace.
Configure the DTS POPP topology for the DTS decoder.

Change-Id: I456bad39a0bf8dac445141e9555110f41276ce8d
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
msm: display: overlay coordinate range

From mdp 4.3 and up, source and destinatin coordinates are
12 bits.

Change-Id: I4172da0cd5ba55c13a9f78beee349a4466490942
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm_fb: Set RR sched policy for Glupdator thread

Set Round Robin Scheduling policy for GLUpdator
thread.

Change-Id: I637ca364d325d6c847c73e8eec403e76094d93c5
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
msm: dma: Moving queue_work() function within spinlock

Currently we are adding a dma command to the staged list with in a
spinlock and then adding to workqueue using queue_work after unlocking
the spinlock. With this there is chance of executing DMA commands in out
of order in below concurrency case.

Tread1                                Thread2
__msm_dmov_enqueue_cmd_ext
   spin_lock_irqsave(..)
   list_add_tail(..)
   spin_unlock_irqrestore(..)
       --PREEMPT--
                                      __msm_dmov_enqueue_cmd_ext
                                         spin_lock_irqsave(..)
                                         list_add_tail(..)
                                         spin_unlock_irqrestore(..)
                                         queue_work()
                                         ..
   queue_work()
So adding queue_work with in spin_lock will make sure that the
work added in the work_queue is processed in the same order as they
are added in staged_commands.

CRs-Fixed: 423190
Change-Id: I2ffd1327fb5f0cd1f06db7de9c026d1c4997fe4d
Acked-by: Gopi Krishna Nedanuri <gnedanur@qti.qualcomm.com>
Signed-off-by: Utsab Bose <ubose@codeaurora.org>
msm: timer: Use 32768Hz GPT and SCLK on 8064 family

On 8064 SOC family, a dedicated XO is derived to support
sleep clock at 32768Hz unlike 8960 SOC family where TCXO
divider was used with effective freq. of 32765Hz.

CRs-fixed: 462079
Change-Id: I79142703c4ffac209f4dedeefebc235eeb8b140d
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
hrtimer: Don't reinitialize a cpu_base's lock on CPU_UP

The current code makes the assumption that a cpu_base lock cannot
be held if a CPU is offline, which is tragically wrong.

If a hrtimer is not queued, then it will not be migrated by
migrate_hrtimers() when a CPU is offlined. Therefore, the
hrtimer's cpu_base may still point to a CPU which has
subsequently gone offline if the timer wasn't enqueued at the
time the CPU went down.

Normally this wouldn't be a problem, but a cpu_base's lock is
blindly reinitialized each time a CPU is brought up. If a CPU is
brought online during the period that another thread is
performing a hrtimer operation on a stale hrtimer, then the lock
will be reinitialized under its feet, and a SPIN_BUG() like the
following will be observed:

 [  448.212369] BUG: spinlock already unlocked on CPU#3,
 swapper/3/0
[  448.217368]  lock: 0xc47b1a40, .magic: dead4ead, .owner:
swapper/3/0, .owner_cpu: -1
[  448.217398] [<c0014398>] (unwind_backtrace+0x0/0x120) from
[<c0269ab0>] (do_raw_spin_unlock+0x44/0xdc)
[  448.217419] [<c0269ab0>] (do_raw_spin_unlock+0x44/0xdc) from
[<c071bbb0>] (_raw_spin_unlock_irqrestore+0xc/0x38)
[  448.217438] [<c071bbb0>]
(_raw_spin_unlock_irqrestore+0xc/0x38) from [<c00aa498>]
(hrtimer_try_to_cancel+0xf8/0x10c)
[  448.217455] [<c00aa498>] (hrtimer_try_to_cancel+0xf8/0x10c)
from [<c00aa4bc>] (hrtimer_cancel+0x10/0x20)
[  448.217475] [<c00aa4bc>] (hrtimer_cancel+0x10/0x20) from
[<c00e6934>] (rcu_idle_exit_common+0x5c/0xe0)
[  448.217494] [<c00e6934>] (rcu_idle_exit_common+0x5c/0xe0) from
[<c00e6ae8>] (rcu_idle_exit+0x9c/0xb4)
[  448.217514] [<c00e6ae8>] (rcu_idle_exit+0x9c/0xb4) from
[<c000f2dc>] (cpu_idle+0x98/0xf0)
[  448.217529] [<c000f2dc>] (cpu_idle+0x98/0xf0) from
[<000081ac>] (0x81ac)

CRs-Fixed: 460670
Change-Id: I588f6a864054abe6d4c249aad815c6d2f5a54077
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
hrtimer: Prevent hrtimer_enqueue_reprogram race

hrtimer_enqueue_reprogram contains a race which could result in
timer.base switch during unlock/lock sequence.

hrtimer_enqueue_reprogram is releasing the lock protecting the timer
base for calling raise_softirq_irqsoff() due to a lock ordering issue
versus rq->lock.

If during that time another CPU calls __hrtimer_start_range_ns() on
the same hrtimer, the timer base might switch, before the current CPU
can lock base->lock again and therefor the unlock_timer_base() call
will unlock the wrong lock.

[ tglx: Added comment and massaged changelog ]

Change-Id: I327d862c28f24b77a62861764393c4bf660a7318
Signed-off-by: Leonid Shatz <leonid.shatz@ravellosystems.com>
Signed-off-by: Izik Eidus <izik.eidus@ravellosystems.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1359981217-389-1-git-send-email-izik.eidus@ravellosystems.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: b22affe0aef429d657bc6505aacb1c569340ddd2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Taniya Das <tdas@codeaurora.org>
msm_fb: hdmi: Alloc fb dev by default

This change allocates fb device for both HDMI as primary and
external.

Change-Id: I00c5caf75c6a4e1c102a47b0e539aba264ea28ee
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: display: set frc as 3d panel

frc has been upgraded to support 3d.

Change-Id: I139fb25e579f0643bb19c8d15e7d6fd745fa05be
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm_fb: hdmi: support for dynamic audio reconfiguration

This change provides the sysfs node support to do the audio
configuration on the run without switching off hdmi or video.

This can be achieved by writing audio configuration data to
sysfs node: /sys/class/graphics/fb*/hdmi_audio

0th nibble => down mixing
1st nibble => level shift
2ed nibble => speaker allocation
3ed nibble => number of channels
4th nibble => sampling rate

fb1 => hdmi as external targets
fb0 => hdmi as primary targets

Change-Id: Ideacac5275d89d667dbae6c5a97540801e3fd41f
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: Audio sample rate change

This change uses dynamic audio re-configuration to configure
the audio setting without de-authenticating the HDCP link or
resetting HDMI core.

CRs-Fixed: 467646
Change-Id: I76655885a623942bdad48b5160c967c371b62efb
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Merge "msm_fb: hdmi: support for dynamic audio reconfiguration"
Merge "msm_fb: hdmi: Audio sample rate change"
Merge "msm_fb: hdmi: Alloc fb dev by default"
Merge "hrtimer: Prevent hrtimer_enqueue_reprogram race"
Merge "hrtimer: Don't reinitialize a cpu_base's lock on CPU_UP"
Merge "msm: timer: Use 32768Hz GPT and SCLK on 8064 family"
Merge "msm: dma: Moving queue_work() function within spinlock"
msm_fb: Set MDP clk at min 266hz

Set MDP core clk to a min value of 266mhz.

Change-Id: I9f46d748abf3e3bf43e9c546b15f66c7e5acc1c0
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Merge "msm_fb: Set RR sched policy for Glupdator thread"