Commit graph

4899 commits

Author SHA1 Message Date
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