Commit graph

5016 commits

Author SHA1 Message Date
Kuogee Hsieh
d295b07b2e msm_fb: display: clean pipes from commit queue at suspend
There has possibility that pipes pending at queue and suspend
comes without commit executed. At resume, pipes pending at queue
will be committed with new pipes just added which may cause iommu
page fault due to pipes may had been move to other mixer. This
patch remove pipes from pending queue at suspend.

CRs-fixed: 440254
Change-Id: If6a142d4c55453c0ceacc677399f58570abe47b8
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:07:32 -07:00
Ajay Singh Parmar
9f0891b319 msm_fb: hdmi: Support for 1280x1024@60Hz resolution
This change provides the support for VESA resolution for
monitors, 1280x1024@60Hz with pixel clock of 108MHz.

CRs-Fixed: 438028
Change-Id: I059cd379d4da62f4e5b72be1152dd2fe26d611f1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:07:32 -07:00
Ajay Singh Parmar
a71d78809e msm_fb: hdmi: hdmi 3d length check
This change fixes a case where the length of 3d data is not
properly used which could have resulted in wrong 3d data parsing.

CRs-Fixed: 445505
Change-Id: Id285204bdb8c2d881becaa5b07b973eba4240d93
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:07:31 -07:00
Ajay Singh Parmar
4e751bf012 msm_fb: hdmi: Do not turn on HDMI if not ready
At bootup, if HPD is not configured, HDMI is not in
the state of getting turned on. This change makes sure
HDMI is not turned on/off unnecessarily which turns on
clocks as well.

CRs-Fixed: 447511
Change-Id: I074d9c463943770775b060c4a93b9120dfe9bcf0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:07:30 -07:00
Ajay Singh Parmar
e9f3e0c072 msm_fb: hdmi: update data on resolution change
On changing resolution, all information related to display
needs to be updated which helps in calculating the right mdp
clock for each resolution.

CRs-Fixed: 436151
Change-Id: I1ab6e5859491936a7fa8c62247da9ef5a0ff45ef
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:07:30 -07:00
Pradeep Jilagam
eb93a60c33 msm_fb: display: Copy splash image to kernel memory
The bootloader memory from which the splashscreen is shown
gets reclaimed before frame update happens from framework.
Hence, copy the splash image to a local buffer as soon as
display is initialized. This will ensure proper continuous
splashscreen functionality.

CRs-Fixed: 378721
Change-Id: I55a7b97eeced56d2f108d34998d58966610c4305
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>

Conflicts:

	drivers/video/msm/msm_fb.h

Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
2013-03-15 17:07:29 -07:00
Deva Ramasubramanian
e484b03838 msm: mdp: Move wfd state signalling into mdp driver
Previously the WFD driver was reponsible for signalling the
online/offline events to userspace listeners.  This led to redundant
notifications due to the manner in which the WFD driver is used. The
signalling is better purposed when done from MDP driver.

Change-Id: I2248de84d57504c2fa9f26e1bfdf0e0d4a02257a
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2013-03-15 17:07:22 -07:00
Deepak Verma
05f4523804 msm: vidc: Add a check for separate metadata buffers
Added a check for separate metadata buffers based on
the board specific platform data.

Change-Id: I24d51329d93215da75d115ccfa8fc1f3fe260b7f
Signed-off-by: Deepak Verma <dverma@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c

Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-03-15 17:07:16 -07:00
Maheshwar Ajja
e576eb26d8 Vidc: Treat Non-IDR frame type error as bit stream error
Hardware error is being generated from driver when video
core returns NON IDR frame type error during thumbnail
decoding. This change handles this error by treating
it as BIT_STREAM_ERR.

Change-Id: I16a19eea679d42a22b336d6ebbd0bd1f57c0a8a4
CRs-fixed: 414858
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-15 17:07:08 -07:00
Maheshwar Ajja
3ae57f76cd msm: vidc: Correct the display size of small resolution clips
We change the frame height in the decoder to MDP_MIN_TILE_HEIGHT
for the videos with frame height less than 96. Due to which these
videos were not being displayed properly. This change fixes the
display change.

Change-Id: I7acc74742a8cfbdfc79b02bd20bb9109f4389fa2
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-15 17:07:08 -07:00
Huaibin Yang
f291a52af4 msm_fb: display: restore previous mdp bandwidth when resume
mdp resume bandwidth is set to the value when device was suspend, so
that the correct init value is set to avoid underrun.

CRs-fixed: 425823
Change-Id: Ie9b832f0eb5b5e1b6cb5e8979626986d896d340b
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-15 17:06:50 -07:00
Huaibin Yang
f53299b815 msm_fb: display: adjust refx100 parameter to avoid tearing
refx100 is used to calculate how many mdp_vsync clocks to complete one
line in the panel. This info is used by mdp h/w to sync data transfer
between mdp h/w and command mode panel to avoid tearing.

CRs-fixed: 379223
Change-Id: I3880a350b77cb8165745ea343b1525e84100a62d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-15 17:06:48 -07:00
Aravind Venkateswaran
06bf8e423f msm_fb: HDMI: Reset HDCP reauth flag when powering off
The software flag used for storing the HDCP reauthentication state
needs to be reset whenever the HDMI device is powered off. This is
needed to avoid a potential reauthentication attempt upon a
subsequent connection which could lead to device hang as a result
of incorrect sequence of register accesses.

CRs-Fixed: 444312
Change-Id: I6b5b08394dd96ccbc08c4ca72b6dc4b2c4dbf6be
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-15 17:06:36 -07:00
Kuogee Hsieh
3a2cf75d6a 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>
2013-03-15 17:06:35 -07:00
Kuogee Hsieh
b6b3f16609 msm_fb: display: add mdp clock control to histogram enable/disable
Add mdp clock control to histogram enable and disable block to
prevent system from crashing when accessing register with mdp
clocks off.

Change-Id: Ide808b332b5456f3fc639fcbb0d03d5cad0e387f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:06:33 -07:00
Kuogee Hsieh
82caf103f7 msm_fb: display: keep borderfill pipe's iommu info
Keep borderfill pipe's iommu info during base layer pipe
swap with original base layer pipe. Otherwise, borderfill
pipe's may contain original base layer pipe's iommu info
which cause iommu page fault due to same iommu buffer is
unmapped two times.

CRs-fixed: 436711
Change-Id: Ibdb792055287283c4449db07c2de2901aa4fe9b6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:06:29 -07:00
Ajay Singh Parmar
51f1cc907f msm_fb: hdmi: HDMI suspend resume event handling
This change makes sure that we do the proper HDMI ON settings at resume
and also send the events to user-space about current status of HPD after
resume.

CRs-Fixed: 422372
Change-Id: I8ca79fd07840b3227c9472588853b0ca2749760b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:06:23 -07:00
Rajeshwar Kurapaty
43fb8e6e05 msm: vidc: Fix various NULL pointer accesses, memory leaks.
This commit fixes various NULL pointer and memory leak bugs.

Change-Id: I3b3ac40b5e440b9665858913921a06de14741b6f
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
2013-03-15 17:05:45 -07:00
Mayank Chopra
5e8146b46b msm: display: Fix blend configuration for video layer with MDP composition
With video layer in MDP composition, there is no need to apply destination
over blend rule, as z-order of layers take care of proper staging of layers
by default. Apply constant blend to the video layer when in MDP composition

CRs-fixed: 437965
Change-Id: I7476659f12cdf06018bf6ace829a836c86ae97e8
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2013-03-15 17:05:44 -07:00
Kalyan Thota
bad23eecf7 msm_fb: Check for panel power on after Unblank.
In Overlay_play , panel power on check was at wrong place
it has to be after Unblank.

Change-Id: If910f83ef57499b5f771bc7d3d1bdfa814d5c019
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
2013-03-15 17:05:40 -07:00
Deepak Verma
f84beb65e4 msm: vidc: Separate meta buffers support in secure mode
Extradata is appended at the end of each output buffer
in non secure video use case but in secure video playback,
the client/CPU don't have access to the output buffer
to parse the extradata. This change allows the client/CPU
to parse the extradata by allocating separate buffers for
video hardware to store extradata.

Change-Id: I12927ea3d142b9cecd6fb1ae1086c5624d0e08d6
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-03-15 17:05:26 -07:00
Kuogee Hsieh
9d9981459a msm_fb: display: wait4vsync after timing generator is turned off
When continuous splash is enabled, timing generator is enabled at
bootloader, it then needs to be turned off at mdp4_dsi_video_on()
to switch displayed content from frame buffer. wait4vsync after
timing generator is turned off is necessary to make sure DMAP has
finished fetching splash logo from original splash buffer. Otherwise,
DMAP iommu page fault may happen.

Change-Id: I35f9fb9da76f93b60d4719d147aea3246c770c9f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:05:21 -07:00
Ken Zhang
efccfbd400 msm: display: increase fence timeout
Increase timeout value to 900ms to allow
gfx engine to render longer.
When sync_fence_wait fails, need not put fence as
it will be handled outside the loop.

Change-Id: Id4caff55c9f99c48e5f87a85d30fe4c8c0cd65e7
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-15 17:05:19 -07:00
Huaibin Yang
2764083d28 msm_fb: display: fix division-by-zero bug
Panel v_back_porch could be zero for virtual panels, so the check for
zero is added to fix the bug.

Change-Id: I6a29f3d8d771092bca2374cc9a1c11dd77ad569e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-15 17:05:18 -07:00
Huaibin Yang
4b11a6f021 msm_fb: display: add wfd suspend/resume to early suspend
wfd on/off was handled by fb_on/fb_close which are called from video
or userspace side. However, this is not the case for this branch. mdp
driver has to register wfd for suspend to make sure proper panel
on/off happen.

Change-Id: If1836598e5ae95e4b2b72e40dc85784a0d20c843
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-15 17:05:17 -07:00
Rajeshwar Kurapaty
d204ac68eb msm:vidc: Add support for MP2 sequence end code
ISDB-T client requires end of sequence notification
in the flags of the output buffer when sequence end
code is queued to the video core. Add support by reading
from video core shared memory and update the output buffer
flags for MPEG-2 codec.

Change-Id: Idd88fc6a5cdccb41fa61ba902a0014ec8359739a
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
2013-03-07 15:25:38 -08:00
Mayank Goyal
086318c02f 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>
2013-03-07 15:25:38 -08:00
Siddhartha Agrawal
d1b5a4f214 Revert "msm_fb: display: blt always enabled for 720p,1080p, secure buf"
This reverts commit ed3b07946fedf0b8736f737a2f14b1c2f6ef8b8e.

Change-Id: I34d5df0cc2bc744944f4c324a8f1e588c32a5478
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:25:35 -08:00
Ken Zhang
4205393e46 msm: display: maintain smmu for secure video
Currently video maps and unmaps the secure memory.
It could be too early to unmap it.
Rotator and MDP will maintain this, only unmap it when
no more needed. Memory managr has a refence count for it.

Change-Id: I5ca7cb09c0ad4b9e39808e937c2f50264727730c
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-07 15:25:35 -08:00
Siddhartha Agrawal
dc9efbd9ff msm_fb:display: correct bus bw for downscale case
The check condition for updating bus bandwidth if downscaling is
needed was always FALSE.

Change-Id: Iec0a4d13c7737d86976d76e0dfd3ec45062799fd
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:25:34 -08:00
Huaibin Yang
7f3c6fd853 msm_fb: display: add setting gpio-controlled backlight logic
For the panels which backlight is controlled by gpio, add this logic
in driver to turn on/off backlight, instead of calling board panel
on/off functions, to avoid garbage display due to early backlight
turn-on.

(cherry picked from commit 3eebb2e33570e32d11a757e493e12a8e79e08d6f)

CRs-fixed: 408728
Change-Id: I6f1b9bd78d96dbf1492e854edd59b05f8dec205f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:25:33 -08:00
Kuogee Hsieh
56a49ded66 msm_fb: display: replace msleep with wait4vsync
vsync is controlled by frame work which means vsync irq
off may happen at any instance. This patch use a reference
count to control vsync irq enable/disable so that
wait4vsync can replace msleep safely during suspend.

Change-Id: Ief84b1b421436e1f750288eb9a9760a9cb96c555
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-07 15:25:32 -08:00
Huaibin Yang
a2781e468c msm_fb: display: get mipi frame rate from panel file
If frame rate value for mipi video panel is coded in panel file it can
be directly used to avoid calculation error.

Change-Id: I6ad86226c81da4bcf36196385f9ff4bea0bef0ca
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:25:31 -08:00
Kuogee Hsieh
bb4349c7ad msm_fb: display: turn mdp clock on at pipe_commit
mdp clock is controlled by frame work. There has
possibility that mdp clock had been turned off while
frame update still happen. In this case update
thread may stuck at wait4vsync since there has no
mdp clcok to trigger vsync interrupt. This patch
will enable mdp clock at pipe commit when mdp clock
is tunred off so that frame update can be completed.

Change-Id: I2d31b9a4b6f0cb9dd36516a80931988e23e8a545
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-07 15:25:30 -08:00
Kuogee Hsieh
96b4fb6c75 msm_fb: display: add mdp new update method
Enable new mdp update method which requires flush bit
to be set before updating mixer cfg register for both
smart and dump panel

Change-Id: I97b9d221da574a96707748ec83dd1acff6dcb654
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-07 15:25:29 -08:00
Deepak Verma
371c5cc4db msm:vidc: Initialize meta buffer header during secure session
Meta buffer header initialization is required if we process
extradata in secure playback.

Change-Id: Ic8a068e99351f2c970643200d03b1a580ead7480
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-03-07 15:25:17 -08:00
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