Commit graph

4985 commits

Author SHA1 Message Date
Siddhartha Agrawal
fd50a7a472 msm_fb: display: Configure solidfill color to black
The solidfill color was getting reset to to default state to white.
Correctly reseting to black by default.

Crs-Fixed: 453600
Change-Id: I203ce61867d009509bf6acd01169f1fb0b223652
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-15 17:08:38 -07:00
Ken Zhang
8a2eb95560 msm: display: reset vsync state when display is turned on
In the case that vsync ctrl is unbalanced, vsync IRQ is cleared
in suspend,  vsync cannot be enabled after resume.
Clear the status when display is turned on

CRs-fixed: 449155
Change-Id: I5ecf23053b60d1fbd91f042758d67d39c83ab444
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-15 17:08:29 -07:00
Ken Zhang
cd39a1efba msm: display: dsi command mode vsync time generation
In each vsync cycle there will be two vsync interrupts
generated, need ignore the wrong one to provide the correct vsync
timestamp.

CRs-fixed: 452269
Change-Id: Ic13eea77d15eb46f4879f818d346425c63efe41a
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-15 17:08:27 -07:00
Nagamalleswararao Ganji
00c0980018 msm_fb: Optimize the resolution change on hdmi interface
HDMI resolution is changed twice on cable connect.
This will optimize resolution change by turning on
HDMI core only once, with best possible resolution.

Change-Id: I7f636b0c2c64eb3c661fda2a709b5480db05bd27
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
2013-03-15 17:08:24 -07:00
Kuogee Hsieh
128c3afaf1 msm_fb: display: add early_off during panel off
Some panels need to send display_off command before
dsi controller turned off. This patch add early_off
feature for this purpose.

Change-Id: Id377120e9d6972c5f773760369ec056be37e93ff
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:24 -07:00
Siddhartha Agrawal
90f633305e msm_fb: display: Send pixel data while sending on/off commands
To avoid LCD off sequence violeation for some LCD vendors,
we need to keep sending video data during off/sleep commands.
This fixes issues seen while going to a suspend.

Crs-Fixed: 445707
Change-Id: I0ba2704502e8959d0f82deea60481cd5b1f0be20
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-15 17:08:23 -07:00
Kuogee Hsieh
24683eeb25 msm_fb: display: wait4vsync before set suspend flag
Since wait4vsync checks suspend flag, wait4vsync needs to
be executed before suspend flag set to enforce wait happen.
Also, when timing generator is turned off, wait4vsync can
not be used anymore since the last vsync may have passed
before wait4vsync called. This patch fixed commit_comp
timeout cause fence timeout happen on hdmi plug and unplug
cases.

CRs-fixed: 449027
Change-Id: I0f5520538bb290643a648c937296b6bc097fe051
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:20 -07:00
Maheshwar Ajja
f7f116bf52 msm: vidc: Fix iommu pagefault in concurrent scenario
IOMMU pagefault is seen while running decoder and
encoder concurrently for specific codec combination.
Map double the buffer size to ion_map_iommu() API for
encoder reconstruction buffers to avoid the pagefault.

Change-Id: Ib5546a42a75c4c628767310f1a291e7ed443056c
CRs-fixed: 450621
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-15 17:08:20 -07:00
Ajay Singh Parmar
a2ccaef971 msm_fb: hdmi: HDMI resume delay
Remove the delay in HDMI resume sequence by not waiting for HPD
to be switched on. HDMI panel will not be turned on by default
when the device resumes and would instead be turned on by HPD
sense if it is still connected.

CRs-Fixed: 440559
Change-Id: Id276dddbcebf9226e9688aa1b5dad4b281545b21
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:08:13 -07:00
Vishnuvardhan Prodduturi
c485e86f15 msm_fb : display : Change fps level dynamically.
This change lets the user modify the fps level dynamically using
sysfs interface.

Change-Id: Ie99bbca5ec1a0b5ff5fa3570874b254e3fb7235c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2013-03-15 17:08:12 -07:00
Deepak Verma
e4f680fc0e msm: vidc: Add support for NV21 color format encoding
This change adds NV21 color format encoding support.

CRs-fixed: 448511
Change-Id: If26f1241a006e2d325668b8e189f6ff76df8e125
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-03-15 17:07:57 -07:00
Carl Vanderlip
b9bfd3374a video: msm: Calibration config implementation
Allow software to selectively read/write MDP color calibration registers.
This is needed to allow calibration tool to individually configure
registers.

Change-Id: I5db2dcbca0b3433c7fedf9033ceff0cf6a5e0e1f
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit afc6fbf054d079761d5c2ee85242e56d640ee409)
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
2013-03-15 17:07:54 -07:00
Shobhit Pandey
545808abfe msm: vidc: Move metadata shared input mem to firmware heap.
Metadata shared input is used to communicate between the
video core and video driver. Allocate it from firmware
heap for specific targets as MFC command heap size is
limited.

CRs-Fixed: 450118
Change-Id: I3d04cf6dd498ae67adcec7a8cba513bd7932d158
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-03-15 17:07:49 -07:00
Kuogee Hsieh
3d92f40f27 msm_fb: display: remove extra mdp4_dsi_cmd_clk_check()
Since mdp4_dsi_cmd_clk_check() is called inside of
mdp4_dsi_cmd_pipe_commit() also, mdp4_dsi_cmd_clk_check()
is called two times from pan display route. This patch
remove mdp4_dsi_cmd_clk_check() from mdp4_dsi_cmd_overlay()
to avoid mdp4_dsi_cmd_clk_check() called twice from
pan display route.

CRs-fixed: 449809
Change-Id: Idbeb968e6af73abac2bb8c800a8c55015ea6a0bf
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:07:43 -07:00
Praveen Chavan
9af8e0b88c msm: vidc: unsecure heaps in the right order during error handling
Unsecure MM and CP heaps in the right order in case of failure
CRs-Fixed: 445400

Change-Id: I2b5d414c5d9f109740a931b75b0cfbdb196c465f
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
2013-03-15 17:07:40 -07:00
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Deva Ramasubramanian
e5cfb6035c Revert "msm: mdp: Move wfd state signalling into mdp driver"
This reverts commit b7d35468be026b0266bcb5217b72c6fbbf8b1bc0.

Change-Id: Iba80431f304dff64ba0427870dd857fc8729be28
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2013-03-15 17:07:35 -07:00
Ken Zhang
5fe00a30c9 msm: display: reduce timeline to 1 for smart panel
For smart display, dsi command and wfd, since it has its
own buffer, the input buffer can be released once the
display commit finishes, hence the fence threshold for
creation can be smaller. This patch reduce the timeline
from 2 to 1 for samrt panels. Also, it needs to
wait4dmap/wait4ov after kicked off. Otherwise, tearing may
happen.

Change-Id: I9eca871d8d863ef23b1d67b6e1e9cffea40ae4a6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:07:35 -07:00
Kalyan Thota
53154a7b1f msm_fb: writeback panel commit should not happen when buffer is NULL
The change handles the NULL buffer case for writeback panel.
It avoids the H/W commit when buffer is NULL and also adds it to
free queue.

CRs-Fixed: 448340
Change-Id: I60f5d343d6de0f96353b081aa113f347c73c61af
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
2013-03-15 17:07:33 -07:00
Kuogee Hsieh
d295b07b2e msm_fb: display: clean pipes from commit queue at suspend
There has possibility that pipes pending at queue and suspend
comes without commit executed. At resume, pipes pending at queue
will be committed with new pipes just added which may cause iommu
page fault due to pipes may had been move to other mixer. This
patch remove pipes from pending queue at suspend.

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

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

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

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

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

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

Conflicts:

	drivers/video/msm/msm_fb.h

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

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

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

Conflicts:

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

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

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

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

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

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

CRs-Fixed: 444312
Change-Id: I6b5b08394dd96ccbc08c4ca72b6dc4b2c4dbf6be
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2013-03-15 17:06:36 -07:00
Kuogee Hsieh
3a2cf75d6a msm_fb: display: initialize dmap_comp before wait4dmap
blt_wait flag will be set when both two writeback buffers
are used. In this case, kickoff can not be proceeded until
next dmap_done to release writeback buffer. This patch
initialize dmap_comp before wait4dmap to make sure
wait_for_completion is enforced.

CRs-fixed: 448168
Change-Id: I64f2ad599b18f9d8b346c41a55829c564fcced0b
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:06:35 -07:00
Kuogee Hsieh
b6b3f16609 msm_fb: display: add mdp clock control to histogram enable/disable
Add mdp clock control to histogram enable and disable block to
prevent system from crashing when accessing register with mdp
clocks off.

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

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

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

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

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

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

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

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

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

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

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

Change-Id: Idd88fc6a5cdccb41fa61ba902a0014ec8359739a
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
2013-03-07 15:25:38 -08:00
Mayank Goyal
086318c02f msm_fb: display: release mdp clk in mdp4_overlay_writeback_on()
mdp clk is not released in mdp4_overlay_writeback_on()

CRs-fixed: 433986

Change-Id: Ida121e03b0f08ca312c60fb8d945fe2011df853f
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
2013-03-07 15:25:38 -08:00
Siddhartha Agrawal
d1b5a4f214 Revert "msm_fb: display: blt always enabled for 720p,1080p, secure buf"
This reverts commit ed3b07946fedf0b8736f737a2f14b1c2f6ef8b8e.

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

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

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

(cherry picked from commit 3eebb2e33570e32d11a757e493e12a8e79e08d6f)

CRs-fixed: 408728
Change-Id: I6f1b9bd78d96dbf1492e854edd59b05f8dec205f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-07 15:25:33 -08:00