Commit graph

566778 commits

Author SHA1 Message Date
Vishnuvardhan Prodduturi
0e9966adb0 msm: mdss: Vote for bandwidth reference count for command transfer
Bandwidth vote needs to be enabled for DCS commands to be sent
during static screen on command mode panels.

Change-Id: I267c910dac9610b230f0138909c0dc8ca5797f11
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2016-03-23 20:33:25 -07:00
Vishnuvardhan Prodduturi
1b119c3f6d msm: mdss: Support ARGB1555 and ARGB4444
Add support for  ARGB1555 and ARGB4444 formats in
mdp.

Change-Id: I6000316d177d9988eabcca8f43131e3a9f636961
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2016-03-23 20:33:24 -07:00
Kuogee Hsieh
25610710af msm: mdss: fix dsi phy strength parameters configuration
The strength settings for DSI phy are configured using two
board specific parameters. Currently, one of those parameters
is not configured for DSI-0 which results in DCS read failures.
Fix this by correctly configuring these strength settings for
DSI-0.

Change-Id: Ibeafe8655137112e7bffba13a1851ce98810bfeb
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2016-03-23 20:33:23 -07:00
Aravind Venkateswaran
d467fdd2db msm: mdss: support mdp idle power collapse only for cmd mode panels
With MDP idle power collapse feature enabled, MDSS GDSC gets turned off
whenever there are no updates sent to the panel which results in all
hardware registers getting reset. These hardware registers need to be
restored whenever on the next udpate. Currently, this restore
functionality is only supported for command mode panels. However it is
possible that there could be additional framebuffer devices that may be
active (such as a writeback device) in conjunction with the primary
panel. In such cases, if idle power collapse happens, then these control
paths may not get correctly restored leading to unexpected behaviors.
Fix this by preventing MDP idle power-collapse when such panels are
active.

Change-Id: I226e72086bb6232ae452a999d961c80f2841f833
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:33:23 -07:00
Dhaval Patel
c05ee5a7cd mdss: mdp: parse memory handle for cont splash buffer
Continuous splash screen buffer is reserved in
target dtsi file for MSM8994 target. FB driver should
parse this memory handle using "linux,continuous-region"
to get the splash screen buffer address and size. This
avoids usage of "qcom,memory-reserve" entry which forces
user to provide duplicate information.

Change-Id: Ice6cddf6c71a2de9adf15a763434a310e07a3da6
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:33:22 -07:00
Ujwal Patel
67ac4262d4 msm: mdss: fix watchdog bite due to ping-pong timeout log flooding
Most likely root cause of ping-pong timeouts is a pipeline hang in the
display controller. These pipeline hangs can happen due to bad frame
configuration and if this bad configuration persists every frame then
ping-pong timeouts will flood the console with warning logs and may lead
to watchdog bite. Fix this by reporting ping-pong timeout only once every
bad configuration.

Change-Id: I1dc7a729f10e70e2bed947dd72713c0adfe96942
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:33:21 -07:00
Kuogee Hsieh
f9c4def53d msm: mdss: move dcs-cmd-by-left out of partial update
dcs-cmd-by-left flag can be set without partial update being
enabled. Therefore remove partial update checking during
parsing dcs-cmd-by-left.

CRs-Fixed: 698733
Change-Id: I3e81ecc95e80a2d2bc970d8d9350cfc7736d1a29
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2016-03-23 20:33:20 -07:00
Anusha Koduru
8a5e775961 mdss: Fix Writeback CRC time out and HDMI CRC underrun
Use Interface or Writeback layer mixer MISR for Writeback CRC
capture and remove to avoid underrun during primary
and HDMI CRC capture in case of timeout.

Change-Id: I78e51fd28fb0157864a7a350cc652a917cc66347
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
2016-03-23 20:33:19 -07:00
Adrian Salido-Moreno
ea7e2b0481 msm: mdss: ensure rotator work is done before reconfiguring session
When queuing new parameters to rotator, need to ensure that current work
is done before reconfiguring pipe parameters, otherwise there may be a
mismatch on parameters with the buffers programmed once work is
scheduled.

Change-Id: I258aedca82bb10498d0ef4cbaa697a29c3c34a99
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:33:18 -07:00
Terence Hampson
b9b85ba1d9 msm: mdss: Prevent modification to image roi when scaling
If pixel extension is enabled by scaler, and layer content is
deinterlaced, the modifications to the layers region of interest
to be used by mdp hw has already been modified. We should not
further changing these values.

Change-Id: I2c528b54ce07e90b66b56ef008b73b78e4227c9d
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:33:17 -07:00
Sushil Chauhan
605143088e msm: mdss: Do not consider solid fill request in bandwidth logic
MDP_SOLID_FILL request does not require any data fetch on the bus,
so do not consider it in the optimal bandwidth logic.

Change-Id: I7ddfde78d94a42cfeba6aa0af7e805eba95bc699
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
2016-03-23 20:33:17 -07:00
Sandeep Panda
163b13ebfd msm: mdss: send DCS commands in LP mode by default
Recent commit 391a24fe60cd1417a6bb105decddf20cec71e2ef sets
default power mode for DCS commands to HS, because of which
on nt35590_720p video mode and command mode panel suspend resume
fails. So, set the default power mode to LP as it was earlier.

Change-Id: Ifa5090ddc92cc953acc61024d0bdc3d6e93cbb10
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2016-03-23 20:33:16 -07:00
Ingrid Gallardo
7eb6e2eb3a msm: mdss: fix rotator failures when pixel format changes
Current code fails the SMP allocation in the rotator session
when the pixel format during the session changes from YUV to
RGB. Fix these failures by releasing the SMP allocation
if pixel format changes.

Change-Id: Ic051ad4c48be6d4998d392fa74f7b3fb2c131980
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:33:15 -07:00
Aravind Venkateswaran
86660ffa87 msm: mdss: fix DSI clock handling for split display configuration
In split display mode, the clocks for both the DSI controllers are
sourced out of a single PLL (typically the left controller). In the
current implementation, the clocks are independently controlled whenever
the broadcast mode is not enabled. However, it is possible that if the
clocks for right controller alone are turned on, the left controller's
phy could already be clamped, leading to that PLL not getting locked.
Fix this issue by ensuring that the clocks for the master controller
(left controller) are always turned on whenever the clocks for the right
controller (or the slave controller) are turned on.

Change-Id: I941865feef44951efe6c55e632938db79e5596ad
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:33:14 -07:00
Anurag Singh
9fbb70c820 msm: mdss: restore mdss register when clocks are turned on
When MDSS idle power collapse feature is enabled, MDSS GDSC can be
turned off for idle screen usecases. As a result, whenever MDSS
GDSC is turned back on, all MDSS registers need to be restored.
Current implementation restores this as part of bus bandwidth control
API which is only called whenever interface clocks are turned on.
However, the correct approach is to restore the hardware state whenever
any new register programming needs to be done. Therefore, move the
call to restore MDSS state from the bus bandwidth control function over
to the MDSS clock control function.

Change-Id: I85c934b8050b217253be98d9630ef922e76b6216
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:33:13 -07:00
Padmanabhan Komanduru
f14c07db66 msm: mdss: check for validity of ESD thread before scheduling it
Before scheduling the ESD thread during fb_event_callback and
updating the relevant data structures, check if ESD is valid
for that particular frame buffer. This avoids issues during
WFD connect use cases, where the dsi_status_data's mfd structure
gets corrupted with FB1 and leads to target crash during the next
ESD check due to invalid pointer dereferences.

Change-Id: Ia50a0b3c1ee74c4f574da6960a1b6d1707c3a89f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23 20:33:12 -07:00
Xiaoming Zhou
55ee09727a msm: mdss: disable dsi status check when display is off
There was some racing condition where the dsi status check
thread is called when the display is off.   This makes sure
the dsi status check is not invoked when display is off.

Change-Id: I6865abe23ca7adf918a19499d3839d6664fc29fc
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
2016-03-23 20:33:11 -07:00
Saurabh Shah
26e23d817d msm: mdss: add support for rotator downscale
Add support for rotator downscale, available from 8994. This allows
source data to be downscaled via power of 2 steps, before being
written back to memory.

Change-Id: If42a5a8c9cb336abfc22dc9848c24ec0f54cd878
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:33:11 -07:00
Aravind Venkateswaran
b74ec1b8cc msm: mdss: do not init phy and controller with cont splash enabled
When continuous splash screen feature is enabled, the DSI phy and
controller are configured in the bootloader and left on. In such
cases, we do not need to initialize DSI phy and controller during
probe as it may overwrite the settings and can potentially cause
unexpected behaviors.

Change-Id: Ifdf4579be2a3cd45f71170237e0be193d78dba0f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:33:10 -07:00
Jeevan Shriram
8e30310055 mdss: mdp: print warning only once for prefetch configuration
control setup gets called for every suspend/resume and this warning
message is printed everytime. Hence, print panel's vfp related warning
message only once.

Change-Id: I4deb0d5faafca1f34a35fc37686bb55d8cbe02e5
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:33:09 -07:00
Saurabh Shah
b7d2778f24 msm: mdss: Remove the unused has_buf pipe member
The has_buf was introduced for a special case where buffers may not
be queued to MDP directly. Remove the has_buf variable since it is
not used anymore.

Change-Id: Ie8137991dc771b8b17da1f35d4bbbeb62ae8658b
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
2016-03-23 20:33:08 -07:00
Jayant Shekhar
e53e4604f4 msm: mdss: Ensure pipe are unstaged before destroy
There are corner cases when pipes are still staged after
recovery sequence is over in overlay cleanup. Due to this
when destroying pipe, if pipe fetch halt tries to halt
the pipe, kernel bug happens and system gets crashed.
Hence, ensure pipes are unstaged before destroy.

Change-Id: If13ca0fce35656ecbc8f3c98e3017ac981dede06
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-03-23 20:33:07 -07:00
Shivaraj Shetty
27d82c4f87 msm: mdss: send panic/robust signal to bimc on ferrum
MDP3 hardware on ferrum has the capability to send panic/robust
signal to bimc based on fill level for DMA_P. This allows bimc
to prioritize the MDP traffic.

Change-Id: I41be85bda5c08cce6495e32fb76f804c816930ef
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
2016-03-23 20:33:06 -07:00
Veera Sundaram Sankaran
0c2205d772 msm: mdss: Fix possible null dereference
Fixed null dereferencing in mdp

Change-Id: I61e49554ea410834336a7f5a7e94db0cc409f594
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23 20:33:05 -07:00
Anusha Koduru
f78c189f1a msm: mdss: support no panel connected scenario for DSI
Add proper bail out and also avoid any commands involving
ACK from the panel.

Change-Id: Id321e1564f32a8b1565d2e735e8af54fb502751e
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
2016-03-23 20:33:05 -07:00
Kalyan Thota
d35f320239 msm: mdss: unmap rotator src buffer after mapping the next buffer
In secure case, when same buffer is queued in multiple
composition cycles we should map it before unmapping it
so that TZ will not clear the buffer content.

In the former case ref count can be zero which can lead to TZ
clearing the buffer

Change-Id: I5aea01f8d2c4330b93319434ced55f816558619d
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
2016-03-23 20:33:04 -07:00
Sandeep Panda
76c82ae2a8 msm: mdss: Don't allow any ioctls during dynamic switch
Don't allow any ioctls like DISPLAY_COMMIT, OVERLAY_SET,
OVERLAY_PLAY when dsi dynamic switch is underway, to avoid
any stability issues.

Change-Id: I66e68e399c1fb31e7b9dcd3a4840d4fe59a58914
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2016-03-23 20:33:03 -07:00
Krishna Chaitanya Parimi
3d8f14bbc7 msm: mdss: Override partial update PP block using ioctl
Partial update when enabled blocks all PP ioctls. There is
currently no subtle way to enable PP. Providing an ioctl
to override the blockage of PP ioctls. This would allow
PP to override the blockage caused due to the default
enablement of partial update.

Change-Id: Ia120caa179bfa0414041bacd80328540f24dd6c8
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
2016-03-23 20:33:02 -07:00
Jeevan Shriram
9e696e5b2c msm: mdss: add support to parse dynamic refresh rate range
DSI panel dynamic refresh rate range varies from panel to panel.
Add support to parse dynamic refresh range from the panel device
tree. If the range is not specified, use the default range from
30 to max panel supported rate.

Change-Id: Iac5adebe187bdc7abd4e82464de81305862df794
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:33:01 -07:00
Ajay Singh Parmar
96833747dd msm: mdss: wb: enable wb when hdmi is primary
enable WB as secondary display when HDMI is configured as
primary panel.

Change-Id: Iffb635bdf4574d66e42c4320b122fde52ad1bf16
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:33:00 -07:00
Jeevan Shriram
fe79ab60a6 msm: mdss: align frame buffer size to PAGE_SIZE
When updating userspace with the shared memory length,
the size of each buffer needs to be 4k aligned for
performance. This is also required to avoid mmap failures
in the case of recovery and other usecases where the
requested size is 4k aligned.

Change-Id: I6e97f9c76ea1aff07572c500f30f888b6e12f9b4
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:32:59 -07:00
Ajay Singh Parmar
cbf7aaa27f msm: mdss: hdmi: get vic from cmdline in case hdmi is primary
In case of HDMI is primary, get the default VIC (Video Identification
Code) from the command line to configure the display pipeline with this
resolution data for continuous splash screen.

Change-Id: I96325045f4af0712d2f68fadf190edcf6d815841
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:32:59 -07:00
Padmanabhan Komanduru
0cdfe89e5b msm: mdss: enable DSI timing register double buffering for 8916/8939
On 8916/8939, the DSI timing registers support double buffering.
Enable the double buffering support and flush DSI registers once
the timing parameters are configured.

Change-Id: I61c0a84f0fc015541fc8e0197e1b9997ebb123aa
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23 20:32:58 -07:00
Ujwal Patel
3f98aca786 msm: mdss: allow unused SMP for targets with high number of SMPs
Currently MDP driver rejects reusing of a pipe if this reuse results
in wastage of SMPs. i.e. VIG0 pipe reused from YUV layer to RGB layer.
In this case, since RGB layer needs only plane0, plane1 SMPs are unused.
This kind of wasting leads to un-necessary GPU fall-backs for composition
when number of SMPs and number of pipes are less. For this reason driver
used to prohibit such configuration. But in high tier chip-sets, there
are enough number of SMPs and pipes are available such that these
transient wastage of SMPs can be absorbed without much impact.

Change-Id: Ia7baec801add81e5c97bded920ae5bdca5083e0b
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:32:57 -07:00
Jeevan Shriram
41dff92a63 msm: mdss: use appropriate api to get length of scatterlist
Moving away from using sg_dma_len() api to be inline with
ion driver, use sg->length for scatterlist length.

Change-Id: I3a33340dc1bda5b24a406c29601aff4d5b2c5748
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:32:56 -07:00
Ken Zhang
c23100278d msm: mdss: hdmi: add sysfs node for audio video latency
Add edid_audio_latency and edid_video_latency sysfs nodes to
report the info extracted from edid. AV sync can use these info
to compensate the difference.

Change-Id: I2b1a3f6c0e2d892be8d41651ea898ce47c9d820b
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2016-03-23 20:32:55 -07:00
Jeevan Shriram
263b07efab msm: mdss: fix bug for validating pixel extension calculations
While validating pixel extension calculations from user space,
validate the over fetch pixels with image dimentions in both
horizontal and vertical directions.

Change-Id: I8e39e89d9ace8e26237b3b23ca375456abd804a1
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:32:54 -07:00
Ujwal Patel
44a78e05e8 msm: mdss: add support to validate pixel extension calculations
If a layer needs a scaling than its pixel extension values are calculated
in the user-space library and passed down to driver. Currently driver
blindly programs these settings to HW without validating for correctness.
This leads to HW hangs and stability issues. Add a proper sanitization
checks for pixel extension and report error back to user-space if any.

Change-Id: I086cf0b23fbccd37a23bb509f067bffdf396c247
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-23 20:32:53 -07:00
Ken Zhang
d9baf4d534 msm: display: hdmi: make CEC work properly after HDMI off and on
When HDMI is turned off, sending CEC will crash the system
and the logical address will be lost. Do not send CEC message
if CEC is not configured. Initialize CEC logical address when
config CEC during turning on HDMI. Return an error when sending
message fails so that HAL can know the result.

Change-Id: I2f5ced4d9be97361665138400bde435916c7373e
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2016-03-23 20:32:52 -07:00
Ajay Singh Parmar
89a614dd26 msm: mdss: hdmi: set av mute on power off
For smoother power off and resolution change, set av mute during
power off.

Change-Id: I96e2a9647f42c033acbab72e87593ef6fdedfbc0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:32:52 -07:00
Ajay Singh Parmar
3f6d6aba40 msm: mdss: hdmi: do not timeout on hdcp re-authentication
Keep re-authenticating until successful as sinks may choose
not to issue HPD while switching HDMI ports or powering on/off
which usually trigger HDCP on/off.

Change-Id: Ib4b13592df8753df1693c6279f04fc963ba9974f
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:32:51 -07:00
Ajay Singh Parmar
aecb49dd9b msm: mdss: hdmi: support for mutliple adb
Some sinks may have more than one audio data block (adb).
Add support to parse more than one adb.

Change-Id: Icf324c2e8b6fbd3817bcdb54a62eb0af17996fa4
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:32:50 -07:00
Ajay Singh Parmar
cf8575a1b8 msm: mdss: hdmi: proper audio channel numbers
add proper audio channels numbers for odd number of channels

Change-Id: Ic07c213102efe61505b16e4b692a2d1d32eb72c3
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:32:49 -07:00
Shuo Yan
8122b1926d msm: mdss: add LP/HS mode DCS CMD support to MDP5 targets
LP/HS mode configuration for DCS Commands in currently not
supported on MDP5 targets. Add the required support to meet
all panel requirements.

Change-Id: Ib31ddc02f151033a59d6297c8f1a4f8897378947
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
2016-03-23 20:32:48 -07:00
Jeykumar Sankaran
23f368710e mdss: mdp: Add mdss version macro for 8992 target
Add mdss version macro for 8992 target and initialize maximum
blending stages supported for the target.

Change-Id: Ic741fb725907498791c1d17581561e3632a40cec
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2016-03-23 20:32:47 -07:00
Benet Clark
65555dccaf msm: mdss: Switch order of histogram completions when disabling hist
There are two completion structures associated with the histogram. When
hist is being disabled, we complete_all() these structures to unblock the
waiting threads, however the completes were not done in the same order as
the waits.

Change-Id: I0dc39d56db9b4f141b619ae41f2c896d2e84c882
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:32:46 -07:00
Jayant Shekhar
de1b8eea12 msm: mdss: Move iommu attach after overlay start in pan display
IOMMU page faults can happen if iommu is attached in pan display
if continuous splash is enabled as splash fetches from physical
memory. Splash cleanup is performed in overlay start and hence
move iommu attach after splash cleanup is done.

Change-Id: I703c925f964527f33108a3a09ee1ffdc0a3003cd
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-03-23 20:32:45 -07:00
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