This change disables the border color on the layer mixer,
based on the caller's request. This is required to totally
disconnect the layer mixer hardware when it is not
participating in blending the pixels. Having empty blendstage
but border color enabled, allows Layer mixer hw to produce
border pixels even when blend stage is empty.
Change-Id: I8e84aeedffbd42ad793a167a6cc5a3a653864c1a
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Mark LTM as dirty when dest-scaler is updated so it matches with
the mixer configuration.
Change-Id: I5f2b166ec5eb0bafc4c75f8b3268c3e85c558191
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
As per current design misr enable sequence is happening at
atomic check level. At this state, misr configuration may reset
if clocks are enabled through atomic commit sequence. This change
moves misr enable/disable sequence from debugfs context to
encoder kickoff to avoid misr register reset with idle pc.
Change-Id: Ia4faa200f96b76ba8c7ef3f45a26108e34b5e687
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This change add right only pu support by allowing the dsc to be
flushed when one of the dsc is getting disabled. Since the crtc
swaps the mixers in case of right only partial update, this change
fixes the active display mask passed to encoder so that always the
left only dsc gets programmed. This change also fixes layer mixer
configuration where only one layer mixer is driving the partial
update, the other mixer's configuration is disabled.
Change-Id: I2dd2e9a347797bfe07c90e0ca7f999d151fba933
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Add handoff implementation for color processing features when switching
from primary VM to trusted VM.
Change-Id: I9c3a168f70f3981e912bf37533f212880ab30924
Signed-off-by: Ping Li <pingli@codeaurora.org>
Connector state in crtc_atomic_check is still the old state, use
connector_mask to update the actual connector in the list to fix
zero connector issue.
Change-Id: I91541063acbb19beced3004a030c7f27abf9ee50
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
In current SDE driver when misr is enabled, for each commit in
encoder kickoff stage misr is configured for both lm and interface
misr blks. This can clear misr data before client could collect misr.
This change avoids misr data clear and configures misr based on
user input.
Change-Id: I85fc19c78afc6d01346219250c82f2ada824eb0d
Signed-off-by: Narendra Muppalla <NarendraM@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>
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>
Reset the power_event handle to NULL after unregistering
during crtc disable. This will avoid dangling pointer
being accessed later.
Change-Id: I73044835e8594b776eb593f2f0a4a1d2b5563531
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Existing idle notify schedule logic tries to schedule
this event before display power on. If display power on
takes more than 80ms, it triggers the idle notify before
processing first display power on frame. This patch
schedules the idle notify after frame trigger for
valid notification.
Change-Id: If94108e141b5c19d123033e9d37333e98fb987f7
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Add a CRTC property to request the VM to acquire/release
HW resources.
Display driver in trusted VM boots up without HW ownership. Set
the default value of the property as RELEASED to handle resource
assignments.
Change-Id: Iea651a2fea902d95d4b954052af4ef016af15a91
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Allow caller to specify the default value of the enum
property while installing with msm prop layer. It is
not always the case that the default value to be the
first entry.
Change-Id: Ie0bb1ad7479e3e07810b3d817fdf618b1935858c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Rename the property to qseed_sw_lib_rev to indicate that it
represents the qseed sw library revision that is compatible with
the targets qseed hw version.
Change-Id: I5a588dc20cf4a4f76f5c71301538bfc630ea220d
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Enable dim layer event log to know the composition of all
blend stages in a commit from xlogs.
Change-Id: I387fd888f06f0c61d2042896459119d614b3f60b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
In current driver if client did not reset system cache
crtc property, system cache write state is on forever and
breaks the system cache feature. This change restricts
entering into cache write state only if it's commit right
after idle notify. This change also adds event logs to
capture system cache feature state changes.
Change-Id: Ie46fc9113f752ed8989dab99301690a13003b00b
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
This change allows the configuration where virtual plane is
staged without staging the corresponding master plane. Hw allows
such configuration and additionally during shell stop cases,
framework removes each staged plane one by one which requires
this configuration to be supported.
Change-Id: I85ce571dbbc148c069c2cf35cba55ad740d52b5d
Signed-off-by: Abhijit Kulkarni <kabhijit@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>
Add smmu cache hint at during the msm gem prime import
to ensure memory is cacheable. Ensure sys cache feature
is added to all sspp, not just vig.
Change-Id: Icc10468ad8d3e7c6aabd437776cde99eb627375a
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This change resets the bandwidth vote after lastclose is called
and all the custom properties are reset. This is required so that
on next power commit when user space driver does not apply any
bandwidth vote, driver applies correct vote. Additionally this
change ensures that aggregate bandwidth vote never exceeds the
max threshold.
Change-Id: I95ca761b381709850b630ecd6647b45968a5041e
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Delete destination scaler dirty bit clearing when crtc
is disabled as well as during duplicate state.
Change-Id: I4b2201c792a6750c060b2d9291d52547d8a81c15
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
Signed-off-by: obrody <obrody@codeaurora.org>
Fix a possible uninitialized variable usage in sde
catalog and a null pointer dereference in sde crtc.
Change-Id: I4299ade65fa7cf5bfc3d60d6d7a368d523286626
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Currently, when runtime_pm_suspend occurs DS property is marked
as dirty invariably if the CRTC allocated the blocks or not.
This causes atomic check failure on CRTCs without DS allocation.
Change-Id: I90287e8e283d2e80aa47627d4aa045040d76b472
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Add plane buffer flag to get the correct aspace during
TUI VM usecase. FB_NON_SEC_DIR_TRANS plane flag is set
by user-mode to indicate S2-only non-secure buffer in
TUI VM. Return the default drm device when SMMU is not
available during get_aspace_device to make the working
seamless with/without SMMU.
Change-Id: I158dc17ba51ff4b2f302d3e7017db8ab3cfe2b84
Signed-off-by: Veera Sundaram Sankaran <veeras@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>
SDE crtc module can trigger idle notify for video
mode display by updating existing scheduled work
instead of cancelling and rescheduling it.
Change-Id: I1c4b93a3701bbebe0487c4a0da35aff586315398
Signed-off-by: Dhaval Patel <pdhaval@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>
Increase the maximum number of mixers per crtc to 4 to
support 4LM use case. This change also increases the number
of data path to 4 to support 4LM in continuous splash handoff.
Change-Id: I4655017dcb405fad69513bebb8fd7f848fc5873d
Signed-off-by: Amine Najahi <anajahi@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>
Setup blendstages is done per LM but FETCH_PIPE_ACTIVE is per CTL.
Overloading mixer blendstage setup with fetch pipe logic can lead
to HW programming errors. Refactor the logic for setting
FETCH_PIPE_ACTIVE by adding a new op that allows caller to provide
a bitmask of all pipes required to be active on this CTL. This new
logic includes support for:
- 4LM use-cases, staging pipes for all LMs within a CRTC
- Demura fetch-pipe without need for tracking via active_cfg (removed)
Also, lower the cyclomatic complexity in setup_blendstages by moving
the logic for obtaining the mixer config settings in to a helper
function.
Change-Id: I2907b359ffad5734be5b06f44919b5ddb1ef3f7c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>