Commit graph

567461 commits

Author SHA1 Message Date
Tatenda Chipeperekwa
c76b5e3acf msm: mdss: hdmi: check if hdcp2p2 app is present during hpd
Check if the hdcp2p2 app is present every time the hdmi cable
is connected. If the app is not present, then we consider
hdcp-2.2 as not supported on the target. This scenario occurs
on devices that are not hdcp-2.2 provisioned, and with this
change hdmi core continues in non-encrypted mode.

Change-Id: I72ebcc1e6844f46dbbc974efb6ba926948e1bbde
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-03-23 20:46:07 -07:00
Naveen Ramaraj
cc97a775f4 msm: mdss: Use clock safe wrapper for reading DSI hw version
Attempting to read without proper clock votes will result
in a unclocked access leading to a watchdog. Enable only
the DSI BUS clocks instead of all the DSI clocks while
reading the DSI revision register.

Change-Id: Ia83fda764d145e96d2df813379c57cf6529b1c0c
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2016-03-23 20:46:07 -07:00
Terence Hampson
bc9915b818 msm: mdss: validate buffer size is enough for intended use
Make sure buffer size is enough for intended use, as soon as we
acquire buffer handle. Prior to this change validation was done
when mapping the buffer. Failing the validation at this later
point was resulting in a layer update drop, with no clean
way to handle the validation. By validating earlier, request
to commit the frame can fail and client can determine fall back
behaviour.

Change-Id: Ie14317c5d5125d6bd23fedfdbbaa877897f8786b
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:46:06 -07:00
Ajay Singh Parmar
0a6a08aeac msm: mdss: hdmi: separate out hdcp library from hdmi
Define APIs to start or stop authentication from client.
Handle internal states within HDCP library and do not
call HDCP library internal functions directly from client.
Remove unnecessary threads and locks and execute on same
thread as standard requires this to be processed sequentially.

Change-Id: I4cd924fb836e0e01ff1d6eba58d817fe0ca383e1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
[cip@codeaurora.org: Snapshot hdcp.c/hdcp_qseecom.h,
add hdcp Kconfig/Makefile changes]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:46:05 -07:00
Veera Sundaram Sankaran
ca7626f43c msm: mdss: clear fbmem_buf on ion_free
Even after ion_free, fbmem_buf is not cleared and contains
some random address. fbmem_buf is assumed to be mapped, when it
is not NULL, which leads to issues. Assign NULL to fbmem_buf, as soon
as ion_free is done.

Change-Id: I712f64a31c8a555f793ff2dd5fc1dea4771c8d0e
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:46:04 -07:00
Ingrid Gallardo
ecdf76d648 msm: mdss: debug: fix xlog crash during dump
Fix to initialize the nodes added by the panel
data dump to the xlog linked list.
This resolves a crash when runtime dumping
the registers through xlog with the dump
debugfs node:
echo 1 > /d/mdp/xlog/dump

Change-Id: I2a7222bd10e5d5a53b20472fbfbc3db818897515
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:46:03 -07:00
Dhaval Patel
be40fe4f65 msm: mdss: add nrt vbif register dump in xlog output
Add nrt vbif register dump in xlog output along with
realtime vbif.

Change-Id: I4b8b8f31be740dbe4ea0040104e1bdf43ed60eec
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:46:02 -07:00
Terence Hampson
44d7ea6ecc msm: mdss: rotator: validate degree of rotation
Validate the rotation degree in the request matches what has been
configured in the session.

Change-Id: I80080a4ad6417c374f9a0176f06a845aa96a24a4
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:46:01 -07:00
Benet Clark
0067dcdcd2 msm: mdss: Move PP reg bus vote to reg bus voting framework
There is a new framework for MDSS voting on the reg bus. However,
the postprocessing client was never registered, and therefore making
bus requests without the framework. This change moves the PP reg bus
voting to be a part of the MDSS bus voting framework.

Change-Id: I054b102baec0ccae56e7b9faafa8feadf3fc8d7a
Signed-off-by: Benet Clark <benetc@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:46:01 -07:00
Terence Hampson
61a87e1821 msm: mdss: Add client name to register bus client handle
Add debug name to register bus client. This will help debug
issues that involved register bus client.

Change-Id: Ied505e5af9e09ba183c25340e6051214a93bc3d2
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:46:00 -07:00
Vineet Bajaj
d2736ae8fa msm: mdss: unregister wled in case of probe failure
If the DSI probe fails and wled has been registered, then
when the next time probe comes there are failures seen.
Fix this by unregistering the wled in case of DSI probe
failures.

Conflicts:
	drivers/video/msm/mdss/mdss_dsi.h
	drivers/video/msm/mdss/mdss_dsi_panel.c

Change-Id: Ia3fd2fa2b5f5bd446c15bc4c28602846f8540a68
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
2016-03-23 20:45:59 -07:00
Terence Hampson
26ef443158 msm: mdss: rotator: deinterlace layer prior to rotation
Make use of the MDP_ROTATION_DEINTERLACE flag. By using the deinterlaced
flag we are able to properly read in the source layer for rotation.

Change-Id: Ia4198f228188975cfc6b57acecedb153c7234aa4
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:45:58 -07:00
Terence Hampson
cc7c1fe8ec uapi: msm: mdss: add flag to indicate if content is interlaced
When rotation session involves an interlaced layer that is intended to be
deinterlaced by MDP, client is expected to pass in flag indicating rotator
needs to deinterlace content.

Change-Id: I27c009e32cd82e00713c20b3accb2efbe5587344
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:45:57 -07:00
Veera Sundaram Sankaran
483e0f3297 msm: mdss: add xlog to async position update ioctl
Add xlog to log the pipe ndx and layer count during
the async position update ioctl call.

Change-Id: Ic1d381e76d4894550a37210bbc4344dd614ac5fb
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:56 -07:00
Veera Sundaram Sankaran
e7969f16a0 msm: mdss: add additional ubwc data checks
In the current scenario, when the sizes of data plane 0 and
the plane 0 matches, the data plane configuration is skipped
to avoid configuring it all the time. Add additional checks
when we skip the configuration to make sure all the data
planes are configured correctly.

Change-Id: Ife7def6d97933732469c14f053b81da9d7661731
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:55 -07:00
Chintan Pandya
93a0f575cb iommu: Use proper bus for domain allocation in client drivers
When there are multiple IOMMU drivers in the system,
each one will be sitting on different busses. This
way, clients should be choosing the right bus to
declare their domain on. Once and for all, update
all the clients code to use proper bus abstraction
API msm_iommu_get_bus() to get right bus.

Change-Id: I5edf7037e7b1e4af6a559b6aeaa0b6de0976bf35
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
[cip@codeaurora.org: Removed changes to
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c,
drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c,
drivers/media/platform/msm/vidc/venus_boot.c,
drivers/platform/msm/ipa/ipa_v2/ipa.c,
drivers/platform/msm/ipa/ipa_v3/ipa.c,
drivers/platform/msm/msm_11ad/msm_11ad.c]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:45:54 -07:00
Veera Sundaram Sankaran
605d27a6a2 msm: mdss: fix pipe_in_use to check layer extn registers
Previously, only the base mixercfg was used to determine if the pipe
is in use. The extn registers were not checked, resulting in faulty
checks for cursor and any pipe staged in stage6. Fix validation to
include checks for extn registers. And refactor, to get the mixer mask
from utility functions.

Change-Id: Id356fa3255d796abdc596cbfbae6604aa7cf57f0
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:54 -07:00
Veera Sundaram Sankaran
2fba6da0d5 msm: mdss: remove obsolete hw revision checks
Remove all hw revision checks related to REV_200 from
mdp driver.

Change-Id: I31c18b9c91eb93946f777a4b276aec6c999dd337
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:53 -07:00
Ajay Singh Parmar
3a62a31d44 msm: mdss: cdm: check for pixel drop need
Set pixel drop CDM down sampling for the resolutions which
do not support average filtering.

Change-Id: Iee767c95cc584ea5ea039993d284400c7bacfbcb
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:45:52 -07:00
Veera Sundaram Sankaran
ebfddf9b2a msm: mdss: fix dsi hw config string parsing
The dsi hw config is parsed from the string passed from bootloader.
It is parsed based on the delimiter ':', but when a panel is booted
in simulator mode, an additional override parameter prefixed with '#'
is passed from bootloader. Fix the parsing to account for the override
parameter when simulator panels are used.

Change-Id: Id9d7419179048d8b564efbbb8ea238d987d6a83c
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:51 -07:00
Terence Hampson
306dcde24e msm: mdss: Mode switch panel clk ctrl uses dsi clk handle
As of commit be2f6d25bb77 ("msm: mdss: dsi: create dsi clock manager")
dsi clock management was split into two clients: mdp and dsi. Cmd mode
interface uses the mdp client handle and everything else using dsi
client handle. When transitioning from one dsi mode to another, clocks
need to be rebalanced. In order to rebalance properly, mode switch is
required to vote using the dsi client handle. Modified input argument to
MDSS_EVENT_PANEL_CLK_CTRL to allow for client handle selection.

Change-Id: Id54d72de603e2115451a49fed961d01f4440c517
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:45:50 -07:00
Dhaval Patel
ea17353082 msm: mdss: skip software underrun recovery for split display
Commit cb78c355b9225b815302c721b8f410168cba4a84 ("msm:
mdss: Issue ctl sw reset when underrun happens") enables the
software underrun recovery for split display cases due to
hardware limitation. This limitation is not applicable to
8994, 8996 and all upcoming targets. This change skips the
recovery path when hardware supports it.

Change-Id: I09e17bb50749ea5a0ec32ed604adab7126434e59
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:45:49 -07:00
Ajay Singh Parmar
da53655c17 msm: mdss: hdmi: remove phy programming from tx driver
PHY/PLL programming are handled by PHY/PLL driver. Remove any
programming done for PHY/PLL in HDMI Tx core driver.

Change-Id: I2d3a9311d7dc011b292a9fdfcb1424dbb435aedc
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:45:48 -07:00
Ping Li
2653ab2cb0 msm: mdss: Correct AD state in driver
There is one recent change in MDP driver that removes the vsync handler
when device goes to suspend, and this change puts AD into an incorrect
state after suspend/resume. This change modify the AD implementation
to coordinate the MDP driver change mentioned above by adding the AD
vsync back during resume. This change also fix the state resetting
during AD off case.

Change-Id: Ic31a791fa6f8fe5ba731837f8d9808d20e2d31e6
Signed-off-by: Ping Li <pingli@codeaurora.org>
2016-03-23 20:45:48 -07:00
Terence Hampson
c0ae920e8b msm: mdss: fix flicker during DSI mode switch
Resolve regression change I65ca10c2adad21637f8414784986aa15026fd774.
DSI mode switch should not be calling mdss_dsi_ctrl_setup prior to
issuing panel switch commands.

Change-Id: I95eb9768d8bf64251466baaa371d6c12bb699410
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:45:47 -07:00
Terence Hampson
dacb6ec79e msm: mdss: DSI mode switch send dcs cmd with CMD_REQ
Regression in change I532587eaa763499c9d51909937339093cd74a8cf.
During DSI mode change we need to send dsc command with
CMD_REQ_COMMIT flag.

Change-Id: Ibc970c70c974cb020c05780f45341a9a99eb6e30
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:45:46 -07:00
Ajay Singh Parmar
d69648f044 msm: mdss: hdmi: keep a default resolution for edid parser
Reset supported HDMI resolutions list to contain at least
a default resolution on EDID parser initialization and on
each parser call. In corner cases of EDID read or parser
failures, driver should expose a default resolution to
other modules to continue with the HDMI initialization.

Change-Id: I75cb78577d327c0f042238e10379585111d8fd70
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:45:45 -07:00
Ajay Singh Parmar
0b6af59659 msm: mdss: hdmi: reset phy on panel power on
HDMI Tx core can be configured with multiple resolutions with
different pixel clocks. This needs PHY/PLL to be configured
with different settings. Reset PHY/PLL on every power on before
configuring new PHY settings to avoid any PLL lock issues.

Change-Id: I564305730105f3e54fbb504c20cce5b2eb9039b1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:45:44 -07:00
Veera Sundaram Sankaran
85aacadad8 msm: mdss: fix mixer_type assignment in writeback start
Assign and use the correct mixer_type in writeback start.

Change-Id: Iacb0424b1518eec7077d2c053222358cf6a38abb
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:43 -07:00
Chandan Uddaraju
835fff3cfa msm: mdss: dsi: config max_pkt_size only when needed
Currently, we configure max_pkt_size for every DCS read
command. Avoid sending max_pkt_size DCS command for every
DCS read by adding conditional check for the configured
max_pkt_size value for every DCS read.

Change-Id: If2c38794b0383a429f1b2b8f5fa48881bfaed0e4
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2016-03-23 20:45:42 -07:00
Benet Clark
0fd5ebd158 msm: mdss: Sum split-display histograms into left histogram data
For every histogram collect in a split display configuration, a
concatenation scratch array was alloced in order to sum the histograms
of the multiple DSPPs. This change improves performance by removing the
allocation and summing the histograms into the histogram array of the
first DSPP in the split display.

Change-Id: Id07cdfc2175bdce0f3b662daa70a014986f73eb4
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:45:41 -07:00
Benet Clark
d4b6398600 msm: mdss: Remove 1:1 mixer to DSPP assumption in pp mixer setup
Previously, the PP driver assumed that there would be a DSPP for every
INTF mixer. However, this assumption does not hold true for all targets.
This change fixes the errors caused by assuming the 1:1 ratio and allows
all layer mixers to be programmed based on CTL configuration.

Change-Id: I15d03921c9b91212717417296e3a157e97b5113a
Signed-off-by: Benet Clark <benetc@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:45:41 -07:00
Ingrid Gallardo
da496dff5e msm: mdss: add xlog for ecg
add xlog debug messages for early clock gating feature.

Change-Id: Ie05476a4f574b4097ff6ebde849a07cdd1b4fed4
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:45:40 -07:00
Benet Clark
3d2234a344 msm: mdss: Force PP block to match FB device during ioctl
In the postprocessing ioctl, there is a configurable block parameter
which can be used to choose the logical display for the config. However,
the framebuffer device opened for the ioctl should be the display for
the config. Rather than deprecating the block parameter, this change
forces the block parameter to match the FB device used for the ioctl.

Change-Id: I76e100311ff8f3361e9c7b7759de78becd332685
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:45:39 -07:00
Ujwal Patel
adbfeca7b6 msm: mdss: debug: remove 8994 debug bus support to reduce code size
msm8994 is no longer supported on the current code base. Remove msm8994
debug bus entry table to reduce the code size.

Change-Id: Ib6dea2b9add2c083fba213e96afcec88fe741455
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:45:38 -07:00
Ujwal Patel
ed695633cb msm: mdss: debug: enable debug bus dumping during fatal error
Enable dumping of debug bus when fatal errors are encountered which
issues panic to the system.

Change-Id: I8c14b842bf4fe54d5418b123fe7d5ec1e1e59f8f
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:45:37 -07:00
Ujwal Patel
545e5dd497 msm: mdss: debug: reduce default logging when xlog handler is called
During fatal errors, XLOG handler is called which dumps certain
information, address, debug bus, xlog etc., into kernel logs and
other larger information, register dumps, into RAM. Remove debug bus
dumping from kernel logs to RAM and reduce information dumped into
kernel logs to minimal in order to prevent watch-dog bites.

Change-Id: Id21b1eae156ec37f8c0bf42bd51ecbff29d0ab8d
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:45:36 -07:00
Ajay Singh Parmar
9f50eda837 msm: mdss: hdmi: Handle fast HPD interrupts
When downstream device cable is connected and disconnected
very quickly, or connect/disconnect processing takes more time
than expected, HPD state machine needs to be put into right state
to make sure HDMI is subsequently turned ON and OFF properly.

Change-Id: I96fbc454951b6bbf5af05b2b74a04f7ba4ddce11
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:45:35 -07:00
Adrian Salido-Moreno
232dc79d1f msm: mdss: fb: check for empty timings list when initializing modes
While initializing modes, add additional check for empty timings list
and abort generating mode list if empty. Having empty list will lead
to setting an empty mode list, instead of keeping the default created
during framebuffer registration.

Change-Id: Ia03202d82d4e9a639a52e0e1b2ccbbdda3b6fcad
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:34 -07:00
Jeevan Shriram
a9335480c6 msm: mdss: Correct phase step calculations for YUV format
In the current implementation, phase step calculation for chroma plane
is not considering chroma subsample and is reduced to half. This is
incorrect and needs to be reduced to half only when chroma sub sampling
is present. This change corrects the phase step calculations for the
chroma planes.

Change-Id: Ia909f909f699882b863efb17b5dded77e6fdb1b1
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:45:34 -07:00
Terence Hampson
778f349a00 msm: mdss: validate wfd dst formats
Validate wfd destination formats that make use of mdp writeback
interface.

Change-Id: I52b6faee259c4fcde733a96b7cc0b834eebe5ed9
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:45:33 -07:00
Adrian Salido-Moreno
d9f95bd8d9 msm: mdss: fb: fix mismatch between current videomode and modelist
When multiple panel timings are available and enumerating video mode
list, the configuration present in the modelist may differ from the
actual configuration in fb variable info. This may cause issues when
usermode does GET_VSCREENINFO/PUT_VSCREENINFO calls. Fix this by
updating variable info with current timing mode.

Change-Id: Id9d4068bdb4851ffb4bc7e218a0666d1bd64eebe
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:45:32 -07:00
Benet Clark
9e90c6e5e5 msm: mdss: Fix false-positive postprocessing error logs
For HDMI use cases where there are no PP blocks available, there
are currently error/warning logs explaining the same. Rather than
print an error, these use cases should be handled and a debug
log should be printed.

Change-Id: Ib416323b9816e9e7a723058faeb03c43da88f918
Signed-off-by: Benet Clark <benetc@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflicts]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:45:31 -07:00
Veera Sundaram Sankaran
b682d7f559 msm: mdss: fix border configurations for split DSI cases
Previously, all split dsi panels had two panel files and border-right
of DSI0 and border-left of DSI1 was set to 0 and all the kernel
calculations were based on that assumption. Replicate the same
scenario with the new single file panel configs by changing the border
values accordingly while setting the values for each DSI. And, include
the border configs during pipe configuration.

Change-Id: If7f5ed4d71ddc2ca26a8be34566df768b1ed7a13
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:45:30 -07:00
Siddhartha Agrawal
d84d76e2e3 msm: mdss: add support to featurize NULL packet insertion
For DSI6G v1.4.0 and above, DSI controller has support to insert
NULL packets in the middle of pixel data or DMA packets to avoid
HS-LP-HS transitions. Add support to featurize this based on DT
property.

Crs-Fixed: 880973
Change-Id: I36acfe6d27a1d750a5af12c3d136df473abb4598
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2016-03-23 20:45:29 -07:00
Siddhartha Agrawal
3c115aaa2f msm: mdss: add support for DSI NULL packet insertion
For DSI6G version 1.4.0 and above, for command mode use cases,
there is support in MDSS DSI to insert NULL packets automatically
between lines of a frame or High Speed DMA command burst to avoid
HS-LP-HS transitions in the middle of frame/DMA command transfer.
Add support for this in DSI driver.

Crs-Fixed: 880973
Change-Id: I468c2ea602d4c3efa0d8844c843840a15b631a3f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2016-03-23 20:45:29 -07:00
Dhaval Patel
4fe4816a08 msm: mdss: fix race condition between dfps update and stop
Dynamic fps change and video interface stop works in two
different thread. It is possible that video interface move
to stop state when dynamic fps thread is in process of
updating the fps information on the same interface.

This change acquires the stop mutex lock and releases it
at the end.

Change-Id: I94d279ea53acb7daa7b042829c0e31df758a6782
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:45:28 -07:00
Dhaval Patel
821f93981e msm: mdss: fix initial mixer reserve logic for WB path
Commit a5f4c89e2774c070350039e3a9d9349908475a7c ("msm:
mdss: select mixer respective to ctl path for wb") tries
to reserve the initial mixer path for primary display
and use rest of the path for external and WB display.
It does not decrease the number of available mixers
after updating the mixer pool. This leads to invalid
memory access when all available mixers are in use.

Ideally, it should check the number of available dspp
which are reserved for primary display while allocating
the mixer for writeback path.

Change-Id: Ib97291d907dc8261005bca3cd947fd907f90d773
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:45:27 -07:00
Ingrid Gallardo
b76838b44e msm: mdss: fix race conditions when enabling mdp clocks
During the early wakeup event for command mode panels
the enable of power, clocks and restore of the
controllers status happen in a different thread
context. This can cause a race condition with
multiple threads that also try to enable the power
resources and assume that the status of the
controllers has been restored.
Prevent race condition for multiple threads trying
to enable the resources, by making sure that the
complete power on, clocks and restore of the
controllers happen before return from the first
call to enable the clocks. This fixes random ping pong
timeouts observed due above described race conditions.

Change-Id: Ie3607797994a5d4f533c4d4838718b0229e32dc6
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:45:26 -07:00
Ingrid Gallardo
a16cf3827e msm: mdss: fix deadlock during early wake up
Resource control lock mutex should not be held while
driver is waiting for the power work items to finish
since this can result in a deadlock.
Fix this by moving the mutex to only the area that
needs to be protected.

Change-Id: I91c440845a379a1e141178b043ad7adb33989ef2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:45:25 -07:00