Commit graph

4980 commits

Author SHA1 Message Date
Kalyan Thota
f5b1487eb2 msm_fb: call complete for no_update timer after power flag is set
In Suspend case, after we complete for no_update timer and before
we set power down flag to false we might recyle the CABL sequence
which might cause do_hist to fail till resume

CRs-Fixed: 434491
Change-Id: I51f9f0d9edb26c7671d44162f55c01acdde8f3d7
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
2013-03-07 15:25:12 -08:00
Padmanabhan Komanduru
cd5918a715 msm_fb: Handle histogram IRQ cleanly during suspend/resume
Currently, if the histogram disable IOCTL comes after panel
is turned off, we early return the IOCTL causing the interrupt
to be left enabled. This causes IPC issues during suspend. Fix
this issue by properly enabling/disabling the histogram interrupt
during suspend/resume scenario.

CRs-Fixed: 434491
Change-Id: I4d38776a43ea854aff3c10c8d9d5450af1d98c91
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2013-03-07 15:25:10 -08:00
Naseer Ahmed
3af6972218 msm_fb: display: update var in display commit
Need the value of var in display commit to update the double buffers.
If not, double buffering doesn't work in minui (eg. recovery and off-charger
mode)

Change-Id: I1fba52243cc781f18742131759245911d32c9b18
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:25:04 -08:00
Kuogee Hsieh
4adff91942 msm_fb: display: check FB_ACTIVATE_VBL bit only
FB_ACTIVATE_VBL bit is set to enable TE logic at pan_display
and unset to disable TE logic at pan_display for smart panel.
This patch checks for FB_ACTIVATE_VBL bit set only instead of
value.

CRs-fixed: 433399
Change-Id: I6fc913c6752fcca6a27c783c45ab318065217973
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-07 15:25:03 -08:00
Huaibin Yang
c0e1c24799 msm_fb: display: fix frame rate wrong calculation
For cmd mode the frame rate calculation result is wrong. Also in mdp
driver there are several places to do the same calculation. So fix the
wrong calculation and use a single func to do calculation.

Conflicts:

	drivers/video/msm/msm_fb.c

Change-Id: I3a4be39e480ce82677dcefb666202947f7f6d3c1
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit d4eb5a1a3ef0935ce6aeffb2b48974c01b9518b9)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:25:02 -08:00
Huaibin Yang
99842e9189 msm_fb: display: check bus scale handler for registration
mdp bus client could be registered multiple times without the check.

Change-Id: I582741c75e815873357e62bc9bf0ff61a4cecf9f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:25:00 -08:00
Maheshwar Ajja
6204f9f258 msm: vidc: Add free buffer api to flush state
This change adds free buffer api to video
client's flushing state to allow buffer
freeing in flush state.

CRs-fixed: 430214
Change-Id: I970efbbd8cc503eab4b944e12630f1b1faa9069c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-07 15:24:57 -08:00
Shobhit Pandey
17df18df57 msm: vidc: Add the change to prevent memory leak
Memory allocated for "buf_entry" and "sched_cctxt"
is not freed in case if error is returned. This
change prevents possible memory leak in video
decoder driver.

CRs-fixed: 432323
Change-Id: I1c8775fb701f1568f704b6ddbb4e835304d2a817
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
2013-03-07 15:24:53 -08:00
Kuogee Hsieh
e1e791dcf5 msm_fb: display: add satge commit without pipes queued
This patch allow satge commit without pipes queued to
allow a pipe to be un-staged from mixer immediately after
overlay_unset.

Change-Id: I03abb907c66cce3d0559743d3bb1eb26a88dc78a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:24:53 -08:00
Siddhartha Agrawal
8de4e205d5 msm_fb: display: Evenly balancing load on MDP ports
Moving RGB1 and RGB2 to AXI port 1. This fixes underrun issues seen
on External display while connecting and disconnecting HDMI. This patch
evenly balancing pipe loads on each port.

Change-Id: I2dc1166d04bb938f9e233a6de52f1a8a3fdd29e2
CRs-Fixed: 435458
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:24:48 -08:00
Huaibin Yang
de2a059487 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>
2013-03-07 15:24:44 -08:00
Mayank Chopra
dca7ee656d msm_fb: display: Add alpha enable check in blend
FIR and M/N scalar when used for downscaling, drops
alpha channel of the given layer. To notify this, alpha_drop flag
is updated accordingly. This flag need not be checked for layers
with no alpha plane. In some scenarios alpha_drop may get enabled
for the layers with no alpha plane and cause issues realted to blend
composition of layers. Check for setting alpha_drop only if source
ayer has alpha plane.

Change-Id: Ie64b30c045a78d0d68eb9efacc76902afae7850d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2013-03-07 15:24:43 -08:00
Ken Zhang
4ba4e55f0f msm: display: panel frame rate report
Add metadata ioctl for retrieving panel frame rate.
Get ready to remove reserved fields usage.

Change-Id: I51a4aed9d85efd5f83a184100b6a3dc682c7a67c
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-07 15:24:42 -08:00
Kuogee Hsieh
777a1765e1 msm_fb: display: fix iommu leak during base layer swap
Retain RGB1 iommu information during  base layer swap
so that iommu used by RGB1 can be freed back to pool later.

Change-Id: Ibed85179284743dc8a9d1434f0c81626b0567e16
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit be46f9f596c5172438a74759d48ca7db600cd737)
2013-03-07 15:24:40 -08:00
Ken Zhang
d614c3611e msm: display: sync point clean up
Remove unused fence input in mdp_display_commit
structure
Use different timeline name for different fb

Change-Id: I4edd335b36dce057ff3e54302af6088a9cc470ec
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-07 15:24:35 -08:00
Rajeshwar Kurapaty
9044dea422 msm: vidc: Amend the check to reset data corrupt flag
We should reset the data corrupt flag only for codecs
other than H264 and MPEG-2 in line with the video firmware
support. Hence, modify the conditional check.

Change-Id: I7c4d5557a3f9b1d1762fe7cfcd5693a6760188f0
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit c165675bf03feb182bfd46d2ac5ceebcf4987f74)

Signed-off-by: Manish Kumar <manishku@codeaurora.org>
2013-03-07 15:24:35 -08:00
Rajeshwar Kurapaty
f9fd1434a4 msm: vidc: Add support for Mpeg-2 open-gop handling
ISDB-T client requires flags indicating the correctness
of output YUV data from MPEG-2 decoder. With this commit,
DATA_CORRUPT flag is sent from the driver if the output
YUV is either INCORRECT or APPROX_CORRECT.

Change-Id: I72e8ba81f45200715a195497d4eae140cbe86616
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit d68ca84da4a5c68eb2caf1f9e4dbb665bba5a05c)

Conflicts:

	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
2013-03-07 15:24:34 -08:00
Shobhit Pandey
2e298ef9e6 msm: vidc: Modify the MPEG-2 aspect ratio calculation
MPEG-2 display aspect ratio calculation was done similar
to MPEG-4 standard. Correct it as per the MPEG-2 standard
and video core interface specification.

Change-Id: I1aa98ca238c7b38e35c78905b29457cfa59edd45
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
(cherry picked from commit ce5f973881c11491c3fa35ceb8c945a6c8ee2b8f)

Signed-off-by: Manish Kumar <manishku@codeaurora.org>
2013-03-07 15:24:33 -08:00
Siddhartha Agrawal
027518be3a msm_fb:display: Enable LVDS panel support
The JB MR1 update was not recognizing the LVDS panel and hence
throwing an invalid panel error. Adding check for LVDS panel to
enable display on 8064 CDP.

Change-Id: Ib125cc797b288ca027f91778d9892acfa00a3214
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:24:32 -08:00
Siddhartha Agrawal
ba14d0b42c Revert "mako: enable lgit lcd driver"
This reverts commit 2fe9369ce8b6a766bd32c183305fe56c0f6b37ea.

Change-Id: Ia4474afb4e17b87f7599ff052ab2c1582b09c4c2
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:24:32 -08:00
Huaibin Yang
e386d15cde msm_fb: display: change the location of wakeup timer call
There are two pathes (pan display and overlay commit) to commit
display buffer, so change the location of cpu timer wakup call to the
common pipe_commit function to make sure cpu get waked up around
vsync.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Change-Id: Idbe6049d740a7e17a6a90e28566f7a9c74e348f2
2013-03-07 15:24:31 -08:00
Huaibin Yang
eebca117d6 msm_fb: display: wake up system before vsync for cmd panel
Add this feature for cmd mode panel. The feature is to avoid frame
drops due to power collapse and it is already present for other
display interfaces.

Change-Id: Ic68f41cd59931294b592577475ed7480459f2cf8
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:24:31 -08:00
Ken Zhang
82c6b4cdd7 msm_fb: display: wake up system around vsync
To avoid frame drops due to power collapse,
wake up cpu right before vsync.

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/msm_fb.h

Change-Id: I63385eb329ae5e74cbac5256823fd3a213e0a0e1
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:24:30 -08:00
Srinu Gorle
6359f576ab msm: vidc: Avoid memset of list elements in the buffer entry.
- Due to race condition between free buffer and flush output buffers,
  invalid buffer is getting accessed sometimes.
- Reset all the members in buffer entry except list elements.

(cherry picked from commit 8105df366cf6b9f1ddbc15d561fb6a5f12540416)
CRs-Fixed: 411197

Change-Id: Id95037f57d7fe4bc88b96f187953194ec838d63b
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:24:26 -08:00
Shobhit Pandey
c7287d981a msm: vidc: Correct the decoder profile info assignment
Update the profile info in the sequence header with the
info which the core returns in the shared memory register.

(cherry picked from commit 5a60819aeb698b9d27937329bb5559a7a787a06e)

CRs-fixed: 408349

Change-Id: I6db75c907260c9744ec4e0d88db776be9bca8dea
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:24:23 -08:00
Huaibin Yang
586da5d998 msm_fb: display: add mdp bandwidth runtime calculation
Currently mdp bandwidth request logic is based on source image size
and number of layers. This logic can not support complicated mdp
usecases and it is not power efficient. The logic is improved by
calculating mdp bandwidth request at runtime from all pipes and mixers.

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mipi_dsi.c

CRs-fixed: 425823
Change-Id: I63206f00f8d3017a2449f8ac617fce3ba2a4d36c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:24:12 -08:00
Kuogee Hsieh
e155e1826f msm_fb: display: free borderfill pipe when ref_cnt reach 0
Borderfill pipe need to be kept as baselayer which is not
suppose to be freed at suspend. It only be freed when
ref_cnt reach 0 by "adb stop".

CRs-fixed: 429196
Change-Id: Ibffe7960cc194162d1ba71e8dc8636393938483f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-07 15:23:57 -08:00
Kuogee Hsieh
9f27d80763 msm_fb: display: add panel's late_init
Some panels need to be initialized after panel is on.
Add late_init to support this feature.

CRs-fixed: 433011
Change-Id: I73c623d1fe52363f070af79ce4bf7774cd84689e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-07 15:23:55 -08:00
Huaibin Yang
1844bc38ac msm_fb: display: skip one vsync event after enabling mdp and vsync clk
Both mdp and mdp_vsync clks are disabled for command mode panel when
no new frames are being played. When they are re-enabled if new
requests come in, the first vsync event which is signaled by read
pointer interrupt arrives in a random time due to the sync between mdp
and panel, so skip it to maintain correct vsync timing.

Change-Id: I683b765e4a16d3d152b9270f5982234b94921f1e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit a4567ac320abe5d74b3c7decdbddba4bd8c57463)
2013-03-07 15:23:54 -08:00
Ken Zhang
c55faec727 msm: display: Clear performance request data in turning on
In resume, previous cached request data needs be cleared as
they do not reflect the current hw status.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Change-Id: I6e3abe09a38b4499ceb168ea7b0351672253a6cd
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
2013-03-07 15:23:41 -08:00
Mitchel Humpherys
5ebf0bb53c ion: change ion kernel map function to not take flags argument
Buffer flags are going to be specified at allocation time rather than
map time. This removes the flags argument from the ion kernel map
function.

Change-Id: Ib983ecd0dcd7befb36287ae7037c71d4ca475f90
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-03-07 15:23:16 -08:00
Mitchel Humpherys
fefa905b39 ion: remove obsolete ion flags
The symbols CACHED and UNCACHED have been replaced by ION_FLAG_CACHED
upstream. This removes them from the kernel.

Change-Id: I90c33c293f56792131fc6bd490fe041b5798ac20
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-03-07 15:23:16 -08:00
Srinu Gorle
b769cd0cdd msm: vidc: port heap mask change to ion for secure session
Changes to pass ION_SECURE in the correct argument field
while calling ion_alloc. Without this change secure session
fails.

Change-Id: Ifa4878b1c312beafc735cb649570913159799d7c
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-03-07 15:23:15 -08:00
Hanumant Singh
19cc56631b ion: Port heap mask change to ion
Heap mask field passes as argument at allocation time to specify ion
heap.

Change-Id: I6951da81b11bfcb0e006d2539c1707aabbb12db6
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-03-07 15:22:59 -08:00
Mitchel Humpherys
fb2173a971 msm: display: include msm-specific ion header
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>

Change-Id: I7b5390d7cb9cb5b03227b77def248c48b7bc7fa2
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-03-07 15:22:57 -08:00
Kuogee Hsieh
13a6c5a252 msm_fb: display: check pipes queued before enter wait_for_completion
Timing generator will not be turned on if there are no pipes queued.
Therefore wait_for_completion may never be completed if there have
no pipes queued.

Change-Id: Iafba086e4ba20b31470c9fd385c4f5c474ecadcf
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
2013-03-07 15:22:48 -08:00
Prasad Sodagudi
57b6792f10 video: msm: Do not use disable_irq in the spin_lock_irqsave context
Both mdp_isr() and mdp_histogram_disable() uses the same
spin lock mdp_spin_lock variable.  One core waits for disabling
mdp_isr after acquiring mdp_spin_lock and other core in mdp_isr()
waits for spin lock mdp_spin_lock and dead lock between two cores.

Change-Id: I73a10494ab78e92fc88a348aed4f526091b51f89
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:48 -08:00
Carl Vanderlip
c5e5cf2fff video: msm: Remove adjustment to MDP revision
Remove the modification of mdp_rev during mdp_probe. Not needed since
board files now have the correct MDP revision data.

CRs-Fixed: 417080
Change-Id: I553cb2a8e8de43b6c7b7976c3eca67d00a3cfe4f
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c

Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:47 -08:00
Carl Vanderlip
9a6ab881ef video: msm: Send ETIMEDOUT on update-notify timeout
Send the ETIMEDOUT errno when the update-notify wait_for_completion times
out. This is required to be able to properly handle the different failure
cases in the functions that use the update notify ioctl.

Change-Id: I0e46b0b0c89f6b2e5beb3fc0ed18ebbb75dfa434
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:47 -08:00
Kinjal Bhavsar
e0911e93e3 msm_fb: display: Add timeout for waiting on update
Content Adaptive BackLight userspace algo waits on UPDATE_NOTIFY to
get the screen updates. When turning off CABL, this blocking ioctl
causes the CABL threads to wait until next screen update, which may
take indefinite time.

Add timeout value to the wait_for_completion call, to make ioctl
call blocking for at most timeout value.

CRs-Fixed: 384026
Change-Id: I6715a36020c24ddd09823bd54d4321900429a6b9
Signed-off-by: Kinjal Bhavsar <kbhavsar@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:46 -08:00
Kalyan Thota
690622870f msm_fb: configure LM1 and LM2 CSC coefficients with RGB2YUV for WFD
1) Initialise the LM1 and LM2 coefficients with RGB2YUV as WFD expects
these coefficients to be programmed.
2) LM2 is available from MDP ver 4.3, fix conditions accordingly
CRs-Fixed: 399462
Change-Id: Ifad2be0fb5c3c96fa1515e114097a87d250fd62a
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
(cherry picked from commit f6044334ee63fe9553f5cce8aa65c172c88e1175)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c

Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:46 -08:00
Kalyan Thota
03053674fd msm_fb: Retain CSC values across suspend/resume sequence
CSC values pertaining to various H/W blocks are stored in a
global structure and will be re-applied during resume sequence.

CRs-Fixed: 376159
Change-Id: Ieb151185efd106041e28feedf4fa271ae4ba2666
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:46 -08:00
Carl Vanderlip
6e76381abd video: msm: Enable mdp clock for histogram and histLUT
Enable the mdp clock for histogram and histogram LUT to ensure that the
clock remains enabled when they are being accessed.

Change-Id: Ic744f2ee96b64442f23ba19aa1c38552c0dad83a
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:45 -08:00
Carl Vanderlip
ddf5427d9f video: msm: Ensure idle state before enabling histogram
Disable interrupt, set state flags to false, cancel histogram collection,
and clear the workqueue before attempting to enable the histogram. This
guarantees that this is the only configuration of the histogram running.

Change-Id: I222932db40494724b3efdb2e5bea08a849095c1e
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 5e5f3b4ff8a4a0d980e02fa38c2b70fec7095e79)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:44 -08:00
Carl Vanderlip
cb250ffb3c video: msm: Defer histogram reset to workqueue
Currently, when an underrun occurs, a reset request is sent to the
histogram hardware. This has been observed to cause a hang in the histogram
collection cycle. The fix for this hang is to instead rely on the existing
checks for histogram validity in the histgram read worker. When the
underrun occurs, the histogram is invalidated, which in turn causes the
histogram read worker to reset the histogram collection when it attempts to
read its contents.

Change-Id: I66d33ddedef76fdcb6c4a3d8095c0e8ca695e33d
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 2dd5234c094157bf77781b8646ac9ad114f819b0)

Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:44 -08:00
Carl Vanderlip
4b81d6106a video: msm: Dynamically toggle histogram interrupt
Make histogram enable/disable functions also enable/disable the histogram
"interrupt enabled" bit on the MDP enabled interrupts register.

CRs-Fixed: 398556
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Change-Id: I56f811e88cf3fd44ae0a2df8a6e5de32ba9a0c1c
(cherry picked from commit 1026832c51cbadeea9a717fa20fb42b6a7c5661f)

Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:40 -08:00
Carl Vanderlip
0e591b3ea5 video: msm: Move histogram disable to before panel off
Histogram expects the display to be on while running, thus moving its
disable call to before disabling the panel timing generator ensures this
assertion.

Change-Id: I308b3e0c24f0111fb8549d0a0ae025910d649b75
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_lcdc.c

Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-07 15:22:36 -08:00
Srinu Gorle
28dc3d59fc msm: vidc: Adds VUI timing info support for AVC encoding.
Poor video quality is observed as VUI fps information is not present in
the encoded bit stream. Add support for VUI timing info in video driver
and an additional V4L2 control to set from user space.

CRs-Fixed: 399017
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Conflicts:

	include/linux/videodev2.h

Change-Id: I970d4c479009da2d08531a9e9b8489a84cc5d44c
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:22:35 -08:00
Srinu Gorle
4e78af1c80 msm: vidc: Adds AU delimiter support for AVC.
Add new V4L2 control to set AU delimiter for AVC.

Change-Id: I8c72cb89f18c9b2b550b906d797eafb73ac4ebbe
CRs-Fixed: 389030
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:22:32 -08:00
Naseer Ahmed
22148a3b65 msm: display: non-blocking for overlay update
Display commit will work as overlay commit when
MDP_DISPLAY_COMMIT_OVERLAY flag is set. It will be
non-blocking if wait_for_finish is false.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Change-Id: Ibd143dbfcd2fdd7a8fab3038c5af4e2fbc9ea198
2013-03-07 15:22:30 -08:00
Kuogee Hsieh
6cb3e4fb50 msm_fb: dsiplay: fix frame buffer f_count leak
Frame buffer maintains a reference count (f_count) which increased
by fget() and decreased by fput(). overlay play will apply
fget() to frame buffer if it was the soruce buffer and fput()
will be applied to it after pipe commit done. However there has
extra fput() apply to frame buffer at the time pipe is freed.
This patch fix the problem by  clear MDP_MEMORY_ID_TYPE_FB from
pipe's flags to avoid extra fput() applying to frame buffer.

CRs-fixed: 411394
Change-Id: Ib2b72e6277480b5ace23cda554be485d9d477b3d
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:29 -08:00
Kuogee Hsieh
59db6aaad0 msm_fb: display: delete dsi clock control from cmdlist_commit
cmdlist_commit perform dsi clock control which turns off
dsi clock unexpectly when dsi controller is configured as
command mode during booting up. This cause display panel
can not be lit up. This patch drop clock control mechanism
from cmdlist_commit and move dsi clock control mechanism to
caller.

Change-Id: I1882ea3ee1c90ac5d76958c986740582929a5e3b
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:29 -08:00
Siddhartha Agrawal
a16456fc2b msm_fb: display: Send current timestamp in case of timeout
On timeout while waiting for the vsync, send the current
timestamp to the userspace. This resolves the infinite
wait seen during the bootup.

Change-Id: Ib1426c7c9a21c37758d7352740938627d4613fd6
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:29 -08:00
Mayank Chopra
facd0f5012 msm_fb: display: Create sysfs entries in mdp_probe for MDP3 targets
vsync sysfs entries should be created in mdp_probe instead of
creating in panel on. This avoids waiting for the first event
control in framework

Change-Id: I18b05b8d2a65d489afc6e3274ec8dc7a5b9a5f9a
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:28 -08:00
Mayank Chopra
346936bdf5 msm_fb: display: Create sysfs entries in mdp_probe for MDP4 targets
vsync sysfs entries should be created in mdp_probe instead of
creating in panel on. This avoids waiting for the first event
control in framework

Change-Id: I983731481ea89bb7666be5f2a9f75a1e04fd963f
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:28 -08:00
Siddhartha Agrawal
8148427eaf Revert "msm: mdp: Initialize vsync sysfs in probe"
This reverts commit 41db433cc845eb27bb765cc0cf599e872edd709f.
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Change-Id: Ie353ed5bc3dd8d23c428973aa260774c7cff0361
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:27 -08:00
Mayank Chopra
69d205069c msm_fb: display: Send vsync events using sysfs for MDP3 targets
Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature.

Change-Id: I22cfbd68c8bcbe4a47e94074393f1cbf79920c58
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp_dma.c

Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:26 -08:00
Pradeep Jilagam
eb35bd3bc5 msm_fb : Add timeout while waiting for vsync event
Avoid eternal wait for vsync event when client tries to
read the corresponding sysfs entry. This will avoid hangs when
client tries to read in corner cases where the Timing
Generator or the clock or IRQ gets disabled.

CRs-fixed: 406752
Change-Id: I773687220b868823a9e4bfdae74361ee6487c5c6
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:26 -08:00
Mayank Chopra
7fa332360f msm_fb: display: Make sysfs read request interruptible
Change blocking sysfs read request to be interruptible and protect
vsync timestamp value to prevent corruption.

Change-Id: I510d84134b0ab70d17729e8c53c91fa926035142
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_dsi_video.c

Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:26 -08:00
Padmanabhan Komanduru
46fd6a9478 msm_fb: Make Vsync IOCTL during disable sequence as NO WAIT
Change to make the vsync IOCTL no wait during the disable sequence.
This is to increase the performance. Handle the synchronization of
vsync interrupt using state variables in drivers from now.

Change-Id: Ia5ec14493f233a95f21d01ea627200a6c278239f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:25 -08:00
Padmanabhan Komanduru
a57b7f57a4 msm_fb: Handle vsync interrupt properly on MDP 3.03 targets
Handle enabling/disabling the vsync interrupt and mdp clock
enabling/disabling in a better way on MDP 3.03 targets. This
will avoid target crashes due to unclocked register access.

CRs-fixed: 388751
Change-Id: I5c4a409772464ce7d06869374dcba5ad7e335955
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:25 -08:00
Huaibin Yang
f72ca836e3 msm_fb: display: extend mutex protection for mdp pan display
When mdp commits a buffer to play, functions inside pan display, e.g.
mdp4_overlay_mdp_perf_upd are based on the current state of play, so
extending mutex to the scope of pan display to avoid race conditions.

Change-Id: I2e55567fd21de3738be066a2dee298d8122f12a3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:24 -08:00
Siddhartha Agrawal
5a0a4dcebf msm_fb: display: Removing extra disable irq in cmds_rx API's
Disable IRQ for DSI_CMD_TERM was already called in the isr.
Removing the extra call present in the cmds_rx API's.

Change-Id: I0000dd3166beb2a3b0c788327e1d7520e0c11a13
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:24 -08:00
Kuogee Hsieh
1dd0edc628 msm_fb: display: add wait4videodone for video mode
Add wait4videodone to commit dcs commands to dsi controller
while video engine is busy so that dcs commands will be
transmitted to panel at next beginning of BLLP.

Change-Id: I7ca40124813452f25a60f899437aeb9bce6feb14
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:23 -08:00
Kuogee Hsieh
1dae7817be msm_fb: display: return fail if pipe still staged
Pipe is not un-staged from mixer when it is unset.
It expects a pan_display() to un-stage it out of mixer.
Return fail at overlay_set() if pipe was still stage
at mixer.

CRs-fixed: 399193, 393979
Change-Id: I562f6e133bb239b30f4f53669dbf1cc5ddf80d02
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:23 -08:00
Kuogee Hsieh
4eab59af57 msm_fb: display: fix page fault during supend/resume
There has VG1 pipe commit (pan display) happen after system
suspended. This left VG1 still staged up at mdp mixer. Once timing
generator is enabled at resume, VG1 pipe start fetching contents from
address 0 since VG1 has not yet be configured. This cause page fault.
This patch has sanity check at system suspend to make sure no any pipe
stage up at mixer after suspend.

Change-Id: Idcf974ceb4afe2a3ec55b9603b700fa497f84045
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:23 -08:00
Huaibin Yang
5aac7da9b0 msm_fb: display: add mdp clk rate calculation for low vbp
For the panels that have low v_back_porch, if h/w FIR scaling is used,
during vbp time, mdp clk should be fast enough to output a line from 4
input lines. MDP rate equation for very small scaling, e.g. 1 or 2
pixels' upscaling or downscaling cannot cover this case, where
underruns are seen on those panels.

Change-Id: I4f35f98c2c1bc4ef04dfee193427bd3ff674945d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:22 -08:00
Pradeep Jilagam
5f6cce3acf msm_fb: display: Fix blend configuration for MDP4.1
MDP4.1 blend operation registers are not double buffered and
take effect as soon as they are configured. Configuring these
registers at any place other than between dma and vsync produce
flickers as new blend values would get applied to previous
mixer configurations. Configure blend operation registers just
after dma is over, before vsync.

Change-Id: I377c11222f7a0cd77e98e90edec6e2e1dc0c17ca
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:22 -08:00
Huaibin Yang
1a842e0ea7 msm_fb: display: add config of wb_mux_sel during update
To make sure for each writeback play the reg is configured and avoid
mdp hang.

Change-Id: I29bdc31f27accca84e7add126c1c1e3c8a78fa15
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 36ca4e992dc5c75a2dd709969db850aa02e7c6e7)
2013-03-07 15:22:13 -08:00
Huaibin Yang
86f43ec47d msm_fb: display: empty pending queue during suspend for wfd
Add the logic for wfd writeback interface. It already presents on
other display interfaces.

Change-Id: I389be77ec18041e260d0e71940586e86f1841ff8
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 3df55288659cfa826e9ad89cb38a8b722b2ae20f)
2013-03-07 15:22:12 -08:00
Kalyan Thota
531c753232 msm_fb: Wifi display changes for commit ioctl
This change handles panel updates for WFD panel via
overlay_commit interface, along with conglomeration of
some common code across pan_update and overlay_commit ioctls

Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/msm_fb.c
	include/linux/msm_mdp.h

Change-Id: I9e332856782c59ab598bb388a2ec482076746ad2
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:22:11 -08:00
Kuogee Hsieh
0cb749aee4 msm_fb: display: empty pending queue during suspend
Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.

Change-Id: Iafdf469c6cdbf5d469c9dee114555a8d1adb9c66
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:22:10 -08:00
Kuogee Hsieh
03528a7a6a msm_fb: display: wfd with vsync driven frame push
To improve performance, hardware vsync event at mdp driver
is passed to framework so that both composition and frame
update are aligned at vsync event. This patch will upgrade
wfd to incorporate vsync driven frame push in consistence
with other interfaces.

Change-Id: If088826ec387446301f1f6acc311d909edb04163
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit d74db5fcf24a223570137087aa5632593b315fcc)

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_overlay_writeback.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:22:10 -08:00
Rajeev Kulkarni
6fa6ec1564 msm: msm_bus: Add support for 64-bit bandwidth requests
With 8974, bandwidth requests are exceeding integer size.
Update ab and ib to ensure values over 4Gbps can be requested.
For 64-bit support, there are four changes in this patch:
Changes in the bus driver structures and functions to
update ab and ib values to uint64.
Updates in client drivers to ensure that the bus APIs
are called with the right types.
Updates to the device-tree. Device-tree nodes don't
provide a clean mechanism to read a combination of u32
and u64 variables within the same property name. So, the
ab and ib values must be specified in kbps instead of
bytes/sec from the device tree. The bus driver function
will convert the ab and ib values read from device-tree
to Mbps.
Change the existing property names to make them consistent
with the convention used by the new property  name, which
abides to the Device Tree convention.

Change-Id: Ib0a6db0e221af366c61c51cc21ac722f02cb7a34
CRs-Fixed: 408786
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:08 -08:00
Ken Zhang
e64f038561 msm_fb: display: mdp4 version assigned at board file
The mdp4 version reflects mdp's capability and is referred to at
many places. Currently, it is acquired by reading mdp version
register. Since the MDP version is defined in the board file,
this patch uses that version at probe time.

Change-Id: Iae2db1fb8609cb80f3705b5e47d3fefedc15fec5
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:40 -08:00
Naseer Ahmed
3cee1c824a msm_fb: display: add per stage alpha drop detection
Currently, alpha drop detection is done per frame which
means multiple blending stages share same alpha drop status
which does not reflect the alpha effect truly on each blending
stage. This patch enforces that the alpha drop detection
is done per blending stage so that alpha effect is applied
properly at each blending stage.

Change-Id: I2f456623c696192cf3388a635584a4a49d4720a0
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:39 -08:00
Naseer Ahmed
220607f0d6 msm_fb: display: remove background invert alpha option for alpha drop pipe
When the blended background pipe has dropped alpha and it is going to
be blended with foreground pipe on the next stage,
MDP4_BLEND_BG_ALPHA_FG_CONST is taken. Foreground alpha constant is
0xFF, so we need to use this alpha value to show background, instead
of its inverted value.

Change-Id: I9412141b28a46ed3b58079a56969e79dea4ed57c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:35 -08:00
Naseer Ahmed
c96cee414e msm_fb: display: Consolidate commit ioctls
Overlay commit and display commit were two separate
ioctls doing similar things. This change consolidates
the two into one display commit ioctl. With this, we
can use the RGB0 pipe with an IOMMU framebuffer.

Change-Id: I2b51e16a6678e6cec1bd3e56a00a476addb1296f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:33 -08:00
Naseer Ahmed
f65d4ebb64 msm_fb: display: do not use ION_IOMMU_UNMAP_DELAYED
Since iommu buffers will be unmapped after two newer commits
had passed, there is no need to request iommu driver to further
delay unmapping an iommu buffer.

Change-Id: I8cf8d406cf509908035d12c9a04f0add12f3c7c7
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:33 -08:00
Naseer Ahmed
3b9db53973 msm_fb: display: add fput_light to frame buffer
Frame buffer's (fb0) ref_count's need to be balanced. overlay_play()
increases fb0's ref_count (fget_light). This patch will decrease fb0's
ref_count by calling fput_light after commit.

Change-Id: I352da1fce99b344c059f615a6fe88cc6e7387d89
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-07 15:21:32 -08:00
Devin Kim
014c77fcd6 msm: display: check get_unused_fd_flags return val
Not checking the error code, which might be negative, will cause us to wrongly
reference fdt[fd] by using the error code, causing kernel panic in fd_install.

Change-Id: I1f8e68e74bdbdd5b81bc3450f7d93b5cd96c9439
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:30 -08:00
Ken Zhang
4a0aea3355 msm: display: Increase timeout value for fence waiting
In some benchmark use case, graphic engine is extremely
busy, need increase the fence waiting timeout value.

Change-Id: I3c483f98fa86030b283edd8a79e7b70fa1c06335
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:30 -08:00
Naseer Ahmed
cd83ee23ff msm_fb: display: Enable scaling bit while setting x-flip bit
To enable left-right flip x-scaling bit should be set for
MDP 4.2 and above versions. This fixes the issue when RGB layer
pipes are not properly rotated.

Change-Id: I0afae4aecde39ce3ac4dcbefc0bda93510e7d18a
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-07 15:21:29 -08:00
Aravind Venkateswaran
9d1ee25eef msm_fb: HDMI: Turn on HDMI core only for supported resolution
Upon receiving the notification of an HDMI cable connection,
turn on HDMI core only if the default video resolution is
supported by the sink. Otherwise, HDMI core would be turned
on at a later time when it is configured with a supported
resolution by the userspace.

CRs-Fixed: 412575
Change-Id: I67cfb09bafa39646839877a66cd94f193c127a76
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:30 -08:00
Aravind Venkateswaran
81207ff864 msm_fb: HDMI: Cleanup of HDMI switch device notifications
HDMI switch device is used to notify userspace components of the
availabilty of a connected HDMI sink. These notification should
only be sent whenever HDMI cable is connected or disconnected.
This patch removes all the redundant notifications.

CRs-Fixed: 412575
Change-Id: Ia5e60690a87569fce5d61a9af75d446648443e9b
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:29 -08:00
Aravind Venkateswaran
ab5ec0efef msm_fb: HDMI: Add support for HDMI audio switch device node
Add support for audio switch node in the HDMI driver that would
be used to notify audio userspace components of the availability
of an HDMI device.

CRs-Fixed: 412575
Change-Id: Idc41caf234810db52af9fcc89d2ed4ecbcaafc3b
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:29 -08:00
Aravind Venkateswaran
5b6ade566d msm_fb: HDMI: Cleanup HDMI audio off sequence
HDMI core should not be powered down until the audio engine has
shutdown transmitting packets to the HDMI core. This change
increases the time for which the driver waits for the audio
engine to turn off.

CRs-Fixed: 412575
Change-Id: Ie11ab6c8140f7289f74da4877c9acf9b8cd4a838
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:28 -08:00
Aravind Venkateswaran
9f868bc20f msm_fb: dtv: Serve device off in a separate thread
DTV device should not be powered down until the audio engine has
shutdown. This change moves dtv audio off sequence to a separate
thread so that framebuffer close system call does not get blocked.

CRs-Fixed: 412575
Change-Id: I246a9e58f1367e653913773696510f375abf3d3a
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:28 -08:00
Aravind Venkateswaran
bd560c99b7 msm_fb: HDMI: Cleanup HPD software debouncing logic
Implement Hot Plug Detect (HPD) software debouncing by
disabling the HPD interrupt until we finish processing
a previous HPD interrupt.

CRs-Fixed: 412575
Change-Id: Ia2c83f3446d09fe5bf6c6a1c4e6a9eb54ff465d6
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:28 -08:00
Ajay Singh Parmar
141ca94fff msm_fb: hdmi: black out pipes on unset
For HDMI as primary case, we need to blackout the pipes
when they are unset so that any residue is not visible
on the DTV during suspend.

Change-Id: I2bf36f1002dd185c26fe6c4291977737daa73ae1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:24 -08:00
Ajay Singh Parmar
d154a36b2a msm_fb: hdmi: Proper update of ACR CTRL Register
While changing the audio sampling rate, the older data in
the control register needs to cleaned before writing in
new data to avoid mixed or wrong data writing.

CRs-Fixed: 405772
Change-Id: I95d0807ea8cf544e4a0c8caed00de6cd60352efa
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:23 -08:00
Aravind Venkateswaran
133aa15090 msm_fb: HDMI: Remove HDCP Kernelconfig
Remove the kernel config parameter for HDCP since enabling or
disabling HDCP will now be controlled using a corresponding
module parameter.

Change-Id: Iae23b8fa66ca75d99423547e77f850f3c86615ee
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:22 -08:00
Aravind Venkateswaran
ef2a73fc6d msm_fb: HDMI: Driver changes to support HDCP module parameter
This change removes the need to use HDCP feature flags in the
HDMI driver and adds the necessary support to configure HDCP
feature based on a module parameter.

Change-Id: Ie0eacc5b447230927cfdedfcb979c22d60e81981
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:22 -08:00
Aravind Venkateswaran
7244a2bd88 msm_fb: HDMI: Add module parameter to disable HDCP
This change adds a module parameter that can be used
to disable HDCP at runtime by specifying hdmi_msm.hdcp=0
on the fastboot command line.

Change-Id: Ifad5da9fcb86fb4ed663a5ef2bb14fe4dafd241e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:21 -08:00
Ajay Singh Parmar
f449d06093 msm_fb: hdmi: Soft debouncing logic improvements
Currently, HPD(Hot Plug Detection, a module used for detecting
HDMI cable connection) soft debouncing logic implements around
1 sec mechanism to stabilize HPD event detection. In case of
fast HPD connect/disconnect, it is missing a real HPD event.
This change implements a new debouncing logic in driver which
will make sure the first real HPD event is correctly processed
and at the end of debouncing processing, if there is a change
in HPD state, the changed state is also processed. This way we
always process the change of HPD states.

CRs-Fixed: 384513
Change-Id: I02d9814e4a55b7eec11a8e0d134c9ed9b5747422
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:21 -08:00
Ajay Singh Parmar
ee960525dd msm_fb: hdmi: Correct checksum value
This change writes the checksum value to registers after
doing all the calculations so that the correct checksum
value is transmitted.

CRs-Fixed: 388272
Change-Id: Ia0543e458d5a11b148bd29e0d57ae355a051b2a9
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:21 -08:00
Aravind Venkateswaran
244d8bbda6 Revert "msm_fb: HDMI: Add support for hdmi_audio switch node"
This reverts commit 99001c9c4fd2239a2af633471ef78eb8d569e60f.

Change-Id: Id7532ba0b3141f7495a2742f747ce3f7e3f88c91
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-07 15:20:20 -08:00
Kuogee Hsieh
3288119c79 msm_fb: display: force mdp clock off at suspend
At suspend, turn off mdp related clocks off if clocks
are not turned off by vsync disable request.

Change-Id: I0949b00b9ee0aee05b9b553ac7318b647052d94d
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 780557dc178fc5511f4c03b4840791d27499a5f6)
2013-03-07 15:20:10 -08:00
Kuogee Hsieh
fc72ce5619 msm_fb: display: fix dsi_busy_wait race condition
After pipe_commit() released mutex and before kickoff happens,
There has possibility that dcs command may start transmitted.
This patch add dsi_mdp_busy flag to fix this race condition.

Change-Id: I0d9a81cd0719085c91c03386117261ad3bb6b182
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit c9427ced2ab4cf1094b61360a476305066044a54)
2013-03-07 15:20:09 -08:00
Kuogee Hsieh
d821dcad2c msm_fb: display: add video mode dcs cmdlist support
Add video mode dcs command list support. This patch
make sure dcs commands committed while dsi video engine
is busy so that dcs command will be transmitted at beginning
of next BLLP.

Change-Id: I11b0214ee10f3b1ef33b1da4c8e577800068cb06
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 7b0e0a45216714d76bf717a928a0db77bfa2868a)
2013-03-07 15:20:09 -08:00