Commit graph

424 commits

Author SHA1 Message Date
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
Kuogee Hsieh
e8a7ba4811 msm_fb: display: add sysfs and clock control to smart panel
Both vsync enabled and disabled are controlled by framework
through ioctl. Driver reports vsync event to framework via
sysfs. Meanwhile, mdp related clocks are enabled by frame
work at vsync enabled request and disabled by driver if there
is no any display update within specifid vsync period.

Change-Id: Ice5be3a6db5930b95bdd2f718d9256bf73936e23
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 3c406e4eec79b710b7f5b5b67c23db7af871be40)
2013-03-07 15:20:09 -08:00
Carl Vanderlip
9bca4ef76a video: msm_fb: Ensure backlight is scaled atomically.
Ensure that when backlight scaling ratio or backlight level is being
changed that the operation execute atomically. This prevents a backlight
level change from being overwritten when it interrupts a backlight scale
update.

CRs-Fixed: 404017
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit ce328861aa1f4fa489e9abfc9d1e02b13af2ba47)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
(cherry picked from commit 0584596f75f8f2b184b8be1a0479ee61e449acba)

Change-Id: Ifb4bd5e823815b51dae38f1b8647b80d21b8ee45
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:21 -08:00
Deepak Verma
865de5b4af msm:vdec: Correct filled length of the output buffer
Filled length of the output buffer at FBD for videos
with frame height less than 96 was incorrect. With
this change, we get the proper filled length.

CRs-fixed: 395179

Signed-off-by: Deepak Verma <dverma@codeaurora.org>
(cherry picked from commit f01274b904a4899b13c64f35f2479a1080bfb2c4)

Change-Id: I88fdf915647d8a2123175599931fbdd4b7d1ddf0
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:58 -08:00
Gopikrishnaiah Anandan
f49d4d7f53 vidc: Free client context in error cases
Video driver should free client context when an error
is encoutered.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit 9683019e54e8a8c38b6019b781a9cbdf41b84b29)

Change-Id: I9868afadb01cc63df8e09426a8dd112b08f2bd4e
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:22 -08:00
Arun Menon
0b99d715f7 msm: vidc: error handling for ion_map_iommu calls.
Added a check for non-zero virtual address.
Without this change, when ion_map_iommu returns a
zero virtual address, video core continuous ahead
without error check and later target reset happens
when trying to do a ion_unmap_iommu on the above fd,
which was never mapped.

Signed-off-by: Arun Menon <menon@codeaurora.org>
(cherry picked from commit 8688368ce3afbd1f3a80c7fa688c6a2f467247d3)

Change-Id: Ic6d86cc621e2f524dd19d1677646822cdc0f317c
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:22 -08:00
Gopikrishnaiah Anandan
008f1e84da vidc: Handle EOS with Codec config buffer.
Change will handle codec config buffer with EOS.
Video driver will make sure that the codec config buffer with
EOS will be requeued in case of reconfig and non-reconfig paths.

CRs-fixed: 399347
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit 43b203869814fe5f0ddcb265a8f859aebdaa652f)

Change-Id: Ib9a41fb842d2295804db86b2e03a62238c29984d
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:46 -08:00
Arun Menon
328c0a86e3 msm: vidc: enable video core clock to 266Mhz
This change will ensure that video core clock is
set to 266Mhz on supported devices, else fallback
to 228Mhz.

Signed-off-by: Arun Menon <menon@codeaurora.org>
(cherry picked from commit 2cd6f1a77d845c162966b974b0e9dd4db0878020)

Change-Id: Ie9d28b218150f2e21fa95c4d4346251ddab3ee50
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:45 -08:00
Shobhit Pandey
326157392f msm:vidc: Add the support for MPEG-2 extension and user data
Support is added for MPEG-2 extension and user data. With this
changes Core returns extension and user data as an extradata.

Change-Id: I66a230aa651dabafa883625ce9f687d5c35b8671
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:44 -08:00
Maheshwar Ajja
01ec926a68 vidc: 1080p: Copy input frame tag to the output frame tag
In slice delivery mode, sometimes video hardware is giving
zero frame tag on output slices instead of input frame tag
value. This commit will fix the issue by copying the input
frame tag value to the output slice frame tag when video
hardware gives zero frame tag values.

Change-Id: Icc75ca72375c4445ff9becaea45b43c03a6ddc17
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:43 -08:00
Maheshwar Ajja
fc8e2371a4 msm:vidc: add support for pause in eos state
This commit will add support for pause command in
eos state along with run state of the video driver.

Change-Id: I7edd064bb68845f63f0a085165e99f60ed0f3bfe
CRs-fixed: 387562
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:43 -08:00
Maheshwar Ajja
3b6e9b2b35 vidc: fix wrong number of slices in slice delivery mode
The slices completed is not matching with the expected number
of slices in frame done. The fix is available in July firmware
release and this commit will have the corresponding video driver
changes.

Change-Id: Ic0c3c7ce4f9fdbcd6e8bed852a93dcc533d83a02
CRs-fixed: 380629
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:42 -08:00
Arun Menon
087c528ff5 msm: vidc: suppress non-fatal error messages.
These messages are non-fatal and appear frequently
during video session. Hence suppressing them.

Change-Id: I539bc966bd79b4074c82a432ba7eb3fd2746bf54
CRs-Fixed: 389408
Signed-off-by: Arun Menon <menon@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:42 -08:00
Shobhit Pandey
7746f06a7a msm:vidc: Add temporary buffer for MPEG-2 extension and user data.
Support is added to enable temporary buffer for processing
the MPEG-2 extension and user data for the first sequence
done.

Change-Id: Ib7fdc8bfd50bfb0da651e8da6fca26a3542c671e
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:42 -08:00
Mitchel Humpherys
19ce209f2d msm: vidc: include msm-specific ion header
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>

Change-Id: I521a079686780c117ccc9d91f27b9c59aaeafa04
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:41 -08:00
Maheshwar Ajja
c2f931c52e vidc: 1080p: IDR picture type support for H264 format
Read IDR picture type from 1080p core register set
and propagate it to user space using IDR frame type
enumeration in api header file. The IDR frame type
info is used in SYNCFRAME logic for H264 format in
userspace.

Change-Id: I6f87aea9f3c6e26b06effe68f7cb5a6c17d4bb1c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:41 -08:00
Srinu Gorle
96ae73bff0 msm: vidc: Enable turbo mode based on client request.
- video core is bumped up to turbo mode, if more performance
  level required from multiple clients.

- Enable turbo mode atleast one of client set turbo mode.

Change-Id: Ied777463fdfe54ea6ff3b2a29cbaf0d27a9586cb
CRs-Fixed: 385454
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:17:40 -08:00
Naseer Ahmed
d49be7e3d4 msm_fb: display: fix dsi controller hang up during blt enable/disable
Wait for 2 ms to make sure both dsi lanes are in stop state and
fifo are empty before reseting dsi controller.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-04 12:48:12 -08:00
Jeff Brown
93d182f55a mako: backlight: use linear brightness ramp 2013-03-04 12:48:09 -08:00
Naseer Ahmed
254ea5d54d msm: mdp: Set clock rates on external interface as needed
This allows the clock on the external to go to maximum

Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-04 12:47:58 -08:00
Iliyan Malchev
32115585ca Revert "Revert "mako: display: change color value to displayed in case of underflow""
This reverts commit ab22e7d8068b973ad4f9a547fdf4cfc1bfdb29b9.
2013-03-04 12:47:57 -08:00
Naseer Ahmed
627979d3d8 msm: display: add delay after taking out the base layer.
During the blank sequence, base layer will be removed if mfd
reference count is 0. Need to add some delay to make sure it
takes effect before turning off panel.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-04 12:47:56 -08:00
Naseer Ahmed
5cb75f672e msm_fb: display: Fix flickering when BLT is enabled/disabled
The transition of BLT enable and disable start at the beginning
of vsync. This ensures that the transition is completed within the
same vsync period. We Wait for DMA-P done after turning off the
timing generator and do not prefill the frame.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-04 12:47:54 -08:00
Naseer Ahmed
810e0ef6ed msm_fb: HDMI: Add support for hdmi_audio switch node
- Add switch device node for hdmi audio on initialization.
- Final node path will be /devices/virtual/switch/hdmi_audio
- Set the node state to 1 when the HDMI EDID for the sink
  supports audio
- Set the node state to 0 otherwise(DVI)

Signed-off-by: Arun Kumar K.R <akumarkr@codeaurora.org>
2013-03-04 12:47:50 -08:00
Naseer Ahmed
ca3342169d msm: mdp: Initialize vsync sysfs in probe
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:47:45 -08:00
Naseer Ahmed
c6128ebec5 msm: display: display idle checking update
msm_fb_blank_sub might be called for UNBLANK from
display update work queue, which is at commit state.
Idle detection is invalid in this situation
Add detection for external snd earlyuspend/resume interface.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-04 12:47:27 -08:00
Naseer Ahmed
e486051c01 msm_fb: display: blt always enabled for 720p,1080p, secure buf
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-04 12:47:26 -08:00
Naseer Ahmed
ffde53dc8f msm_fb: display: add options to switch blt mode for dsi video
Currently switching mdp blt mode is done in dmap done isr which could
cause mdp hang for some panels/targets. One option is added: turning
off timing generator when switching blt mode, to avoid hang issues.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-04 12:47:26 -08:00
Naseer Ahmed
ca82d7b7cd msm: mdp: Remove mixer1 blt for external
BLT mode is not needed for external displays since
there is no extra downscaling needed for videos.
2013-03-04 12:47:25 -08:00
Naseer Ahmed
c2975c4ed3 msm: display: add more checking to ensure display is idle
Before execute operation on display, make sure it is complete idle
Because non-blocking display update has been introduced, need make sure
display update has finished in all entrances except the ones for
initialization.

Change-Id: I0660080262b7e5895f5f558c0a9f71aa84b9aa99
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:47:16 -08:00
Naseer Ahmed
8bc7f7dfd6 msm: mdp: Fix clocks
The max supported clock was wrong
2013-03-04 12:47:14 -08:00
Ajay Dudani
b6c60c851b msm: vidc: fix buffer pool index
While searching for the available buffer entry in the buffer pool the search
should begin from index 1 as zeroth entry is reserved.

Change-Id: I051b0232bb782f073ba9ad0b757a799703814df3
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:47:10 -08:00
choongryeol.lee
36faabbf48 mako: display: reduce mipi line clock per LGSI spec
Mako's MIPI line clock is a little bit higher than LGSI's recommendation.  Due
to this higher clock, flickering could happen in some panels.  This patch
reduces the MIPI line clock as LGSI's recommendation.

This also reduces current consumption by ~10mA when the LCD is on.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:47:07 -08:00
Naseer Ahmed
eae171b96b msm: display: Do not create release fence in suspend
When in suspend state, display operation will be stopped,
fence will not be signaled

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-04 12:47:04 -08:00
Naseer Ahmed
590f819b66 msm: display: panel recovering from suspend
In suspend state, fb_open cannot turn on panel, need save this info
for resume.
In suspend state, blank setting needs be cached to be used at resuming.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-04 12:47:03 -08:00
Naseer Ahmed
4c1b041757 msm: display: allow fb open even in suspend state
resume might be coming later, allow fb open sucessfully, only
panel driver needs be delayed

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-04 12:47:03 -08:00
Saurabh Shah
4c241bf133 msm: display: Allow MDP clocks to use Max clock.
Allowing the MDP clock to use its Max clock in order to avoid the blt
mode switch issues for both MDP mixers, as blt mode switch resulting
in HW hung

Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
2013-03-04 12:47:02 -08:00
Naseer Ahmed
6c9ad4d7e6 msm: fb: make the pan task interruptible 2013-03-04 12:46:58 -08:00
Deva Ramasubramanian
299732780b vidc: handle secure and non-secure session concurrency
Non-secure session should be rejected if a secure session is
running.

Change-Id: I13364a7bc4417a682728be333681278e7de8a1f7
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-03-04 12:46:58 -08:00
Naseer Ahmed
6c79a98a56 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.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:57 -08:00
Saurabh Shah
001200a326 msm_fb: HDMI: HDCP: Start HDCP authentication as a work item
HDCP authentication should be kicked off as a scheduled work
item so as to ensure that MDP is already configured and frames
are being transmitted over the HDMI channel prior to the start
of the HDCP authentication procedure.

Change-Id: I27cab44babfc24d91a318b0641674f85910cc33f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
2013-03-04 12:46:57 -08:00
Naseer Ahmed
8f8c3d414d msm: mdp: vsync sysfs bug
Make the read interruptible

Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:55 -08:00
Naseer Ahmed
c5ab413277 mdp: Do not start LUT for overlay0
The post processing daemon is not used currently.
Enabling the LUT without using it can potentially
cause display hangs.
2013-03-04 12:46:54 -08:00
Naseer Ahmed
8b804aaf0b msm: display: buf sync enhancement
Support waiting for acquire fences in the buffer sync ioctl.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:51 -08:00
Naseer Ahmed
504021da52 msm: display: add display commit ioctl
Display commit ioctl will do what pan_display
can do, addtionally has customized setting, such
as non-blocking call.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:50 -08:00
Naseer Ahmed
c2f0fb04a0 msm: display: make pan display as a non-blocking call
Schedule a workqueue, do the current job in the workqueue handler.
Block the second entry if the first one has not finished

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

Conflicts:

	drivers/video/msm/msm_fb.c

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:49 -08:00
Naseer Ahmed
e0501cd8dd msm: display: add sync point support in overlay commit
Wait for fence signaled before commit, signal previous
fence after commit done. Same as pan display

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:49 -08:00
Naseer Ahmed
7bf0610f43 msm_fb: display: Send vsync events using sysfs for MDP4 targets
Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature. Also, for smart panel, wait4vsync is removed.

Change-Id: I5219e85b837b8bab9d00a9f40c1048d2a2355194
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:48 -08:00
Naseer Ahmed
55a848bcdb msm_fb: display: add support of mdp clocks controlled by vsync
Mdp related clocks are controlled through vsync enable/disable
ioctl from userspace frame work.

Crs-fixed: 384482
Change-Id: I5999ad17955e0f862f64036a6390016ff3a6782f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:48 -08:00
Naseer Ahmed
5e6d6c1c23 msm_fb: display: add dcs command list for dsi command mode
DSI dcs commands and mdp pixel stream share same dsi link.
Add dcs command list to serialize sending dcs command and mdp
pixel stream to avoid contention which may cause dsi controller
to stall.

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

Conflicts:

	drivers/video/msm/mdp4.h

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:47 -08:00
Naseer Ahmed
f212305887 msm: mdp: Release all fences on blank
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:45 -08:00
Iliyan Malchev
0d312d6ec3 Revert "mako: display: change color value to displayed in case of underflow"
Reverting this change allows display underflows to cause flashes of blue, which
will help prove that underflows are occurring.

This reverts commit e6f596dbcd307e33e4e4842914a027c7f7138bd9.
2013-03-04 12:46:44 -08:00
Ajay Dudani
18ffec4a52 vidc: close instance if securing session fails.
Video driver will close the instance if secure call fails.

Change-Id: I39147272a9183f011529078fe8a18ac8cb2726fd
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:40 -08:00
Deva Ramasubramanian
5b896d7477 msm: vidc: Allow client to request sps/pps per IDR frame
Expose SET_SPS_PPS_FOR_IDR to allow client request sps/pper per IDR
frame.

Change-Id: I0316d751bd1e0b412972cba9d4d59b142500a51d
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2013-03-04 12:46:39 -08:00
Saurabh Shah
736cf9db3b msm_fb: display: Add MSMFB_OVERLAY_COMMIT ioctl.
MSMFB_OVERLAY_COMMIT ioctl is used to display on external.
This is used instead of the default PAN mechanism to avoid delays in that path.
This ioctl for external also waits for DMAE thus fixing tearing.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Arun Kumar K.R <akumarkr@codeaurora.org>
2013-03-04 12:46:38 -08:00
Ajay Dudani
18f0324bea vidc: Error handling for memory heap mapping.
Memory heap should be unsecured if secure call is successful.
This change will make sure that an unsecure will be called
only if securing of the memory heap went through fine.

CRs-Fixed: 393041
Change-Id: I49dd81d1846fc6936518c750a32921c8498ddb95
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Riaz Ur Rahaman <riazr@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:46:32 -08:00
Naseer Ahmed
2c889a591a msm_fb: hdmi: Add support for HDMI Audio caps
Add sysfs nodes to export the data contained in the
audio data block and the speaker allocation data block
from the EDID of a connected HDMI sink.

Change-Id: Ie558e930cc5790965d46eb2c30156a23643fa1f7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:30 -08:00
Naseer Ahmed
59a8a43802 msm_fb: hdmi: Fix parsing of audio capabilities
Fix bugs in the parsing of the Audio Data Blocks and the
Speaker Allocation Data Blocks in the EDID data.

Change-Id: I666cf82d149c8ebb02d3bca3a053e494890870c0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:29 -08:00
Devin Kim
07cd434307 msm_fb: call the backlight control before FB_BLANK_POWERDOWN
You might see the white line while lcd off. You should turn lcd backlight
off before lcd off to avoid that issue. So call the notifier for backlight
before handling of FB_BLANK_POWERDOWN in msm_fb.

Change-Id: I3bd08025a949ec02a1fba7cef98a13d8977c135b
2013-03-04 12:46:29 -08:00
Naseer Ahmed
3aa5b914d3 msm_fb: display: empty queue at suspend
Change-Id: Iafdf469c6cdbf5d469c9dee114555a8d1adb9c66
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:27 -08:00
Naseer Ahmed
94f97545b1 msm : display: buffer sync point update
Do not put sync point if it has been added to
a fence successfully in error handling

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:26 -08:00
Naseer Ahmed
1816d1eb76 msm: mdp: Disable vsync in video off.
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:26 -08:00
Naseer Ahmed
fdf06a0c73 msm_fb: display: remove extra dmap irq disable
irq enable and disable need to be called symmetrically.
Remove an extra dmap irq disable call.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:25 -08:00
jh.koo
cbff6e7a0c slimport: Modify to support slimport-to-VGA and slimport-to-DP dongles
Change-Id: I4bbe996351d50bfa2a4073987c97db37a4ed3484
2013-03-04 12:46:21 -08:00
Devin Kim
ae71d63d07 msm_fb: Fix display corruption with continuous splash screen feature
During boot up, we observe random lines on screen between the
splash_screen image and the android animation. MDP clocks
were turned off during bootup. Fix this issue by enabling
the clocks when this feature is enabled.

Add check to see that the video mode engine is not busy before
turning off the dsi controller to avoid any underruns.

CRs-Fixed: 399634

Change-Id: I8fdb50fa848362a548b8cdd53ee1817346b57716
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2013-03-04 12:46:18 -08:00
Naseer Ahmed
ccd2059e3c msm_fb: display: check base layer pipe at irq handler
Change-Id: Ib188d575044f5479672503508042c8c1e9c759c4
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:15 -08:00
Naseer Ahmed
5f2bdb1c5f msm_fb: display: add blt condition check at video/lcdc off
Blt mode may be enabled during system suspend. Need to make
sure blt overlay done  before turn off video/lcdc timig generator.

Change-Id: Iad54ee544499213bb7c9cfe60d00919f819aacb1
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:14 -08:00
Kinjal Bhavsar
70f7421a80 msm: display: Buffer sync point support
Add MSMFB_BUFFER_SYNC ioctl for the communication of
the acquired and released fence fd between kernel and hwc.

Wait for acquired fence before pan display.
Release the previous released fence after pan display

Change-Id: I6534aed574a025d948581e70465f06a86b46c868
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-04 12:46:14 -08:00
Naseer Ahmed
bd7a66d33a msm: mdp: Send fake vsync only when enabled from userspace
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:13 -08:00
Naseer Ahmed
53e65eac9e msm_fb: Clear real pipe attributes in the pipe free
Clear original pipe attributes in the pipe free call.

Change-Id: I776869e7997e5b70e4c2b102e1a394034247bbcd
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-04 12:46:08 -08:00
Jongrak Kwon
a5a9c40226 msm: dsi: use timeout for dma transfer
Use wait_for_completion_timeout instead of wait_for_completion
not to stuck in the kernel even when the DMA fails.

Change-Id: I29702c3c62f78399c173d660bbbc17a07ed27468
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:07 -08:00
Jongrak Kwon
73161d35e7 Revert "[ARM] msm: fix mipi_dsi_off"
Preserve original dsi-off sequence to remove DMA failure.  Previously the power
off sequence was modified to resolve display turn on/off issue, but the changes
were not necessary in current kernel and just caused side effects which
resulted in fb_blank being stuck due to occasional DMA failures.

This reverts commit e1a9b1bda7691e4f62728d09e1993eb9ae9db8d6.

Change-Id: Ia0a60cfdf697675d34066852f106d9e37578073d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:07 -08:00
Jongrak Kwon
7060213779 Revert "[ARM] msm: fix mdp_off"
Preserve original mdp off sequence to remove DMA failure.  Previously the power
off sequence was modified to resolve display turn on / off issue, but the
changes is not necessary in current kernel and just causes side effects
resulting in fb_blank being stuck due to occasional DMA failures.

This reverts commit 0b3bc7e958f98432538a8537739fbaa560761434.

Change-Id: Ia82fb79b56b57f6696c55d9b079eeadebe8c40bf
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:06 -08:00
choongryeol.lee
23580403bd Revert "mako: backlight: sync backlight on/off with lcd on/off"
This reverts commit af3f22de5dd769b555c018c12be837450cd59dd6.

Due to the order of backlight and lcd on/off will be guaranteed by
PowerManagerService, this patch is reverted.

Change-Id: I2e54dc14d338b5bfa1aca1bddcc37b46928a94e8
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/msm_fb.c
2013-03-04 12:45:51 -08:00
Iliyan Malchev
77af5d3270 msm_fsb: handle pipe-allocation errors
In mdp4_overlay_writeback_on, return -EIO is pipe allocation fails.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:45:49 -08:00
Ajay Dudani
475ec34506 msm_fb: Add option to enable/disable mixer commit
Adds support to enable or disable mixer commit during pipe staging operations.
Depending on the current activity, this selection can be made.

Change-Id: Ia2f5dbab58f73ef4de90abf7f278332d8d73df46
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:45:49 -08:00
Ajay Dudani
af539886f6 msm_fb: display: free base layer pipe at adb stop
Base layer pipe need to be freed at adb stop so that same
pipe can be allocated at adb start.

CRs-fixed: 390644
Change-Id: I948bb27687cfe1c96cc3b071b7bb9bb84b2c52c6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:45:48 -08:00
Devin Kim
ce9d76b093 mako: display: disable LP stop mode
Enabling LP stop flag caused flicking or after image.

Change-Id: I91066bebc3b4c5277ef524435615c1b8bde70e80
2013-03-04 12:45:32 -08:00
Devin Kim
1c659927e5 mako: display: increase mipi line speed
increase mipi speed to 470Mbps from 450Mbps
too low line speed don't support HD resolution

Change-Id: I572afcc82f0c67aa0d45547f3f7f10214f4ebf81
2013-03-04 12:45:32 -08:00
Deva Ramasubramanian
eb9863d4c8 vidc: Correct start and stop sequence.
Video core stop should be called only if start is successful.

Change-Id: Ie2a8d970355387ee3fcdc34b62184972e89dd6cc
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-03-04 12:45:29 -08:00
jh.koo
6ff2586036 slimport: Add slimport detection function
It will be used for charger detection codes. slimport is also used
as charger like as usb charger

Change-Id: Idd40dd88b8a5f035dfb207dd787d7fd3f4ae713b
2013-03-04 12:45:23 -08:00
Deva Ramasubramanian
de751b9e44 vidc: Add secure node support for encoder.
Encoder driver will expose a new node for clients
intending to start a secure encoding session.

Change-Id: I2a104155fd19534a3b3b35e6606d39047f34c42f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-03-04 12:45:22 -08:00
Deva Ramasubramanian
a7b1a91bbb msm: vidc: Use MM heap for prediction buffer during secure encode
We are incorrectly using the firmware heap to allocate prediction
buffers. This violates an agreement between TZ and HLOS that only
the firmware will reside in the FW heap. As such, move the buffer
to MM heap.

Change-Id: I2c91499c38043abfa21ae3443d3a8f22d6474eaa
CRs-fixed: 380161
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2013-03-04 12:45:21 -08:00
jaekyung.oh
0e4c04388a mako: display: update lcd initial code.
Added OTP read protection code for prevent skew value read error.

Change-Id: Ic91031c41ccf6a43346eb0e20f82ad6144fccab2
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:45:16 -08:00
Ajay Dudani
c271edce37 Revert "msm: vidc: Correct calculation of yuv buffer size"
This reverts commit 3a2945ef2385ae934ab4df98f26651d132b7b4fc.
2013-03-04 12:44:56 -08:00
Ajay Dudani
27cf9b7743 msm_fb: display: add mutex on overlay_play to fix iommu page fault
An iommu page fault may heppen When a pipe_commit is executed
in between of frame dropped and pipe_queue during overlay play.
An mutex is necessary to mutual exclusive between pipe_commit
and overlay_play.

Change-Id: I736e821c6c648a6ebd435303a1906a40e9b75791
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:51 -08:00
Ajay Dudani
6d8f25a183 msm_fb: display: add wait for overlay0 done
Dcs command mode BLT involves both overlay0 done interrupt
and dmap done interrupt. A transaction is start at kickoff and
end with done interrupt.  At some cornor cases both overlay0 and
dmap transaction need to be completed before kickoff new transaction.

Change-Id: I5a3cc6e8255acf2c61fc627d35f990182d226f63
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:51 -08:00
Ajay Dudani
83a5244576 msm_fb: display: fix mdp crash during overlay unset
Check real_pipe address before refer to it.

Change-Id: I2f8c6fa6f8e657801dc676f7d9887e7eb0f10e73
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:50 -08:00
Ajay Dudani
523352899a msm_fb: display: alloc/free writeback buffer done at do_blt()
To avoid double freeing writeback at end of blt mode, let
both alloc and free writeback buffer done at do_blt().

Change-Id: Ida5d24589c19be8f6f655eca6add00badca356b2
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:50 -08:00
Ajay Dudani
de46e23776 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: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:44:49 -08:00
Naseer Ahmed
71be284a8e mdp: Fix incorrect reserved[3] usage 2013-03-04 12:44:10 -08:00
Naseer Ahmed
8b1bd63cfb msm: mdp: Fix reserved field usage
An earlier commit(ec5b2f)increased the number of reserved fields
in the kernel standard fb.h header changing the struct size.
This caused issues with userland applications using the corresponding
bionic header. This patch revert the earlier increas in size
and makes corresponding adjustments to the reserved field usage.
A follow up patch will remove usage of reserved fields entirely.
2013-03-04 12:44:09 -08:00
Iliyan Malchev
d3e1e3e13e [ARM] msm: call video start function
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:44:04 -08:00
Iliyan Malchev
6a72f05a4f [ARM] msm: fix mipi_dsi_off
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/mipi_dsi.c
2013-03-04 12:44:03 -08:00
Iliyan Malchev
89244c5bea [ARM] msm: fix mdp_off
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:44:02 -08:00
taeyol.kim
55499f5ac1 display: removed the code exhausts file descriptor in mdp overlay and rotator.
Fix the problem crashed while playing video clips and VT camera test.
ion_share_dma_buf is called in pr_debug.
So, it is called depends on build option and makes crash problem.
2013-03-04 12:43:58 -08:00
choongryeol.lee
a87d0e534a msm_fb: check null pointer before reading backlight on status
Since msm_fb_blank_sub() can be called from hdmi which has no
backlight, we should check the null pointer before to run the
get_backlight_on_status().

Change-Id: I9a91dc337b56e20fbfd82347cf429350f1a72b37
2013-03-04 12:43:49 -08:00
jaekyung.oh
781f6d1c2f mako: display: fixed lcd blink in the first boot.
VGL/VGH power generation is reenabled when first boot.
So Skip this routine when booting.
2013-03-04 12:43:34 -08:00
choongryeol.lee
2cb854aebc mako: backlight: sync backlight on/off with lcd on/off
To avoid dispalying garbage during lcd on/off, the turning on
lcd should be done before backlight on and turning off backlight
should be finished before lcd off. But current implementation
doesn't guarantee these on/off sequence. This patch ensure the
sequence of lcd and backligth on/off.

Change-Id: I11771d395c1a68b4e70b63639f50c773a665b441
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/msm_fb.c
2013-03-04 12:43:34 -08:00
choongryeol.lee
dc93c5a1ec mako: display: change color value to displayed in case of underflow
In case of data underflow, MDP display specific color on lcd.
Due to data underflow rarely happen during display on/off,
we can see unintended blue screen at that time.
So this patch changes this underflow control color from blue to black
for hiding unintended blue image displaying during display on/off.

Change-Id: I26910065b5210a2571125d25f3f1b41a67ba1c1c
2013-03-04 12:43:32 -08:00
choongryeol.lee
6a18ef8007 mako: display: enable lcd color temperature calibration
Add lcd color temperature calibration interface and apply
the calibrated value to the target using mdp lut.

Change-Id: Ibdd606a155e0d7708ba79be6f817c3d89b51a282
2013-03-04 12:43:31 -08:00
choongryeol.lee
01fc0013e4 mako: display: enable CABC function
CABC(Content Adaptive Backlight Control) is supported by
mako lcd panel. So this patch enables it to reduce power
consumption.

Change-Id: I433281bc5fe4e638cfeba1beb9cb61e1775f3896
2013-03-04 12:43:27 -08:00
choongryeol.lee
58aa102331 Revert "mako: temoprarily blocked mdp error message"
This reverts commit 0fca8a4db86917c28b9c8161b1ae5ee73743605d.
2013-03-04 12:43:20 -08:00
choongryeol.lee
b4826d07a0 mako: slimport: enable slimport for mako
apply slimport driver to mako

Change-Id: I411d89784ab2796db61cb9f3202952e0e5744107
2013-03-04 12:43:20 -08:00