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>
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>
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>
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>
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>
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>
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>
This change lets the user modify the fps level dynamically using
sysfs interface.
Change-Id: Ie99bbca5ec1a0b5ff5fa3570874b254e3fb7235c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
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>
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>
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>
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>
This reverts commit b7d35468be026b0266bcb5217b72c6fbbf8b1bc0.
Change-Id: Iba80431f304dff64ba0427870dd857fc8729be28
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
mdp clk is not released in mdp4_overlay_writeback_on()
CRs-fixed: 433986
Change-Id: Ida121e03b0f08ca312c60fb8d945fe2011df853f
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
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>
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>
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>
vsync is controlled by frame work which means vsync irq
off may happen at any instance. This patch use a reference
count to control vsync irq enable/disable so that
wait4vsync can replace msleep safely during suspend.
Change-Id: Ief84b1b421436e1f750288eb9a9760a9cb96c555
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
If frame rate value for mipi video panel is coded in panel file it can
be directly used to avoid calculation error.
Change-Id: I6ad86226c81da4bcf36196385f9ff4bea0bef0ca
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>