Commit graph

4837 commits

Author SHA1 Message Date
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
Devin Kim
b797c941d2 backlight: lm3530: remove board specific hard-coding value
get the board specific data from pdata. do not hard coding in driver.

Change-Id: Id2ebc4475755adcd81297064f32cc3169c55eaca
2013-03-04 12:48:08 -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