The last commit in primary-vm before transitioning to
trusted-vm during trusted-ui usecase will be NULL
commit for video mode. In the current splash path,
rm reserve during cont splash res init will succeed
only if there are sspps staged on the mixer. Avoid
this check for vm handoff usecase.
Change-Id: I9829c66f8eb856cc009edc35e489bc9adad1c5d7
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
To avoid use after free issues this change gets latest rsvp_next pointer
in poll timeout scenario.
Change-Id: I4bd4ce1ce9d4f5f2df0e814ceb8babe544578fc6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Add changes to reserve dsc blocks by routing even numbered
dsc encoders to even pingpong blks and odd numbered dsc encoders
to odd numbered pingpong blks.
Change-Id: I9242b3f7a2784194f9e4a7d30eff6ae3ec16b196
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Use sde_connector_state_get_topology API instead of
drm_atomic_get_connector_state since the latter can
return a blank connector state if not found in
global atomic state.
Change-Id: Ib5b58c6cab438a367a885308341d6bccc624f777
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
This change updates split display flag for ctl v1 topology
table since it is not required for CTL_ACTIVE targets.
Change-Id: Ic669cb6f2c1ca60b2299ebb59a8132a5177ad133
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@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>
During back to back mode set, current driver logic fails
atomic check during resource allocation with test only if
previous commit also with modeset, has tagged resources for
allocation but did not commit the resources yet. Since client
invoking atomic check before previous mode set commit complete
is an expected scenario now, instead of failing atomic check,
this change allows resource allocation for next commit also go
through by pollong till the first mode set is complete.
Change-Id: I1261b7d205bb0d886085664fab3664162a419c99
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Currently during rm_release, drm_conn is available only if connector
and encoder are bound together. If a test_only commit occurs
before a non-blocking modeset commit, this bound is uncertain.
The resources allocated by test_only commit will not be released
and leads to resource allocation failures for the consequent
commits. Add changes to modify this by checking for the encoder
attached to sde_connector which happens during bootup.
Change-Id: Icb1d9595efda8a104ba527175b2dbc6a2c856d44
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Add support for all 4LM topologies in new DCE encoder framework.
This change also aligns with the new way of checking topology
information.
Change-Id: I5358d60634070bdb26059056db884ad4161c073e
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
In some cases like suspend and cwb concurrencies,
the number of mixers in the sde_crtc structure
can become zero. Add support to get the number
of mixers from topology in those cases to
avoid incorrect resource allocation request.
Change-Id: Id9b82e805ff50a107ad06514b4e41c0917abdf33
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Resource reservation of an atomic state should be cleared
irrespective of the state of a display. This change relaxes
the encoder - connector chain up check as this may not be
available during a modeset disable outputs scenario.
Change-Id: I8a51973b7c77787ff19d894458a1b73580b93de2
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Add support for all 4LM topologies in new DCE encoder framework.
This change also aligns with the new way of checking topology
information.
Change-Id: I20785c96569fd07cbd8016d244a7e4c929bfa071
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Reserve LM in the sequence of primary-peer and then
primary-peer again until all required LM are reserved.
Searching sequence will not change for single/dual LM
reservation. For single LM reservation it will return
right after the first primary LM is found. For dual LM
reservation it will return after the first primary-peer
pair is found.
The logic can also work for triple/quad or any number
of LM reservetion and make sure that all the reserved
LMs are in pairs except the last one if total LM number
is odd.
Change-Id: Ia28bb64fedeb43430039775051943d751259a3d2
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Signed-off-by: satbir singh <satbsing@codeaurora.org>
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
When a 4LM topology is used each plane attached to a CRTC
is tagged with a L/R layout value and an offset value
depending on where destination X coordinate lands on the display.
The layout information is used to determine SSPP to LM
pair mapping and local coordinate space.
This change also handles source-split and Z-order
validation checks for planes staged on different mixer
pairs.
Change-Id: I1b20223388e65fc36a8b379ad9df23a277fcd1a5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Add 4LM topology variants in resource manager and in drm
connector topology name property.
Change-Id: I13e6eaafe60037b48d2c9d356f668b69720cbf48
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
This change updates resource topology mapping tables and includes
logic to compare compression types for dsc vs vdc.
Change-Id: I1735edeb07aec8ed0065f84ac0824c58158412f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Currently, compression info passed to resource manager is not
valid in atomic check phase. Also in current design allocation
of msm mode info object is from stack which is huge and causing
stack overflow in continuous splash use case. This change fixes
these issues by moving mode info object to heap allocation.
Change-Id: Ifaf39b3ae59c942da5c00b82c73cb97cdaf500d3
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Add a check to escape the DSC allocation once the requested
number of DSCs has been reached and a pair is not required
for the last DSC allocated. This issue was introduced when
trying to allow for quad DSC, which broke single DSC use.
Change-Id: I4bc368004f92570d588e76ceb832d63fd3bb15d7
Signed-off-by: Thomas Dedinsky <tdedinsk@codeaurora.org>
Reserve DSC in the sequence of primary-peer and then
primary-peer again until all required DSC are reserved.
Searching sequence will not change for single/dual DSC
reservation. For single DSC reservation it will return
right after the first primary DSC is found. For dual DSC
reservation it will return after the first primary-peer
pair is found.
The logic can also work for triple/quad or any number
of DSC reservetion and make sure that all the reserved
DSCs are in pairs except the last one if total DSC number
is odd.
Change-Id: I5b90d54822ce16ef829e7c657c1b14e7a484c65a
Signed-off-by: Thomas Dedinsky <tdedinsk@codeaurora.org>
This change addresses out of range and null checks in
sde driver.
Change-Id: I905d795edf6715aa990dd7bbaf061734e95ddea6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
RM allocated reservations for the ongoing commit are cleared when
there is a delay in ongoing commit scheduling and back to back
prepare comes. This clearing occurs in the subsequent checkonly
commit with modechange property set.
Timeline of the issue:
--> C1 commit check_only + modeset, RM allocated resources
--> C2 commit check_only scheduled before C1 commit with
check_only + modeset, overridden C1 reservations with
its own into rsvp_nxt
--> C1 commit scheduled and RM committed reservations
allocated by C2.
Change-Id: I46cc924fd6515590e32c8e97a82847d2bde97270
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Add changes to commit and decrement only those
hardware resources which are required for the modeset.
Timeline of Commit C1 with CWB modeset:
---> Atomic_check
Primary encoder has allocated required HW resources.
CWB encoder has allocated required HW resources.
---> Atomic_commit
On primary encoder, connector is seamless hence
there is no virt_modeset call.
On CWB encoder, there is virt_mode_set call
and during commit HW blocks there is unconditional
decrement for all the HW blocks with rsvp_nxt.
This change ensures hardware blocks are available during
dp display mode validations.
Change-Id: Ifd9439cfc96e727c3093af5f47802c8367775cd7
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
In atomic test phase DSC Hw block should be allowed to be reserved
without checking the mode information. Mode information is not
available before bridge enable is called and this results into dsc
not programmed very first mode set.
Change-Id: Ia9ec9a3c9387e34a8bb1d98ee6932aef8725bc8c
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Add support to configure the DPU pipeline to support VDC-m
topologies.
Change-Id: Ib8ce9a0eaeaa838759fb09cb2ee164d4765e4989
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Add hardware register set and programming for VDC-m block.
Change-Id: I60ef27b507284521abdd10bb679a85303475ddc3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This change introduces new ctl path api read_active_status to check
if a particular hw block is active or not in the current control path.
This is specially required in continuous splash use case when bootloader
has programmed certain blocks and the kernel driver tries to find
out the same configuration. This is used to ascertain which DSC block
is active in continuous splash case since DSC blocks are not tied to
mixer blocks.
Change-Id: I8dd590aa2dc764bd340727c166e1133ef9ce7af5
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Certain DSC hw blocks only support 444 mode, while others
support both 444 and 422 modes. This change adds support in
resource manager to check the hw resource requirement with
the capability of the block and then reserve the correct
hw resource.
Change-Id: If85beb2f2f25e9eb7f8a8321c94b57878d048369
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Use the DRM APIs for walking the list of connectors. This ensures
the proper locks are taken to prevent possible corruption by other
threads.
Change-Id: Iacdd1c6ad8eab224ceac550e0229489851a09706
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This snapshot change adds downstream support
for drm 5.x+(msm_lahaina branch) linux kernel.
Change-Id: Ia691c95da155a00e449c91a2f1a5b20a8e71aed4
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This reverts commit dbb1a3eee9.
This change causes regression in populating cont splash data for RM.
Change-Id: If239eb921e022fcad54033ae3c7e9e4c3dc54736
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
RM blocks an lm path with dspp from being allocated if a dspp is
not required by topology. This can restrict using all lms to full
availability. LM preference already ensures dspp
assignment is completed to required built in displays.
This change removes blocking conditions.
Change-Id: Ifec6f27d4d10a9ea061780ed5f9e9601b893d5a0
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
In dual display cases when secondary display is resumed first,
primary CTL and LM is selected for secondary path which leads to
invalid configuration. Changes are made to correct the reservation
to select primary CTL and LM for primary connector and secondary
LM to secondary connector.
Change-Id: I6b2a8bedaf46f18bdb28b45ac765f32b26207304
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Correct the splash resource allocation counter for getting ctl
ids as passed from uefi for dual-display usecase for successful
splash-handoff.
Change-Id: Iffb6649073443e3c319077318e009b910ea53416
Signed-off-by: Prashant Singh <prasin@codeaurora.org>
RM does not currently check dsc pairs while reserving, but
this could lead to an incompatible pair being allocated. The
hw restrictions are populated from dtsi and checked during
rm reservation.
Change-Id: If561e2bd64c7643ed9ee71a255242eab84576673
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Track available hw resources using a common data structure in
the sde_rm object and pass available hw resource info to
interface drivers to make informed decisions in preparing
or filtering display modes.
Change-Id: I05649623233b0f531582e8c90d1ef92c7fceded4
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
SDE driver currently does not dump the resource information
when there is a failure with reservation. This change
adds the logic to dump the layer mixer rsvps with
reservation failures.
Change-Id: Idcfb36b25bf8da18a9f6f803ba5de51aaa812334
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>