Flush the MDP and DSI timing registers during variable refresh rate
operation for 8916/8939. Also, there is no need to wait for vsync
interrupt before programming the timing registers due to their
double buffer nature.
Change-Id: Ia349729069bd49f0c40ce41cccefdfb67cafe44c
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
[abhimany@codeaurora.org: minor confict resolution]
[abhimany@codeaurora.org: INIT_COMPLETION fixups]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Shutdown the audio session while booting up if already started
as part of continuous splash screen.
Change-Id: I0db7edba6dd3726721d827c0375574fb77809b93
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Correct the cont-splash-enabled device tree node name as per
standards for dt compliance.
Change-Id: I05779770bea7186800556fa40a918e793d6bf528
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Allow audio playback if secure content is not being played
regardless of HDCP status.
Change-Id: I3b651f95c4097fe187b15d1bb17fbbd2ee20254a
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Currently, when changing the refresh rate dynamically, the same
DSI PLL0 registers get updated as we dont use the PLL1. This
change avoids programmaing of second controller.
Change-Id: I599787f25fe3f197c426e38c0a02fa367ec2732e
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Since DSI status checking is purely DSI operation, it's not
necessary to acquire ov_lock in case of video mode, otherwise
this function could block other overlay functions, therefore
introducing extra delay.
CRs-fixed: 714531
Change-Id: I5051ff3495d516b405cd3bf5dc32ea712187975e
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Add MDSS version check and enable MISR free run mode.
Change-Id: I8a07ff5926eb82f1ac27851d16400570c017485c
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Enable continuous splash screen for HDMI interface
when it is configured as primary. Enable the regulators, clocks
and gpios at probe to vote for them. If resolution change has
happened, power off the HDMI to clean the obsolete resolution
data and setting. If resolution has not changed, do not re-program
same settings for smoother display.
Change-Id: I45e76ffce8f0654673a8fb19b683c783a18e229b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Fix logic to avoid timing engine flush in the first
commit when continuous splash is enabled.
Change-Id: I12b4969e9ec1ca421fa9b72cabbe9fee7d6061fb
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
If there is a video mode controller enabled and other
controllers non-video mode, current display driver apply
the bw fudge factor only to the controller that it is
video mode.
This change will apply the fudge factor to all the
controllers enabled if any of those is video mode to
fix some of the underruns observed in the video interfaces.
Change-Id: I0d01477dc45edbef2a25ccd540aa06b3c43073a4
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
reset the init phase and phase step registers to default
when the pixel extension are not calculated in userspace.
Change-Id: I876f1628fb46901a07deb1b97a4ab55f924612b0
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Cleanup MDP controller and mixer setup in case panel resolution
has changed. The obsolete resolution settings need to be cleaned
and setup with new resolution data for proper display.
Change-Id: I8df3c19cb5e872e05a585ed0d4df2e5c4d0c9624
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
MDPv1.5 and MDPv1.8 has danger safe LUTs and control setting
register under MDP register space. These LUTs and control
settings can be different for each pipe for MDPv1.7. It makes
"panic-ctrl-offsets" configuration also optional for VIG, RGB
and DMA pipes. This change handles the danger safe signal
programming for such MDP version.
Change-Id: Icf0e4a732d7372493d1166579b90a7c2df7ae126
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
With MDSS idle power collapse feature enabled, it is possible that
the runtime suspend callback for MDP device to be called when there are
no display updates. This results in MDSS GDSC to be turned off in idle
screen usecases, and would subsequently be turned back on upon the next
update. However, toggling GDSC can be an expensive operation and should
only be done when it is expected to be off for a substantial time. To
achieve this, enable the runtime autosuspend status for the mdp device.
Change-Id: I6e4127efe7b01d7e164b0763d34995c82c2e8be9
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
The scm library has added support for a new secure world
interface that is more aligned to the ARMv8 SMC calling
convention. Use the new API while maintaining backward
compatibility.
Change-Id: I9edb4fc11982dca2f7bdf76a3075a99f4cbe9990
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Current code assumes when Dual DSI configuration is used that width will
be twice the left panel resolution. This may not always be the case and
should instead look at the configuration to get this information.
Change-Id: I5c2ac608f46d7c0ce1acbffe002d69fca44afaf7
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
When continuous splash is enabled, avoid timing
engine flush in the first commit.
Change-Id: I11e7f86c910aa4dcaea3fcd72ec24cbbea450db2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
In ferrum DSI has an irq line which is different from mdp.
Add support for irq handling this case. It makes use of
utility functions provided by mdss.
Change-Id: Ia6dca1050957f4755b7547f4c1a08ace913c2ac7
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict,
removed IRQF_DISABLED flag]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Change irq interface provided by mdp from exporting symbols to
function pointers. This will help in making mdp3 work with dsi 6G.
Change-Id: I07a2acf56b75a2a6d83c0522d38efe3754bb8765
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
[cip@codeaurora.org: Moved mdss_util.c file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
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>
Add support for ARGB1555 and ARGB4444 formats in
mdp.
Change-Id: I6000316d177d9988eabcca8f43131e3a9f636961
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
enable WB as secondary display when HDMI is configured as
primary panel.
Change-Id: Iffb635bdf4574d66e42c4320b122fde52ad1bf16
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>