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>
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>
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>
Add revision checks required for rotator for holi
target.
Change-Id: Ie35d888d7681c97d681e2b2d6b564e0a7e1f11f2
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This change to address use after free and null checks in
sde driver.
Change-Id: Iade91596748b1b867ae959e61fca0f7072eda8f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
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>
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>
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>
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>
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>