MDP clock's overlay block is enabled during first update after panel
on currently. This is now moved to panel on to keep clock enabled
right from display on time.
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ie201186c1471201874f2eff246486bc4a73b5872
After regulator_get call for HDMI PLL footswitch purpose, set
output voltage to 1.8 V to ensure proper state while enabling and
disabling regulator.
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ifdd0cdbf614524b53038074b943cca65b71bbd24
Performance issue is observed with 60fps content as the vcodec clock
set based on number of macroblocks and framerate is not sufficient.
This fix checks for the framerate and sets max performance level if
fps is more than 60 (59 to be more precise)
Change-Id: I5d41643a32ec895565406fadec04dc95e04655a4
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
For Mixer 2, register flush need not be called. Flushing is done
only for pipes on mixer 0 and 1.
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: I54758f79552790de2ad936703ba6140ac57b76c4
The video driver is throwing error for erronious header
input buffer with EOS flag enabled. This commit will
fix the error case by amending the EOS handling for the
first buffer.
CRs-fixed: 370048
Change-Id: I8917aa288d6547319e8b1df54e27afd69ab36162
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Wait time for VSYNC needs to be increased to accomodate 1080p
24HZ resolution which requires around 41ms.
CRs-Fixed: 368521
Change-Id: Ideda24bb83e32a6d5035c6193ef3dfd5e0c947fc
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
A device pointer should be passed to regulator_get() as the first
argument, and the regulator mapped to the MDSS device in the device
tree. Do this.
This also resolves the following message seen in debugfs, which
is present when regulator_get() is called with a NULL device:
<4>[ 1.145507] gdsc_mdss: Failed to create debugfs directory
Change-Id: I70a5137a31dbf82ae1e6634249f274cb16fe7a71
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This commit will ensure to clean the extradata portion in
output buffer changed by the CPU before sending the buffer
to Video hardware and invalidate the output buffer changed
by Video hardware before CPU access the buffer.
Change-Id: I05ea24fb381a164f6cfd520bd9071a94349ed2df
CRs-fixed: 366446
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
One way that mdp mixer2 gets writeback address is to get ion memory fd
from userspace, then mdp driver maps this fd in kernel. When mdp iommu
domain was not enabled, this maps to a physical address. Now after mdp
iommu domain is enabled, the map is changed to an iommu virtual addr.
Change-Id: I461a00cc93169de586565834af4fb9a43949cf95
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Add support for enabling HDMI PLL regulator along with footswitch
enable/disable to avoid PLL lock detection failures during
suspend/resume
Change-Id: I9b161cab50d2b6c39de39b588e326f5ff97cbc65
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
- Implement APIs used to support wifi display (WFD) based on ioctls and
functions declared in linux/msm_mdp.h.
- Restructure writeback interface file to support custom output formats
and take buffers from WFD APIs.
Change-Id: I3e6b75bd8b7d73eb20c97899de1891bbd85e9fa4
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
HPD read work is used to detect HPD at bootup which
is not required as HPD detection is taken care at
bootup by toggling the HPD circuit. So we can safely
remove this redundant code.
CRs-Fixed: 368865
Change-Id: I8eed00c4f5af2ed2ca37e86da622ab518e5eb887
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
This reverts commit c0d815c2a4118d1ba51e316c6cb59bee4d68eb9b.
Revert patch that is causing excessive histogram logging.
Will merge original patch with fix when issue is resolved and tested.
Change-Id: I99b04362f6acd4f75a72e4b3ca52406907971e67
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
For handling split IOMMU domain cases, BLT mode requires DMA to map
for reads and Overlay for writes. DMA and Overlay blt addresses are
added to configure the respective registers to avoid page faults and
normal operation of supported panel interfaces.
Change-Id: I522944b804fe65925df428d6bb312262328a11d7
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Finer granularity is needed when mapping into the IOMMU's for
rotator and mdp for secure playback. During secure playback
HLOS will only have access to map into one context bank. The
other context bank is secured and programmed by TrustZone.
Divide DISPLAY_DOMAIN into DISPLAY_WRITE_DOMAIN and
DISPLAY_READ_DOMAIN. Divide ROTATOR_DOMAIN into ROTATOR_SRC_DOMAIN
and ROTATOR_DST_DOMAIN.
Change-Id: If3e556171645e8ea02deb12ca543df36233db5f2
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
All of MDSS blocks (mdp, dsi, edp, hdmi) share same irq line. Implement
function to manage MDSS irq line with common API with support for irq
callback handler for each of block. Also fix incorrect calculation of
MDP interface interrupts.
Change-Id: I1271f7e1065aac95175b6e92504917264f4043a5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Video mode display interface is used by DSI, HDMI and EDP controllers.
Implement MDP support in order to setup data path to these controllers.
Change-Id: Ibc766a1d10a55bcf64a3ab693db034a378afe4ee
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Implement color conversion matrix programming to support YUV surfaces.
Also add dspp initialization stub function.
Change-Id: I7ba57eca24e15acffbddf7b81fac6b8a6ce3bba5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Add rotator session management support with overlay interface using MDP
flag MDSS_MDP_ROT_ONLY. Overlay interface can only support overlay
surface or rotator (written back to memory) but not both.
Change-Id: Ib2f494683b2e6c2fd8c67818df2b57afb82a3df3
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
MDSS hardware supports different bus bandwidth and clock frequencies
depending on the load on the hardware. Add support to driver to
calculate the bus bandwidth and clock frequency requirements and
activate changes before the load on hardware changes.
Change-Id: I9bb5bbc7b3e18fb1a738f527b875506dfa0c5c81
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Copper uses Mobile Display SubSystem, add device tree and clock
information to be used in mdss driver.
Change-Id: I67397a28168407b3268f4f026f35d69a04062995
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Always queue histogram read worker in order to gain concurrency protection
from the histogram management mutex (move previous checks/calls into worker
itself).
Lock the mdp_histogram_start and mdp_histogram_stop calls with the same
lock used currently by mdp_do_histogram to maintain that every do_histogram
called between a start and stop will be completed.
Add a timeout to do_histogram wait_for_completion so that it will unlock
and yield to other histogram calls if it waits for longer than 33 msec.
CRs-fixed: 363763
Change-Id: Icc503aed4e60dd01941682003ca3dbc844aed8d9
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
This change provides support to raise video clks to turbo mode for mpeg4
clips with high number of slices. The firmware performance degrades if
the number of slices is more than 10. Without this fix, we see lot of
frame drops happening, causing a freeze effect.
Change-Id: I79d0b9a438f73d87384b9e03761a65b9de3c9fc7
CRs-Fixed: 358615
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
This reverts commit a369ce03ca048fb511642ac1cb73c1f652d70c50.
The change is no more required as pan_update is not being called
and overlay set is now being used instead.
Change-Id: I7b25c256ab57e620f319058638371e079642c448
CRs-Fixed: 367233
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
This change provides support to raise the clks to turbo mode for mpeg4
clips with high number of slices. The firmware performance degrades if
the number of slices is more than 10. Without this fix, we see lot of
frame drops happening, causing a freeze effect.
Change-Id: Ia897854ef6d30bb97cd37810b22eb1ab5ad818fb
CRs-Fixed: 358615
Signed-off-by: Arun Menon <menon@codeaurora.org>
Fix error message seen on kernel log after suspend/resume
Change-Id: I908efec9fde6e9de838e28d2c778fa4b3567e4f6
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
The encoded output was corrupted for wvga and lower resolutions
during HFR. Moving the prediction scratch buffer from MM Heap to
FW Heap avoids this corruption.
CRs-Fixed: 353979
Change-Id: Ife3be7ccd9f19bb285c6c348721a1d54bbbd4734
Signed-off-by: Arun Menon <menon@codeaurora.org>
Allocate memory for post processing only once. Free post processing memory
when MDP is removed.
CRs-fixed: 366325
Change-Id: I244f4e10a6933e2acaf69a83d8b91ee5f6e27557
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
- Add support for overlay IOCTL APIs defined in linux/msm_mdp.h
- Support for ion client buffers and framebuffer memory
Change-Id: I0418ecab9aacf826d900f82f179fa20688fc763e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Add writeback interface support, using one page of framebuffer memory
for writeback output.
Change-Id: I0a44c6907cbc10d97c78642f45dc018dfb2d1750
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
- Implements Linux frame buffer interface to interact with userspace
libraries and applications, based on msm_fb frame buffer.
- Implement MDP driver which handles MDP core data path setup and
hardware blocks programming.
- Support for UI through Linux frame buffer FBIOPAN_DISPLAY ioctl.
Change-Id: Ib98677b8d81d74283b27dea08a9f1a705c101bce
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
HDMI dependent functions need to be guarded under HDMI panel
macro to avoid non HDMI builds complilation errors.
CRs-Fixed: 366864
Change-Id: Ib2a9f6db4eb511b2a170fcc7ac979f6c41046baf
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Currently all HDMI timers are initialized in the driver's
probe function with a maximum possible expiration value. However,
the 32-bit jiffies value is initialized in the kernel so as to
wrap 5 minutes after boot. This results in the HPD timer being
fired 5 minutes after boot even though cable is not
connected. This change fixes this issue by not starting the HPD
timer during probe.
Change-Id: I9eeb8b892be2476e8debdd4ec5897a103cc34665
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
If the timing generator is not on, dma waiting won't return and system
crashes. So add TG on detection to avoid the issue.
CRs-fixed: 362503
Change-Id: Ic472e7b75be1fd8960e5ac18929181513085212e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Fixes bug while closing encoder which supports
duplicate input frames. This fix decrements
the reference count of original frames
appropriately.
Change-Id: Ib542cf5fd790b8ba7f77e9a748a25c3cb132f40a
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
screen goes completely blank while loading a webpage at low back
light value. reducing the pwm frequency range to fix the issue.
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Change-Id: I44018b9f19d2dd3c8731d94588c606cd081fa3cb
CRs-fixed: 362987
Add support for backlight control on EVB using both the
LCD_BACKLIGHT GPIO and also the PWM approach on 8x25 EVB.
Also increase the backlight levels supported on 7x27A
from 100 levels to 256 levels.
CRs-fixed: 365523
Change-Id: I4806644783cc98e01192a3101bc852487bb3b592
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Currently HDCP authentication is started for a default resolution
upon HPD connection event. With this change, HDCP authentication
is only triggered after the HDMI interface has been configured for
an appropriate resolution following the call to open the HDMI device.
CRs-Fixed: 368865
Change-Id: I7b9ce85aed989b78b448bff6a545a194dfed5b1d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Currently HPD is turned on and off with HDMI turn on and off
and turned on again after HDMI off so as to detect the cable
plugin.
With this change, HPD will be turned on when HDMI drvier is
initialized and turned off and on with suspend - resume. The
HPD handling during HDMI turn on and off has been removed.
CRs-Fixed: 368865
Change-Id: I1fb42b4587e58086d643b87a1600ecf09754423d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
In the current implementation, the regulators pertaining to the
HDMI core are turned off/on as part of the configuration of the
HDP circuitry. As a result, the regulator that powers the HDMI
PLL is turned off before the HDMI clocks on the PLL are disabled.
This might lead to the PLL not getting locked when it is re-enabled.
This change turns on and off the regulators and clocks in proper
sequence.
CRs-Fixed: 360135
CRs-Fixed: 358598
Change-Id: Ie3630b543e78e83dc565edc32239935135ca4ca5
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Always queue histogram read worker in order to gain concurrency protection
from the histogram management mutex (move previous checks/calls into worker
itself).
CRs-fixed: 363763
Change-Id: If9e3c13b5e4005f81fd1b5d2664af206b1decf5b
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
1. Make command mode default on 8x25 SKU5 devices
2. Add command to change panel scan direction to have proper display
Change-Id: I9440ed01541a18ddabe2029c37565dda1181ac2f
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
The video framebuffer should not be cached when mapping into the
rotator or video domains. Change it.
Change-Id: I407c68ac21a030aff801ebfae01d360bb6bf338c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Frame rate converter(frc) is treated as LVDS 1080p panel
Its configuration is based on HDMI 1080p60 mode
LVDS dual channel mode will be used
Change-Id: Id3a17f107c8398ddb47105d064be2743a150a3b3
Signed-off-by: Ken Zhang <kenz@codeaurora.org>