Commit Graph

1317 Commits

Author SHA1 Message Date
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
qctecmdr
de02324782 Merge "disp: msm: dp: remove check for peer_usb_comm" 2020-07-15 15:11:45 -07:00
qctecmdr
a995ee8ca1 Merge "disp: msm: dp: cleanup in GKI module unload path" 2020-07-15 04:44:36 -07:00
qctecmdr
e3dc3592ec Merge "disp: msm: sde: don't advertise rotation for virtual planes" 2020-07-14 12:28:45 -07:00
qctecmdr
dba8ecd836 Merge "disp: msm: sde: remove unused output parameter in _get_tearcheck_threshold" 2020-07-14 12:28:45 -07:00
qctecmdr
5e96ba152b Merge "disp: msm: sde: add rev check for shima target" 2020-07-14 09:50:09 -07:00
qctecmdr
8c127fd44f Merge "disp: msm: sde: add support to parse hbb and ddr type" 2020-07-14 09:50:09 -07:00
qctecmdr
99d42df79e Merge "disp: msm: dp: fix compilation issues for dp" 2020-07-14 09:50:08 -07:00
Tatenda Chipeperekwa
5ed32bb41f disp: msm: dp: remove check for peer_usb_comm
Reset the QMP PHY into DP-only mode only when the adapter/cable
connected is not multi-function capable. We remove the
peer_usb_comm check since this flag is not being updated when
the cable is connected.

Change-Id: Iafbdf73b3ef827b757b51bfadfa6fa16b840ac27
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-07-13 18:14:17 -07:00
qctecmdr
6fd5a637c2 Merge "disp: msm: dsi: register io resource collection VM event hook" 2020-07-13 17:20:39 -07:00
qctecmdr
06b7a6feeb Merge "disp: msm: sde: Register display brightness cooling device" 2020-07-13 08:57:51 -07:00
Krishna Manikandan
47e6acb39d disp: msm: dp: fix compilation issues for dp
Add required changes to fix compilation errors
when dp driver is disabled.

Change-Id: I84de1268e5f9a892d838f35e27773566dc82ef03
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 18:30:14 +05:30
Krishna Manikandan
0e257f3325 disp: msm: sde: add support to parse hbb and ddr type
Add support to parse ddr type and corresponding
highest bank bit for configuring UBWC parameters.

Change-Id: I54f79a60f55fd6b146783c8f53fce1bf6c8d8d0a
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 18:09:10 +05:30
qctecmdr
47918b2ba5 Merge "disp: msm: sde: update uidle wd timer load value and fal1 threshold" 2020-07-13 02:05:31 -07:00
Krishna Manikandan
bb7d5f490f disp: msm: sde: add rev check for shima target
Add required revision checks for shima target.

Change-Id: I610263844c280e12b91a8b88781a6b6344415174
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 11:25:00 +05:30
Krishna Manikandan
8303bc2669 disp: rotator: add rev checks for rotator for holi target
Add revision checks required for rotator for holi
target.

Change-Id: Ie35d888d7681c97d681e2b2d6b564e0a7e1f11f2
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 11:23:45 +05:30
Krishna Manikandan
471b1ef0bc disp: msm: sde: add rev checks for holi target
Add required revision checks for holi target.

Change-Id: I27daa66d9af10f90a5432b5698bbdb16d7866c2f
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 10:17:19 +05:30
Jeykumar Sankaran
962fd4faca disp: msm: dsi: register io resource collection VM event hook
Add support to read register ranges and IRQ lines that needs
isolation during VM switch in dsi ctrl and dsi phy.
Register for VM resource collection event providing the
callback function.

Change-Id: I5eae4699b0a97ffed438627ccea855c401b3fbeb
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-12 15:16:32 -07:00
Jeykumar Sankaran
4b27380f07 disp: msm: dsi: reuse continuous splash path for trusted vm
Display in trusted VM works in a handover mode i.e, all
display components need to be initialized by the primary VM
before switching to trusted VM on the usecase boundary.
That makes it a hard requirement for the trusted VM not to
re-program any of the display configuration registers before
it could hand the HW back to the primary VM.

Also, most of the linux framework drivers including pintrl, clocks
are not enabled in the trusted VM.

In order to address the above two limitations and to control the
probe/commit sequences, this change adapts the same path as that
of continuous splash to bypass some of the critical functions
which are identified to be HW intrusive. Based on the DT property
read from SDE handle, dsi drivers will choose to bypass
enable/disable HW state updates when executing in the vm environment.

Change-Id: Ica71c924d189ab65fe3be5b0ac870633e3b749e1
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-07-12 15:00:09 -07:00
Jeykumar Sankaran
ea2fdb01f7 disp: msm: dsi: avoid sharing ctrl hw ops across versions
Avoid sharing and have dedicated dsi HW ctrl ops across versions
even if they are identical. It helps to stub out a specific
version of ops if needed.

Change-Id: Ic14c206b526ebe03dd5f47f62701820e7e542670
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-12 15:00:09 -07:00
Jeykumar Sankaran
e452acf2fb disp: msm: dsi: skip pll clock registration for trusted vm
Trusted VM will be granted access to MDSS HW dynamically on
usecase boundary. As a result, all the attempts to access
HW before the assignment, including the probe time access
will result in Stage 2 faults. This change skips the
PLL clock registration during probe as the clocks will not
be controlled by the VM.

Change-Id: I326f4a775796cd95dcf398449b08f2682e4aca43
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-12 15:00:09 -07:00
qctecmdr
6d1c929a4d Merge "disp: msm: sde: use tracing_mark_write as a node point for sde traces" 2020-07-12 14:50:18 -07:00
qctecmdr
2310f221c0 Merge "disp: msm: dp: update voltage swing and pre-emphasis" 2020-07-11 23:40:50 -07:00
qctecmdr
78d74e3576 Merge "display: msm: sde: Add display cooling device interface" 2020-07-11 17:44:49 -07:00
qctecmdr
dab2d306d2 Merge "disp: msm: dp: fix refcount issues on mst port disconnect" 2020-07-11 12:37:42 -07:00
qctecmdr
9e6d0416a0 Merge "disp: msm: dp: check branch device when adding mst sim port" 2020-07-11 09:42:45 -07:00
qctecmdr
2ea0c06410 Merge "disp: msm: sde: reset crtc power_event on crtc disable" 2020-07-11 07:06:41 -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
b09250d7ed disp: msm: sde: parse property for max concurrent TUI displays
Add support in hw catalog to parse the maximum number of concurrent
TUI displays supported in SDE.

Change-Id: Ic1f4d93afc472c2fa073e1d292ebd1d27e40f4ec
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-10 15:48:37 -07:00
Jeykumar Sankaran
53db678726 disp: msm: sde: expose api to control encoder irq
Expose an API in encoder to control display irq's
when the VM enters and exits TUI use case.

Change-Id: Ic2386dcebfd8a9dd2ce06f068c6daf066a3e885f
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-10 15:48:34 -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
Jeykumar Sankaran
bd60dce87c disp: msm: add io resource collection hook to vm events
When the TUI use case starts, HLOS prepares for sharing the HW
by collecting the register io spaces and IRQ lines from all the
participating subdrivers before the switch. This change
adds necessary hook in the VM event framework, so that
subdrivers can provide their callback functions while
registering for events. It also adds necessary helpers
in the sde io util to parse and populate the IO memory
region that needs to be shared.

Change-Id: I4c0825fa76453a1c1ec421640deff36158d6ef8c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-10 15:47:48 -07:00
Rajkumar Subbiah
202c7e55c8 disp: msm: dp: fix refcount issues on mst port disconnect
MST simulation ports can be removed either through HPD unplug, which
removes all ports on the branch device or through hpd irq, which
removed individual ports. In the current driver, the mst state
on the topology manager is being cleared prematurely. This results
in incorrect port status values being reported when the usermode
queries the status prior to disabling the corresponding displays.
So in its current state, on a HPD unplug, the display is disabled
but the port objects are not cleaned up and new ports are added
on every replug.  On hpd irq, not all references are removed on
the port object and also the connectors are prematurely being
removed from the connector list. Additionally, when the last
port is removed, the mst state is cleared on the topology manager,
which destroys the branch device. Once the branch device is
destroyed, the ports cannot be added anymore and this leaves the
MST driver in an invalid state.

This change adds a new helper to remove the port and update the
connector list. It also moves the clearing of mst state to hpd
disconnect callback where the branch device can be safely destroyed.

Change-Id: I3400006a47cc8ab5876809a19b711e3b26be857c
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-10 17:38:40 -04:00
Rajkumar Subbiah
322e50ae8c disp: msm: dp: check branch device when adding mst sim port
When adding a new MST sim port check if the branch device was
destroyed already to avoid dereferencing a null pointer.

Change-Id: I8e6f82c5a6772a9b85d24feca52368da2027e96d
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-07-10 17:25:14 -04:00
Linux Build Service Account
f04e775ee5 Merge "disp: msm: sde: use new state when checking conn-crtc association" into display-kernel.lnx.5.4 2020-07-10 12:36:48 -07:00
Linux Build Service Account
6db21fc335 Merge "disp: msm: sde: update cwb checks for destination scaler" into display-kernel.lnx.5.4 2020-07-10 12:35:49 -07:00
Linux Build Service Account
026b9de2e2 Merge "disp: msm: sde: fix kw issues in sde driver" into display-kernel.lnx.5.4 2020-07-10 12:35:48 -07:00
Linux Build Service Account
9ce7f98381 Merge "disp: msm: sde: refactor topology group check helpers" into display-kernel.lnx.5.4 2020-07-10 12:35:47 -07:00
qctecmdr
2e0cf27277 Merge "disp: msm: dp: fix potential NULL pointer dereference" 2020-07-09 11:54:56 -07:00
Narendra Muppalla
47638eae8c disp: msm: sde: fix kw issues in sde driver
This change to address use after free and null checks in
sde driver.

Change-Id: Iade91596748b1b867ae959e61fca0f7072eda8f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-09 11:13:01 -07:00
qctecmdr
12017ce26f Merge " disp: msm: dsi: update DSI DPHY and CPHY settings" 2020-07-09 08:51:57 -07:00
Amine Najahi
2d624f6ab8 disp: msm: sde: refactor topology group check helpers
Refactor topology group check helpers into a single
function to remove duplicate code. This change also
uses atomic state to extract topology information
since those functions can be called during atomic
check phase.

Change-Id: Ia262009e0b8fe9fcdeff05e544d2e59be35c9c54
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-07-09 09:40:08 -04:00
Jeykumar Sankaran
99df0d5052 disp: msm: add support for vm event register framework
Besides SDE, other subdrivers may be interested in participating in
the VM switch. This change provides framework for display dependent
drivers like DSI, DP and RSCC to register for various VM switch
event hooks.

The following hooks to provided through msm_vm_ops:
post_hw_acquire: invoked before the first frame push after gaining
                 HW access.
pre_hw_release: invoked after the last frame commit before releasing
                the HW.
check:       check with vm clients for their readiness for HW
             releasing.

Change-Id: I616db04e979f78f76f6f97ee3b068dd348339ab6
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-08 23:14:31 -07:00
Jeykumar Sankaran
cd0ab0f62e disp: msm: sde: fix space between operators
Fix overdue kernel check patch errors by adding needed
spaces between operators in sde_kms file.

Change-Id: I7d734736d26366ac44ea2b66decb2fcf271b4382
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-08 23:13:55 -07:00
Prabhanjan Kandula
4a54016d44 disp: msm: sde: update cwb checks for destination scaler
Current validation checks for cwb are not complete for
destination scaler concurrency. This change fixes cwb
checks to handle wb roi and frame buffer bounds checks
based on tap point and the destination scaler use.

Change-Id: I4a0277fea262621e73459243f60d3018bc475a67
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2020-07-08 22:20:16 -07:00
qctecmdr
5c92c5ac78 Merge "disp: msm: debugfs interface for sde connector to do DSI read" 2020-07-08 13:03:55 -07:00
Tatenda Chipeperekwa
91fbf98537 disp: msm: dp: fix potential NULL pointer dereference
Fix the potential NULL pointer dereference in the callback function
for HDCP status updates.

Change-Id: I57ffc480cc6a8f89db0d18151a07876aeeb8c236
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-07-08 12:02:39 -07:00
qctecmdr
c75b0eb0a0 Merge "disp: msm: sde: fix qos perf for 90Hz panel" 2020-07-07 14:01:31 -07:00
Amine Najahi
1ec61a0b66 disp: msm: sde: use new state when checking conn-crtc association
Currently during CRTC atomic check phase, driver is counting
the number of connectors attached to the CRTC by iterating over
all the connectors available and checking if they are attached
to the CRTC. The current implementation uses the old connector
state, which has an invalid state for the first commit. This
causes the number of attached connectors to always be 0 for the
first commit.

This change extracts the new connector state from the atomic state
and ensures the calculation is done before checking crtc features.

Change-Id: I58d641086f18e8624cbc2d432443323a6a44792e
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-07-07 13:32:28 -04:00
qctecmdr
9ec78e3339 Merge "disp: msm: sde: dump clock state before entering suspend" 2020-07-06 23:49:03 -07:00