Commit Graph

27 Commits

Author SHA1 Message Date
Narendra Muppalla
cea2d1cef0 disp: msm: sde: add macro for default fps
This changes adds macro for default fps.

Change-Id: Ieb1d38bd6fbfcd3fec7e2cc6e39636b6297dd0ef
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-22 13:07:45 -07:00
qctecmdr
1e19ca1adb Merge "disp: msm: sde: trigger pm_qos vote with encoder idle pc" 2020-07-19 08:19:48 -07:00
Veera Sundaram Sankaran
96438460c6 disp: msm: sde: reserve resources on trusted vm usecase start
The MEM & IRQ lend handlers signals the resources
are lent from the primary VM. Reserve the SDE HW
resources in trusted VM using the cont-splash path
and setup the SDE & DRM software states. Set the
DSI connector status to active for the handoff
display during the start and disable it at the end
of the session.

Change-Id: I75b6df735eb5609cc521808aca0ddfb0b3993e84
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-07-16 10:40:52 -07:00
Jeykumar Sankaran
ce532fb486 disp: msm: sde: add trusted UI support for SDE
Extends atomic check to validate TUI transition request aginst
SDE and non-SDE client states. Triggers HW assignment after
making sure current frame is  completely flushed out of HW
pipeline. Initiate the acquire after TUI end after restoring
the software states.

Change-Id: I6ceccd44c18526ff818723b5631b66af3ff083c1
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-16 08:40:28 -07:00
Jeykumar Sankaran
720f9d0014 disp: msm: sde: add VM files for SDE
Add VM layer files to handle VM specific operations
for primary and secondary VM's. They interact with
Hypervisor RM modules to LEND/ACCEPT/RELEASE/RECLAIM
HW resources. They also handle notifications for each
of the above Hyp RM operations to acquire and update
the SDE software states.

Change-Id: I5982f4bf56550dc464797c62cb356be39925b21c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-16 08:38:36 -07:00
Dhaval Patel
5a6facc39e disp: msm: sde: trigger pm_qos vote with encoder idle pc
Commit d46cae019e ("disp: msm: sde: trigger pm_qos vote
with irq enable") moves the pm_qos vote with irq
enable/disable state. Such irq enable/disable call may be
triggered from atomic context and lead to scheduling issues
due to mutex_lock usage in pm_qos APIs. This change moves
the vote with encoder idle pc to allow lock usage with sleep.

Change-Id: I2d22566fbfb5399c5d2d2a4efe882a1928cfbbf8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-07-14 16:26:51 -07:00
qctecmdr
0ea5003877 Merge "disp: msm: sde: parse property for max concurrent TUI displays" 2020-07-10 21:28:17 -07:00
Jeykumar Sankaran
c3389d315c disp: msm: sde: register io resource collection VM event hook
Add support to read register ranges and IRQ lines that needs
isolation during VM switch. Register for vm resource collection
event providing the callback function.

Change-Id: Ie1edf0794a8de89cc44279892433b45a54eba609
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-10 15:48:19 -07:00
qctecmdr
9ec78e3339 Merge "disp: msm: sde: dump clock state before entering suspend" 2020-07-06 23:49:03 -07:00
qctecmdr
b299a0f04c Merge "disp: msm: sde: manage vblank refcount concurrency" 2020-06-28 04:32:57 -07:00
Dhaval Patel
44cde01fc7 disp: msm: sde: manage vblank refcount concurrency
Vblank refcount can reach out of sync with below case
 1. event_thread triggers the vblank_enable
 2. commit_thread triggers the modeset
   2.a modeset resets the vblank refcount with mode_set
 3. event_thread triggers the vblank_disable

Event 2.a resets the vblank refcount and vblank disable
request after 2.a is going to fail. This can be fixed
by avoiding concurrency between mode_set call and vblank
request.

Change-Id: Ibb810ec90e81d63feee443f1c37dd736d5cfac0d
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-06-25 13:54:21 -07:00
Amine Najahi
8479ed7278 disp: msm: sde: dump clock state before entering suspend
Add debug capability to dump clocks before entering pm suspend.
This will help debug invalid register access when clocks are off
during adversarial test cases.

Change-Id: I80d19b751a3b9a1de0cc64699a21a1852d614ced
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-06-22 13:40:03 -07:00
Jeykumar Sankaran
cb4f390241 disp: msm: sde: add helper api to check executing VM
Adds a DT property to indicate trusted VM execution
environment and support catalog parsing for the same.
Add helper API to read the value.

Change-Id: I9194618b6f080119f1f15271a9b3c7edf938ca08
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-06-18 11:28:40 -07:00
Nilaan Gunabalachandran
ebc016b6e4 disp: msm: sde: make all HW definitions unsigned
Treating hw version as a signed int results in a negative
number when major version is more than 7, leading to errors
when comparing versions in the driver. Fix this by making
sure all HW version definitions and variables are unsigned.

Change-Id: Ic77183f85e5408092e05817cf95df5b0f0fcac75
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-06-11 08:36:05 -04:00
Dhaval Patel
d46cae019e disp: msm: sde: trigger pm_qos vote with irq enable
Video mode display keeps the MDP clocks in ON state but
disables irq during static screen to avoid cpu wakeup.
In such case, CPU pm_qos vote should also be removed
to allow LPM transition. This change triggers the
pm_qos vote based on mdp interrupt enable counts
instead of runtime_pm callback. It works for
multi-display concurrency also.

Change-Id: I7a60f3f593e409269e00abd7499c4a5756035615
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-05-27 17:46:07 -07:00
Veera Sundaram Sankaran
7245366343 disp: msm: sde: parse MDSS HW from device tree
Get the MDSS HW version from the device tree instead
of reading directly from the hardware register.

Change-Id: Icfb7a80c8f19312001b070a454741421fd67aae5
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-05-11 12:11:18 -07:00
qctecmdr
d94c7aef02 Merge "disp: msm: sde: add pm QoS vote on CPU receiving display IRQ" 2020-04-12 23:31:30 -07:00
Samantha Tran
e85a88ea01 disp: msm: sde: add pm QoS vote on CPU receiving display IRQ
Add a QoS vote on CPU receiving display interrupt. QoS vote
will prevent that CPU from going into low power mode avoiding
possible interrupt latency. Using irq notifier, display will
receive notification when display IRQ has switched CPUs and
will adjust the vote accordingly. The vote is also removed and
requested whenever display IRQ is enabled or disabled.

Change-Id: I94b4501896b4b20b37deaca90d6b5ff883d56621
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-04-09 22:56:18 +08:00
Samantha Tran
0064a0227b drm/msm/sde: fix race condition in vblank control interrupts
In Dual display concurrencies there are certain cases where
irq_idx and vblank_refcount state mismatch can occur.
To avoid it, during setup of irq_hw_idx, reset the vblank_refcount
and unregister read ptr irq if not yet done by then along with
maintaining global mutex lock for vblank_refcount.
Also, if register IRQ fails, correct vblank_refcount so
that IRQ registration can be tried again.

Change-Id: I06bcbf71c6a43bd161ff61093d9f6063a292d6bc
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2020-03-29 16:54:43 -07:00
Abhijit Kulkarni
dc8e0291e4 disp: msm: sde: move dsc implementation to a new file
This change moves the DSC implementation into a separate file.
This is required to add support for new compression algorithms.
This cleanup change also, moves struct sde_encoder_virt
declaration to the encoder header file.

Change-Id: Idc3b96e65fcce2a7ee6e17af604cec0cb574f6f7
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-01-22 12:30:43 -08:00
Veera Sundaram Sankaran
e4a7d473f9 disp: msm: sde: handle all error cases during sui transitions
During secure-ui, the SMMU, MISR and VBIF states
are altered based on the enable/disable of secure-ui
which is followed by the scm_call. Failure in any of
the steps would lead the system to an unstable state.
Address all the failures and revert back all steps
to get the system back in original state to avoid
any issues.

Change-Id: I736c6cf018c5992ec33806c00e58bf56b818b8a7
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-10-21 11:41:14 -07:00
Ramkumar Radhakrishnan
664d297f98 Revert "disp: msm: sde: Add LTM sw fuse check support"
Reverting the change to check for LTM SW fuse to install LTM properties
during probe since LTM SW fuse is enabled later.

This reverts commit 652b195ba4.

Change-Id: I19b3e04ff7caaad5de896fbcf433c3b1863ac4f9
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
2019-10-10 14:14:43 -07:00
Samantha Tran
ad97f0cf4d disp: msm: sde: revert to previous smmu state upon failure to switch
This change saves the previous state before moving into the transitional
smmu state, during secure-display/secure-camera usecases. Upon failure
to complete the transition, set smmu state to the previous state.
Previously, smmu state was staying in transitional state.

Change-Id: I1a78ddcf6ac1c7ea66c8c2095cd1a6d6160647a1
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-09-04 15:16:27 -07:00
Ping Li
652b195ba4 disp: msm: sde: Add LTM sw fuse check support
Add checks for LTM sw fuse value to only install the LTM properties
when the LTM sw fuse is set to enable.

Change-Id: I6876bfcf12ddb912e7b7a80e07c33108fd4b85b9
Signed-off-by: Ping Li <pingli@codeaurora.org>
2019-07-17 13:03:39 -07:00
Samantha Tran
1ab07a4d7c disp: msm: add changes missing during snapshots
This change ports the missing changes from 4.14 to 4.19
that were missed. It includes changes up until
commit 0f8fb25421ff ("cnss2: Add device version to
SOC info structure").

Change-Id: Idfdfe891f146e389e3c65cc3fc4c98d93220e789
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-06-03 09:07:38 -07:00
Dhaval Patel
a74d2cf7fa disp: msm: add runtime_pm ops support in drm driver
Add runtime_pm ops support in drm driver instead
of direct sde_power_resource_enable/disable call.
It allows drm driver to use runtime pm refcount logic
to track the resources instead of custom implementation.
The change also removes the NRT_CLIENT support from
sde_power_handle code to simplify it further.

Change-Id: Ib14692dca5876703d0a230da2512d731b69b8ebb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-04-24 13:27:48 -07:00
Narendra Muppalla
3709853456 Display drivers kernel project initial snapshot
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.

Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-04-14 22:20:59 -07:00