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>
mdp clock is controlled by frame work. There has
possibility that mdp clock had been turned off while
frame update still happen. In this case update
thread may stuck at wait4vsync since there has no
mdp clcok to trigger vsync interrupt. This patch
will enable mdp clock at pipe commit when mdp clock
is tunred off so that frame update can be completed.
Change-Id: I2d31b9a4b6f0cb9dd36516a80931988e23e8a545
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Enable new mdp update method which requires flush bit
to be set before updating mixer cfg register for both
smart and dump panel
Change-Id: I97b9d221da574a96707748ec83dd1acff6dcb654
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Meta buffer header initialization is required if we process
extradata in secure playback.
Change-Id: Ic8a068e99351f2c970643200d03b1a580ead7480
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
In Suspend case, after we complete for no_update timer and before
we set power down flag to false we might recyle the CABL sequence
which might cause do_hist to fail till resume
CRs-Fixed: 434491
Change-Id: I51f9f0d9edb26c7671d44162f55c01acdde8f3d7
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Currently, if the histogram disable IOCTL comes after panel
is turned off, we early return the IOCTL causing the interrupt
to be left enabled. This causes IPC issues during suspend. Fix
this issue by properly enabling/disabling the histogram interrupt
during suspend/resume scenario.
CRs-Fixed: 434491
Change-Id: I4d38776a43ea854aff3c10c8d9d5450af1d98c91
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Need the value of var in display commit to update the double buffers.
If not, double buffering doesn't work in minui (eg. recovery and off-charger
mode)
Change-Id: I1fba52243cc781f18742131759245911d32c9b18
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
FB_ACTIVATE_VBL bit is set to enable TE logic at pan_display
and unset to disable TE logic at pan_display for smart panel.
This patch checks for FB_ACTIVATE_VBL bit set only instead of
value.
CRs-fixed: 433399
Change-Id: I6fc913c6752fcca6a27c783c45ab318065217973
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
For cmd mode the frame rate calculation result is wrong. Also in mdp
driver there are several places to do the same calculation. So fix the
wrong calculation and use a single func to do calculation.
Conflicts:
drivers/video/msm/msm_fb.c
Change-Id: I3a4be39e480ce82677dcefb666202947f7f6d3c1
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit d4eb5a1a3ef0935ce6aeffb2b48974c01b9518b9)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
mdp bus client could be registered multiple times without the check.
Change-Id: I582741c75e815873357e62bc9bf0ff61a4cecf9f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This change adds free buffer api to video
client's flushing state to allow buffer
freeing in flush state.
CRs-fixed: 430214
Change-Id: I970efbbd8cc503eab4b944e12630f1b1faa9069c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Memory allocated for "buf_entry" and "sched_cctxt"
is not freed in case if error is returned. This
change prevents possible memory leak in video
decoder driver.
CRs-fixed: 432323
Change-Id: I1c8775fb701f1568f704b6ddbb4e835304d2a817
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
This patch allow satge commit without pipes queued to
allow a pipe to be un-staged from mixer immediately after
overlay_unset.
Change-Id: I03abb907c66cce3d0559743d3bb1eb26a88dc78a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Moving RGB1 and RGB2 to AXI port 1. This fixes underrun issues seen
on External display while connecting and disconnecting HDMI. This patch
evenly balancing pipe loads on each port.
Change-Id: I2dc1166d04bb938f9e233a6de52f1a8a3fdd29e2
CRs-Fixed: 435458
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
mdp_clk_ctrl on is not called when commit is from overlay commit path
which can cause mdp hang. mdp_clk_ctrl off should be after mdp
overlay2 is done, so schedule a work in overlay2 done isr.
Change-Id: I94fd08da27cfda114f5cc0056a5103f0a9b772f6
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
FIR and M/N scalar when used for downscaling, drops
alpha channel of the given layer. To notify this, alpha_drop flag
is updated accordingly. This flag need not be checked for layers
with no alpha plane. In some scenarios alpha_drop may get enabled
for the layers with no alpha plane and cause issues realted to blend
composition of layers. Check for setting alpha_drop only if source
ayer has alpha plane.
Change-Id: Ie64b30c045a78d0d68eb9efacc76902afae7850d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Retain RGB1 iommu information during base layer swap
so that iommu used by RGB1 can be freed back to pool later.
Change-Id: Ibed85179284743dc8a9d1434f0c81626b0567e16
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit be46f9f596c5172438a74759d48ca7db600cd737)
Remove unused fence input in mdp_display_commit
structure
Use different timeline name for different fb
Change-Id: I4edd335b36dce057ff3e54302af6088a9cc470ec
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
We should reset the data corrupt flag only for codecs
other than H264 and MPEG-2 in line with the video firmware
support. Hence, modify the conditional check.
Change-Id: I7c4d5557a3f9b1d1762fe7cfcd5693a6760188f0
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit c165675bf03feb182bfd46d2ac5ceebcf4987f74)
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
ISDB-T client requires flags indicating the correctness
of output YUV data from MPEG-2 decoder. With this commit,
DATA_CORRUPT flag is sent from the driver if the output
YUV is either INCORRECT or APPROX_CORRECT.
Change-Id: I72e8ba81f45200715a195497d4eae140cbe86616
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit d68ca84da4a5c68eb2caf1f9e4dbb665bba5a05c)
Conflicts:
drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
MPEG-2 display aspect ratio calculation was done similar
to MPEG-4 standard. Correct it as per the MPEG-2 standard
and video core interface specification.
Change-Id: I1aa98ca238c7b38e35c78905b29457cfa59edd45
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
(cherry picked from commit ce5f973881c11491c3fa35ceb8c945a6c8ee2b8f)
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
The JB MR1 update was not recognizing the LVDS panel and hence
throwing an invalid panel error. Adding check for LVDS panel to
enable display on 8064 CDP.
Change-Id: Ib125cc797b288ca027f91778d9892acfa00a3214
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>