Commit graph

566681 commits

Author SHA1 Message Date
Ingrid Gallardo
0d2c6b3f5a msm: mdss: fix programmable fetch calculation
Fix to consider all the vertical blanking lines for
the prefill bandwidth calculation and keep skipping
one pixel for the fetch start configuration.

Change-Id: I3407f8ef4c6427a307220bee10f9cac072582069
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:32:45 -07:00
Aravind Venkateswaran
43f7af5ebb msm: mdss: support transition from suspend to doze mode
If a transition from full suspend to doze mode is requested, first
unblank the panel and then enter the doze mode. This is necessary
to ensure that all necessary panel supplies are turned on and the
panel is brought out of reset first.

Change-Id: I5757f01ec9843a332fd2d1034c068ff993f466bd
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:44 -07:00
Ajay Singh Parmar
92592e399c msm: mdss_fb: Do not issue runtime suspend/resume for HDMI primary
When HDMI is primary, do not issue runtime suspend and resume events
to HDMI interface. Runtime suspend/resume may get triggered with cable
connect/disconnect when HDMI is primary which will result in unnecessary
power on/off of HPD module.

Change-Id: I6c0c9eb85832717be538b3fbf7583b1e4a5c10d5
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:32:43 -07:00
Raghavendra Ambadas
19c2832f43 msm: mdss: Add bounds check in mdss_compat_overlay_ioctl
A bounds check has to be done on ovlist32->num_overlays variable
so as to prevent memory allocation of arbitrary size and avoid
subsequent undetermined behaviour.

Change-Id: Ic70726f1825040e793ef256195d236d77b392791
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
2016-03-23 20:32:42 -07:00
Benet Clark
153e6b81dd msm: mdss: Check if PP has split mode enabled for PAv2 features
The option for split mode in PP only checks the enable flag of the
feature in order to enable the same in the DSPP opmode. The opmode bits for
PAv2 features need to be disabled if PA bit is disabled.

Change-Id: I72019d0d03703e0698cf8d4ccd8b8f9c17889653
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:32:41 -07:00
Terence Hampson
915faf80ec mdss: mdp: switch fget_light to fdget
fget_light was deprecated, made the switch to fdget.

Change-Id: I52a032f26002300a1bf58573ff40fcc84c35d74e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
[cip@codeaurora.org: Replace f_dentry with f_path.dentry]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:32:40 -07:00
Terence Hampson
2b0ce3331c mdss: mdp: Intermediate step in transitioning to new iommu apis
IOMMU APIs are changing in 3.14 kernel. ION IOMMU calls, such as
ion_unmap_iommu, are being deprecated. While transition to new
APIs calling msm_map_dma_buf is an intermediate stage when
transitioning to new APIs.

Change-Id: I7fb11575d3924073fa9917be32ac2f92634f2e13
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:39 -07:00
Clarence Ip
cad4a93abb msm: mdss: fix trace compilation warning
In order to prevent trace compilation warning, need to explicitly setup
compile include directive to search current source folder for header
files.

Change-Id: Ic17f841c88d911498d914f5339c99d2cb1ae3d1a
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:32:38 -07:00
Terence Hampson
60d31c26b7 mdss: mdp: sysfs_dirent changed to kernfs_node in 3.14 kernel
Changing all instances of sysfs_dirent -> kernfs_node.
Additionally parameters passed into sysfs_get_dirent changed
which is corrected in this patch.

Change-Id: I06ce0b6af0d88248fb8019a68fd637bd6ce5b12e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:38 -07:00
Terence Hampson
8a3f359c47 mdss: mdp: usleep no longer in 3.14 kernel
Inline function usleep translating to usleep_range no longer
provided in 3.14 kernel. Moving all usleep in display code
to use usleep_range.

Change-Id: Ie2a465107f83beaedb82380ca8d57c1d9190ec7f
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:37 -07:00
Terence Hampson
27952e1ebb mdss: mdp: Correct msm-bus.h include
In porting Id726a65b5641b57c0edd3ba33f2e5b3f68aff643
misspelt header file that was change. This patch corrects
that mistake.

Change-Id: I6755b102742e663f272b10f3b9804493e81ac28f
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:36 -07:00
Terence Hampson
b0d3acbf1d mdss: mdp: kgsl_drm is removed for 3.14 kernel
Removing all calls to kgsl_drm, as it is no longer supported
in 3.14 kernel.

Change-Id: I835a946d6b032f47121e19b6ddb8629e672088ea
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:35 -07:00
Terence Hampson
309facd77e mdss: mdp: INIT_COMPLETION depricated to reinit_completion
INIT_COMPLETION is removed from 3.14 kernel. Replacing with
reinit_completion.

Change-Id: I64c43e313ff4e07dc7900bdce155f8c55e5ed420
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:34 -07:00
Aravind Venkateswaran
1db0999b9e msm: mdss: do not call dsi soft reset for idle power collapse
The DSI branch blocks needs to be on in order to issue a DSI software
reset. Commit e8c272ba5c3f23e6cece61bde7834cab7922a1d4 introduced the
change which moved the DSI software reset prior to enabling the DSI
branch clocks in order to support the idle power collapse feature.
This is not correct since a soft reset is not required at all when
resuming from an idle power collapsed state. Fix this by moving the
software reset to the DSI on sequence.

Change-Id: I663a44d04650f686ba98ea0b1fb7ab2ea29a3bcc
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:33 -07:00
Aravind Venkateswaran
49036d7c0e msm: mdss: use helper functions to check for panel power state
Whenever the display always-on feature is enabled, it is possible
that the display pipeline can be in an intermediate state between being
fully interactive to fully turned off. In the current implementation, a
number of state transition decisions are made based on whether the
display pipeline is on or not. Instead of explicitly checking for the
panel power state, define generic helper functions which classify the
panel power state into three different stages - interactive, low-power
and off. Replace any existing check for the panel power state with these
newly defined helper functions.

Change-Id: I4d6dd883ea6aca8abd57fa048a79e0c88da09a95
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:32 -07:00
Aravind Venkateswaran
789b61dcb3 msm: mdss: add support for display always on mode
Add a new panel power state to represent a panel low power mode. Add a
new sysfs node to control when to configure the panel into this new
mode.

Change-Id: I7df8bf63470bec893c6b7481678f00ce76b6875c
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:31 -07:00
Aravind Venkateswaran
b9095befda msm: mdss: add support for different panel power states
Currently a panel either be in a powered on state or a powered off
state. However, it is possible for panels to be configured in an
intermediate low-power state where the panel is always kept on. In
order to support such use-cases, it is necessary to add the concept
of panel power states in MDSS so that each software layer can
independently maintain it's state and manage transitions between them.
This change just refactors the driver with only two existing power
states - panel on and panel off.

Change-Id: I49d1fda506761546c5e22d9106c5177e75053a81
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:30 -07:00
Ken Zhang
38154a0ada msm: display: release kickoff before fence waiting
After configuration is done, save the acquired fences,
release the kickoff and ov_lock, then wait for the cached
fences. This way the next prepare will not be blocked by
waiting for acquired fences.

Change-Id: Id6f5b30e0d20cd59bd0aebf71af7cb47ecb1cf5b
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2016-03-23 20:32:30 -07:00
Ujwal Patel
30a12e0aec msm: mdss: fix mdp clock calculations for rotator
MDP clock requirement for rotator depends solely on source dimensions,
rot_clk = (src_w * src_h * fps). Fix current calculations where MDP clock
rate is incorrectly calculated as rot_clk = (dst_h * dst_h *fps). New
calculations are valid even when down-scale is done along with rotation.

Change-Id: I30d98b7a62beeb3a559a9c5f26de43c014fd25fd
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:32:29 -07:00
Vishnuvardhan Prodduturi
c8aa18ff32 msm: mdss: Add support for different voting on RT/NRT AXI Ports
In 8939, MDSS has two AXI Ports one for real time client and the other
for non-real time clients. Bandwidth required on each of the port changes
according to the use case which necessitates the voting to separate on two
different ports. Separate vote is calculated for RT clients and NRT clients
which will be voted on respective ports.

Change-Id: If3d3d670c19a03d5d9659db6e3630a2958744f07
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2016-03-23 20:32:28 -07:00
Padmanabhan Komanduru
06acb7bed1 msm: mdss: add ESD status support for NT35596 panel
In ESD thread implementation using DSI status read method,
currently we check the read value of only one register from
the panel. For NT35596 panel, the expected read back value
for the health status register is 8 bytes. Add support for
ESD status for this NT35596 panel accordingly.

Change-Id: Icc2ba4d662facb79432a07f72064db57d2e5dd8a
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23 20:32:27 -07:00
Dhaval Patel
feb0ac4506 msm: mdss: release pipes associated with respective process
It is possible that fb_open and fb_release APIs are called
from different processes for same file node. fb_release
finds correct process through file descriptor node in
such scenario and releases respective ref count. However,
overlay_release API tries to release the pipes associated
with current process id. This check fails to find correct
resources and does not release any pipe. This change calls
overlay release API with respective process id to release
all pipes associated with it.

Change-Id: Icc176032401483e05f347d3c08a4b344f61686f2
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:32:26 -07:00
Charles Bin
ae7611148f mdss: hdmi: Fix null dereferences
Add null check to fix potential null dereferences in driver.

Change-Id: I913d4a8e5dc3e61e534243ab77d788ad64815b28
Signed-off-by: Charles Bin <cbin@codeaurora.org>
2016-03-23 20:32:25 -07:00
Aravind Venkateswaran
7c70e9299f msm: mdss: refactor MDSS idle power collapse logic
MDSS GDSC can be turned off, or power-collased for command mode panels
in static screen use-cases. In the current implementation, the power
collapse is triggered by a worker thread in the interface driver
whenever it enters the idle state. However, MDP driver already
registers pm_runtime callbacks for idle and suspend notifications and
also maintains a count of active overlay sessions. It is much simpler
and cleaner to trigger idle-power collapse based on that. This also
avoids unnecessary synchronization issues pertaining to the power
collapse worker thread.

Change-Id: I198e6d7685e5ef6eed7cd06a77fa76435940b805
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:24 -07:00
Shivaraj Shetty
8bf6f4e1a6 msm: mdss: Avoid dsi v2 compilation for ferrum
Ferrum uses DSI 6G, and there is no need to compile dsi v2
driver for this target. Update Makefile to take care of this.

Change-Id: Ifbbb320fd908bbdca5825cac7164b68b18360316
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
2016-03-23 20:32:23 -07:00
Vineet Bajaj
b385d4a599 msm: mdss: set the default mdp clcok rate to max supported by target
Set the default mdp clk rate to be used in mdp_probe at max supported.
For certain targets such as 8939 which support destination split and
use 2k panel the minimum clock rate required will be 320MHz. This will
apply only until first update comes from the userspace.

Change-Id: Ia4bf56401eaec86ffd8338b5dd0c8b730ad4b1fc
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
2016-03-23 20:32:23 -07:00
Adrian Salido-Moreno
0d6433da03 msm: mdss: double check mdp ping pong done state
There are cases where the irq trigger may get delayed for more than
expected, in such cases the ping pong done status may have been updated
by MDP hw. Add additional check to see if this has been triggered even
though interrupt wasn't scheduled for pingpong done.

Change-Id: I4730d166d95f238f4525eab2b5c99be40b30699b
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:32:22 -07:00
Charles Bin
54f233b591 mdss: mdp: Prevent false null dereference warnings
Remove null checks that were causing false warnings
for potential null dereferences in driver.

Change-Id: I3a097c926da47d897e8c8e4fe39808436c413f70
Signed-off-by: Charles Bin <cbin@codeaurora.org>
2016-03-23 20:32:21 -07:00
Charles Bin
9381d640cf msm: mdss: Fix null dereferences
Fix potential null dereferences in driver.

Change-Id: I990ea60a17e14cc438f534a2b65eb28aa9cc8cb8
Signed-off-by: Charles Bin <cbin@codeaurora.org>
2016-03-23 20:32:20 -07:00
Dhaval Patel
bd80e9f055 msm: mdss: support NRT VBIF XIN clients
WB interfaces' fetch XIN clients are connected to
Non-RealTime(NRT) VBIF on certain MDSS hardware. DMA
line mode fetch is connected to RealTime(RT) VBIF
while block mode fetch is connected to NRT VBIF on
such hardware. This change upgrades the driver to
support such MDSS hardware with NRT VBIF by updating
respective register space. It also selects RT vs NRT
VBIF client for DMA pipe based on operation mode.

Change-Id: Ia1680c2748ec0c9ef521df010ecfbcec78f5114f
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:32:19 -07:00
Ingrid Gallardo
38c37b872d msm: mdss: Tune watermark and prefill BW based on minimum SMP bytes
Modify watermark levels and prefill BW calculation
to be set based on the minimum prefill buffer bytes from
the SMP. Add debugfs property to dynamically tune the minimum
bytes for debugging.

Change-Id: I3af1e3468eaab56d3a8eea5fe456d7af547d3244
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:32:18 -07:00
Benet Clark
614d1d808d msm: mdss: Remove pwm_disable from backlight pwm driver
The PWM implementation has been reconfigured so that pwm_enable only
needs to be called once for the life of the MDSS driver. The new
implementation allows the driver to call pwm_config in order to change
the backlight without needing to disable and enable. The backlight PWM
driver is disabled when the panel is turned off, and reenabled when the
panel comes up.

Change-Id: Ieba05921b53eb1cf686aaa2751f9cc3650522bb7
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:32:17 -07:00
Prashant Nukala
63203b502e msm: mdss: enable support for flipped panels
Add support for panels that are mounted in flipped
orientation. Supported orientations are horizontal
flip, vertical flip and both.

Change-Id: I648c276edd739562b36b264efd296ecad4b424dc
Signed-off-by: Prashant Nukala <pnukala@codeaurora.org>
2016-03-23 20:32:16 -07:00
Dhaval Patel
a099b48af2 msm: mdss: select mixer respective to ctl path for wb
MDSS driver reserves initial ctl path for primary display
for reduced wb interfaces. It uses rest ctl path for
other displays. Follow same allocation for mixer
path also.

Change-Id: I1bb079ae9a916a0addcb7ca8b16e4853f1bcab6a
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:32:16 -07:00
Terence Hampson
b85673f1e3 msm: mdss: Fix check for highest of overlap and prefill bw calc
This check is supposed to be used to get the max between overlap and
prefill bandwidth value. This value is used when calculating the ib
bandwidth value to request when bus bandwidth is updated. Having a value
that is too low results in mdp underrun.

Change-Id: Ie1302737f004d8e030f8d61c75d4301fe99b1069
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:32:15 -07:00
Aravind Venkateswaran
c1bf05b92a msm: mdss: reset cont splash screen flag after notifying panel intf
Starting with commit a702d63198e3524740be22b66ce1933064174019, the
continuous splash screen feature flag for the secondary panel was also
disabled along with that of the primary panel. However, this should only
be done after notifying the interface drivers about the transition from
the splash screen to the boot animation. This is needed as the DSI panel
driver relies on this flag to avoid unnecessarily configuring the DSI
lanes in to the ultra low power state during this transition.

Change-Id: I59d312248c579d27913f23dc23e9c91a99549725
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:14 -07:00
raghavendra ambadas
d86e4c96c1 msm: mdss: Handle wfd READY event in display commit
Flicker is seen on wfd while rotation is done.
To prevent this, shared lock should be acquired properly
in case of READY event for wfd in display commit thread.

Change-Id: I0803eeb4d4f1d6283a6addaf40c435fded538718
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
2016-03-23 20:32:13 -07:00
Aravind Venkateswaran
9c1ac683f6 msm: mdss: update DSI ULPS exit sequence
When MDSS idle power collapse feature is enabled in conjunction
with the DSI Ultra Low Power State (ULPS) feature, it is possible
that the MDSS GDSC can be turned off once the DSI lanes are in ULPS
mode. When ULPS mode is subsequently exited, the DSI controller
should be reset prior to executing the DSI ULPS sequence so that
the exit sequence conforms with MIPI D-PHY specifications. However,
this could sometimes lead to DSI lanes not being in the stop state
after exiting ULPS leading to DSI command transmission failures.
To address that issue, force the DSI lanes to be in stop state upon
exiting ULPS.

CRs-Fixed: 696325
Change-Id: I8f4696b89ae19488b5372831f2dc98d2a352c750
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:12 -07:00
Aravind Venkateswaran
9efc565f9f msm: mdss: reset runtime status upon device resume
MDSS is power-collapsed in idle screen cases using the pm runtime
framework. However, it is possible that the runtime PM status may
not match with the post-system sleep status when the device is
resumed. This sometimes leads to the inconsistencies in MDSS
idle-power collapse upon system resume. To address this issue,
reset the runtime PM status in the pm resume handler.

Change-Id: I5696ce6c154f2898b82e70119d3d9a2be79b59b7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:32:11 -07:00
Sree Sesha Aravind Vadrevu
aaaa2ae729 msm: mdss: add support for dedicated hardware cursor
Hardware cursor within mdss from mdss v1.5 onwards is
programmed within the SSPP interface and is no longer
a separate dedicated stage in the layer mixer. Cursor
needs to be staged onto the existing layer mixer stages
and always at the top level available. From this version
onwards, cursors are expected to be programmed through
the overlay interface by the user.

Change-Id: Ia225dd92079e0153e9677ff035cf8531e62d5554
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:32:10 -07:00
Shivaraj Shetty
fe4c3c2f75 msm: mdss: Support for thermal mitigation in mdss
Add support to notify HAL to avoid mdp composition so as to
reduce bw voting and to turn off clock to help thermal
mitigation when needed.

Change-Id: If86f49deae220a2e7ee2db224f010269cbbba7c4
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
2016-03-23 20:32:10 -07:00
Ingrid Gallardo
2e1c47192c msm: mdss: disable bw release from rotator
For rotator path, display driver can release the rotator
bandwidth once the rotator finished processing. In some
scenarios this results in more power consumption since more
interrupts are generated to release the bandwidth.
This change disables the bandwidth release for the rotator path
and add a debugfs node to dynamically enable the feature if
needed.
To enable the bw release for rotator:
echo 1 > "<debugfs>/mdp/perf/enable_rotator_bw_release"
To disable the bw release for rotator (default):
echo 0 > "<debugfs>/mdp/perf/enable_rotator_bw_release"

Change-Id: If147b8fb202edcb389fe85e78f8d61d2a98cef95
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Use debugfs_create_u32 for
enable_rotator_bw_release debugfs]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:32:09 -07:00
Ingrid Gallardo
24f99f22da msm: mdss: Disable bw release for cmd mode panels
For command mode panels, driver can release the bandwidth once
the frame is transferred to the panel and no more processing is
done in the display driver; in some scenarios this results in
more power consumption since more interrupts are generated.
This change disables the bandwidth release for command mode panels
and add a debugfs node to dynamically enable the feature if needed
for debugging purposes.
To enable the bw release:
echo 1 > "<debugfs>/mdp/perf/enable_bw_release"
To disable the bw release (default):
echo 0 > "<debugfs>/mdp/perf/enable_bw_release"

Change-Id: I61670606f1cf52b8d889678e6ffe7d0e911771e7
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Create u32 debugfs for enable_bw_release]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:32:08 -07:00
Ingrid Gallardo
d8d81cf528 msm: mdss: fix null dereferences and overflows
Fix to prevent potential null dereferences and array overflows
in the display driver.

Change-Id: Icb6ee09692406aff994965c683473f006420fe71
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:32:07 -07:00
Benet Clark
11cc9e54b9 msm: mdss: Request max register bus bandwidth for PP LUTs during resume
There are a couple postprocessing features that are LUT based features,
and they require a lot of register accesses to configure the hardware.
During the first resume display commit, when all registers are
reconfigured, if any of the LUT based PP features are enabled, then we
will request maximum bus bandwidth to speed up the accesses.

Change-Id: I17a8c0f563db3a3715c170dbcd5666b0ee567b01
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:32:06 -07:00
Krishna Chaitanya Parimi
44cc5e8027 msm: mdss: Restrict vote for bandwidth by histogram based on dts
Histogram read and histogram LUT writes vote for additional
bandwidth on mdss ahb clocks for speeding up the register access.
This is not required on 8916 and 8939 targets.
Restricting the call for vote based on dts property.

Change-Id: I944e07c80c678ef75bd7e4e0270be6a23becce00
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
2016-03-23 20:32:05 -07:00
Charles Bin
1a99744dc8 mdss: mdp: Fix null dereferences and buffer overflows
Fix potential null dereferences and buffer overflows in driver.

Change-Id: Ibce1bb120207e0a54ac9bd53de9952bd6ac8d0fe
Signed-off-by: Charles Bin <cbin@codeaurora.org>
2016-03-23 20:32:04 -07:00
Ken Zhang
9b5df6079a msm: display: set up vsync_retire_handler in commit thread
Setting up vsync_retire_handler needs accessing hardware, move it into
commit thread so that buf_sync ioctl has no hardware related operation.

Change-Id: I646b5fa5f103bf07e409c41842b59ac2ed204c83
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2016-03-23 20:32:03 -07:00
Jeevan Shriram
4c34d85747 mdss: mdp: Add programmable fetch for mdp
Currently, MDP fetches only at the vertical backporch.
All through the vertical front porch, hardware sits idle
doing nothing. Starting from MDP v1.5, hardware has the
capability to fetch at the programmable line in the vertical
front porch.

Change-Id: Ib2482fa610acdfc5cbf944415a344c11f313bc81
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:32:03 -07:00
Jeevan Shriram
eb0fceea87 mdss: mdp: fix incorrect programming of scalar enable
In use-cases where scaling is required in one direction
and not on other, scalar extension parameter will be set
to update the scale register. Add proper check to this enable
scale bit only in the required direction.

Change-Id: I5527f22c83fe456d0124af12516c5bdb240e80a9
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:32:02 -07:00