Revert "Revert "msm: display: Do not commit in unset for external.""

This reverts commit 39bc80e73d0a1b238a8584ae414e3fac152196cb.
msm:video: Enable LUT update on DSI command mode panel

CRs-Fixed: 462625

Change-Id: Ieb670abbed0ad06a9c758fb044bf71b6fc2c71b0
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
msm_fb: display: remove extra mdp4_dsi_cmd_clk_check()

Since mdp4_dsi_cmd_clk_check() is called inside of
mdp4_dsi_cmd_pipe_commit() also, mdp4_dsi_cmd_clk_check()
is called two times from pan display route. This patch
remove mdp4_dsi_cmd_clk_check() from mdp4_dsi_cmd_overlay()
to avoid mdp4_dsi_cmd_clk_check() called twice from
pan display route.

CRs-fixed: 449809
Change-Id: Idbeb968e6af73abac2bb8c800a8c55015ea6a0bf
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: change TE simulation and read pointer interrupt timing

The current parameters for command mode TE simulation on mdp side are
not straightforward and cause double read pointer interrupts. Now make
read pointer interrupt and line counter reset happen right at h/w
vsync, and kick_off start position and height are set to back porch
and max respectively, so timing is much simplified and the chance of
tearing is reduced.

CRs-fixed: 463273
Change-Id: Ia25710556bc2b031cdfaaf08fee034baab33d124
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
video: msm: Fix a mismerge

Change-Id: Ie60bcc3ee9562f54942a34450b3431ee12c79776
msm_fb: display: add wfd clk ctrl in pipe_commit

mdp_clk_ctrl on is not called when commit is from overlay commit path
which can cause mdp hang. mdp_clk_ctrl off should be after mdp
overlay2 is done, so schedule a work in overlay2 done isr.

Change-Id: I94fd08da27cfda114f5cc0056a5103f0a9b772f6
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: display: reduce timeline to 1 for smart panel

For smart display, dsi command and wfd, since it has its
own buffer, the input buffer can be released once the
display commit finishes, hence the fence threshold for
creation can be smaller. This patch reduce the timeline
from 2 to 1 for samrt panels. Also, it needs to
wait4dmap/wait4ov after kicked off. Otherwise, tearing may
happen.

Change-Id: I9eca871d8d863ef23b1d67b6e1e9cffea40ae4a6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: fix fence fd list be put twice

msm_fb_wait_for_fence() will put fence fd list if sync_fence_wait()
failed. After that same fd list wil be put one more time. This
cause a fd put twice and cause system crash at the time fd
was closed.

Change-Id: If6a358e051c98841e34c23d81098243003ef0836
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: initialize dmap_comp before wait4dmap

blt_wait flag will be set when both two writeback buffers
are used. In this case, kickoff can not be proceeded until
next dmap_done to release writeback buffer. This patch
initialize dmap_comp before wait4dmap to make sure
wait_for_completion is enforced.

CRs-fixed: 448168
Change-Id: I64f2ad599b18f9d8b346c41a55829c564fcced0b
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: release mdp clk in mdp4_overlay_writeback_on()

mdp clk is not released in mdp4_overlay_writeback_on()

CRs-fixed: 433986

Change-Id: Ida121e03b0f08ca312c60fb8d945fe2011df853f
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
sync: don't log wait timeouts when timeout = 0

Change-Id: If7542002e10da886af7e7cbc06a0abf023c15893
Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
sync: Limit logging to particular fence on timeout and error

Change-Id: I5bd7d62260666cdd2a32212f0e828d2d5d7d7bba
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
video: msm: Fix tearing

 * Undo Samsung's damage in video mode driver. We need to wait for
   DMA_P in the latest driver code or tearing will result.

Change-Id: Id30ccdf27dd76631e494bbef9814be36a0af05dc
Revert "Revert "Revert "ARM: 7169/1: topdown mmap support"""

This reverts commit 44a1c3ee83110175604e7076bc6fdacd75689343.
Merge remote-tracking branch 'remotes/cm-10.2/cm-10.2' into exp-4.3
v.1.6
ext3: fix data=journal fast mount/umount hang

commit e643692138cfa33528f054b071ba2583509bb217 upstream.

In data=journal mode, if we unmount the file system before a
transaction has a chance to complete, when the journal inode is being
evicted, we can end up calling into log_wait_commit() for the
last transaction, after the journalling machinery has been shut down.
That triggers the WARN_ONCE in __log_start_commit().

Arguably we should adjust ext3_should_journal_data() to return FALSE
for the journal inode, but the only place it matters is
ext3_evict_inode(), and so it's to save a bit of CPU time, and to make
the patch much more obviously correct by inspection(tm), we'll fix it
by explicitly not trying to waiting for a journal commit when we are
evicting the journal inode, since it's guaranteed to never succeed in
this case.

This can be easily replicated via:

     mount -t ext3 -o data=journal /dev/vdb /vdb ; umount /vdb

This is a port of ext4 fix from Ted Ts'o.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
libata: skip SRST for all SIMG [34]7x port-multipliers

commit 7a87718d92760fc688628ad6a430643dafa16f1f upstream.

For some reason, a lot of port-multipliers have issues with softreset.
SIMG [34]7x series port-multipliers have been quite erratic in this
regard.  I recall that it was better with some firmware revisions and
the current list of quirks worked fine for a while.  I think it got
worse with later firmwares or maybe my test coverage wasn't good
enough.  Anyways, HPA is reporting that his 3726 setup suffers SRST
failures and then the PMP gets confused and fails to probe the last
port.

The hope was that we try to stick to the standard as much as possible
and soonish the PMPs and their firmwares will improve in quality, so
the quirk list was kept to minimum.  Well, it seems like that's never
gonna happen.

Let's set NO_SRST for all [34]7x PMPs so that whatever remaining
userbase of the device suffer the least.  Maybe we should do the same
for 57xx's but unfortunately I don't have any device left to test and
I'm not even sure 57xx's have ever been made widely available, so
let's leave those alone for now.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ata_piix: IDE-mode SATA patch for Intel Coleto Creek DeviceIDs

commit c7e8695bfa0611b39493a9dfe8bab9f63f9809bd upstream.

This patch adds the IDE-mode SATA DeviceIDs for the Intel Coleto Creek PCH.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ASoC: sglt5000: Fix SGTL5000_PLL_FRAC_DIV_MASK

commit 5c78dfe87ea04b501ee000a7f03b9432ac9d008c upstream.

SGTL5000_PLL_FRAC_DIV_MASK is used to mask bits 0-10 (11 bits in total) of
register CHIP_PLL_CTRL, so fix the mask to accomodate all this bit range.

Reported-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>