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: I2d67525d6026b8a1fb2f2cb00e4bb118c8eb6f27
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Add support for ion in MDP PPP drivers for accessing
source images and destination images.
Change-Id: I1ba07fb826447abb13ff73752089577cf9924ce5
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
If a histogram reader waits for completion in the do_histogram ioctl
and during this time the device is suspended, the complete for this
gets called from mdp_histogram_ctrl_all() in the panel_next_off()
sequence. This results in mgmt->hist not set to NULL. The subsequent
do_histogram ioctls after device resume fail due to multiple reader
failure condition since the histogram irq will be enabled now from
the same mdp_histogram_ctrl_all() during panel_next_on() sequence and
this by-passes mgmt->hist getting set to NULL that is present in
histogram_start() ioctl. Handle this scenario.
Change-Id: Ib0485da24c0f09a3f26768b75231903c8a2e0033
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
This reverts commit 2423ba8ae07458ec93efa07d777454f26d1d7c90.
commit 2423ba8... will be refered to as commit X
Commit X should have been listed as a parent of commit
56a123baaab84af584fbbf5cbb29955ec5c92f39 (i.e. video: msm: Always queue
histogram work & lock histogram calls).
commit 56a123b... will be refered to as commit Y
Commit Y is composed of 3 commits that were squashed together after they
caused errors when only one of them merged into mainline. Commit X was
created to revert the first of these 3 commits, and thus resolve the
errors.
However, when updating commit Y, commit X was omitted as the parent commit.
So when commit Y merged as a parent of commit X, commit X reverted part of
commit Y. By reverting commit X, this commit restores commit Y.
Change-Id: Ibfad464a2579354c92bc62d406672dcfc6a24009
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Pull in Ion patches for 3.4 upgrade. Inclues the following
patches from google:
commit 7191e9ba25
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Mon Jan 30 14:18:08 2012 -0800
ion: Switch map/unmap dma api to sg_tables
Switch these api's from scatterlists to sg_tables
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 6f9e56945d
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Tue Jan 31 09:40:30 2012 -0800
ion: Add reserve function to ion
Rather than requiring each platform call memblock_remove or reserve
from the board file, add this to ion
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 9ae7e01de1
Author: KyongHo Cho <pullip.cho@samsung.com>
Date: Wed Sep 7 11:27:07 2011 +0900
gpu: ion: several bugfixes and enhancements of ION
1. Verifying if the size of memory allocation in ion_alloc() is aligned
by PAGE_SIZE at least. If it is not, this change makes the size to be
aligned by PAGE_SIZE.
2. Unmaps all mappings to the kernel and DMA address spaces when
destroying ion_buffer in ion_buffer_destroy(). This prevents leaks in
those virtual address spaces.
3. Makes the return value of ion_alloc() to be explicit Linux error code
when it fails to allocate a buffer.
4. Makes ion_alloc() implementation simpler. Removes 'goto' statement and
relavant call to ion_buffer_put().
5. Checks if the task is valid before calling put_task_struct() due
to failure on creating a ion client in ion_client_create().
6. Returns error when buffer allocation requested by userspace is failed.
Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
commit 043a61468f
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Wed Feb 1 11:09:46 2012 -0800
ion: Switch ion to use dma-buf
Ion now uses dma-buf file descriptors to share
buffers with userspace. Ion becomes a dma-buf
exporter and any driver that can import dma-bufs
can now import ion file descriptors.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 0d1259b5f8
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Mon Apr 30 16:45:38 2012 -0700
gpu: ion: Use alloc_pages instead of vmalloc from the system heap
With this change the ion_system_heap will only use kernel address
space when the memory is mapped into the kernel (rare case).
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit be4a1ee79a
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Thu Apr 26 20:44:10 2012 -0700
gpu: ion: support begin/end and kmap/kunmap dma_buf ops
These ops were added in the 3.4 kernel. This patch adds support
for them to ion. Previous ion_map/unmap_kernel api is also
retained in addition to this new api.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 46d71337f9
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Mon May 7 16:06:32 2012 -0700
gpu: ion: Allocate the sg_table at creation time rather than dynamically
Rather than calling map_dma on the allocations dynamically, this patch
switches to creating the sg_table at the time the buffer is created.
This is necessary because in future updates the sg_table will be used
for cache maintenance.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
commit 903f6c716d
Author: Rebecca Schultz Zavin <rebecca@android.com>
Date: Wed May 23 12:55:55 2012 -0700
gpu: ion: Get an sg_table from an ion handle
This patch adds an interface to return and sg_table given a
valid ion handle.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
The commit also includes fixups needed for MSM specific code.
Change-Id: Idbcfa9d6af0febf06f56daaa6beaa59cc08e4351
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Attach IOMMU call is currently done from DSI cmd mode DMA
update method. Move the attach call to kickoff which enables
it from restore and video paths
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: I06d39e31b3ab1cf797fb655e7e558c1cabd98ebf
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>