This change checks max limit while allocating encoders
during display init.
Change-Id: I48736667c2b83f916f09f9e81cb1b24a9fef215a
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
framebuffer support is required in some use cases, so add
framebuffer emulation for KMS driver.
Change-Id: Icf0bbcd59ca430478d2bef4df033988d0338f2bb
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This change adds dt based support for pm qos irq
latency instead of using hardcoded value.
Change-Id: I9f67ed1092eefac193a409773f841350532bc722
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
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>
Since drm smmu device is configured to support only 32 bit addressing,
but IOMMU expects 64 bit addressing configured device. This change
creates a dummy device with 64 bit mask for addressing to map and unmap the
shared memory for any scm call.
Change-Id: If4de87e3402e5ad914563961967f2390adda5cd5
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Add necessary checks during the splash init to check
& execute the splash/ramdump buffer mapping/unmapping
only for the cont-splash use-case. This would help in
reusing the same path for LE VM setup during device assign,
which does not have any splash buffer.
Change-Id: I3ce168c530c7db4b14465efa3fd87889b5f99f5b
Signed-off-by: Veera Sundaram Sankaran <veeras@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>
Add SID setup function to help programming
the SIDs for all the pipes and lutdma xin clients
based on the VM.
Change-Id: Iea598303b480b33de8750e0988129dd5cdfe7572
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
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>
Currently mixer calculation does not take the number of LMs into
consideration when it is greater than 2. This changes adjusts mixer
count for 4LM use cases based on maximum clock and pipe width.
Change-Id: I05631dee3beadaa0d50548282a539835bcb548c0
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Make msm_drm into single module and all child driver
registers and unregisters are handled from parent's
register and unregister respectively.
Change-Id: I017513d1de3b6b25dd5543d7fa7741c0bac1740d
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
sync_state driver disables any resources that
don't have any votes after driver probe is completed.
Move MDSS resource votes to probe so that any resources
that are needed for continuous splash are intact until
the bind of all the components is complete.
Change-Id: I0056bf1ec56bcd6a1b620a81143d4b49d7ea2921
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Store full or partial static image in system cache (L3 cache)
for video mode primary display. Added additional commit to
crtc commit thread to transition to read cache state.
The change also updates llcc APIs to support generic functionality.
Change-Id: I6b2a45da946d7e0e0b326da9d214be3f01a9420e
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
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>
Flush sde crtc event thread before idle notification
to make sure that pending frame count is zero. This
allows sde encoder module to trigger power collapse
during pm_suspend scenario.
Bug: 146848315
Change-Id: Ic65a76273417c567c330e970c97183e5c0f4ad17
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
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>
Add framebuffer destroy immediately following plane cleanup
during secure display transition. Set state's fb to NULL
after destroying to avoid attempting to destroy fb again
during plane state destroy. Previously, framebuffer destroy
is happening after the context is detached while plane states
are being destroyed.
Change-Id: I273ce5b85c30962ea7e0a738a366487c9c85d4df
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
CWB connector is tied to primary crtc along with primary connector.
Avoid using CWB connector power state in determining active crtc,
as it is already done via primary connector.
Change-Id: I35ec95349790990c49b9a63afd6e0f55d23b4887
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Reset MDP ctl path and DSI ctl on autorefresh
disable failure. This will enable the hardware
to recover from the hang.
Change-Id: Ia9acc8573c22e0713179ef4f6ef604caacabfadb
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This change renames the splash region memory node name
to align the node with the advanced bootloader naming
convention.
Change-Id: Idfd666b5e32e5f22ccb677f68155621adfe87a14
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
This change moves the msm_driver power resource initialization from
bind time to probe time. This keeps the resource vote on until all the
devices are bound. This is required since the regulator and clock
sync_state driver will remove the proxy votes as soon as msm_driver
has probed.
Change-Id: Icb0e59e4ff0290ef0c1bd3914d6fdbf99bf5d9fa
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Skip reprogramming some HW blocks during power events to avoid
overwriting settings done by bootloader until we have completely
transitioned out from continuous splash.
Change-Id: I49a4834e22080dffc85f55bca9436bc894353335
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Add a compile time flag for the MST feature that will allow
selectively enabling the feature.
Change-Id: I8bf288277c7af00c3cf254a8c757151559e0a010
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Ramdump node only allocates portion of splash
buffer memory. It should not be within reserve
memory area because splash buffer is already reserving
these pages.
Change-Id: I7caa818b19cb993571e6bf0648a4dfbbc2ad9d71
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change makes the access to sid registers space optional
as for lahaina target hlos is not supposed to access these
registers. Mapping this register space will be done only if
the device tree entry indicates this support.
Change-Id: I4ecefec0fe02c993ca34b55da432612e25eb6783
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Add vbif axi port halt request support before
MDSS core GDSC power collapse state. It is needed
for targets without MDSS RSC support.
Change-Id: I1fbf281c4206ecd4ad1c2d1348a95e002740e2f1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This changes swaps the order of encode initialization between
wb and dsi displays. This ensures that wb encoder is registered
before DSI/DP encoder in mode_list and it allows single CRTC
to loop through WB encoder before other encoder during mirror mode
topology like CWB use case. With existing order of encoder list, CWB
flush is happening after primary commit flush which is causing cwb
failures when there is a cpu latency.
Change-Id: I24d6b4f27271d46e9743d17a624ac7e0930f7474
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This change adds the hooks to enable the active signal override
in power collapse sequence. Active signal override is needed to
disable the clock gating when the power collapse sequence
is running.
Change-Id: I9edaed7960b236b3d0179cb67f9cc2c9b3546c9d
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
As scm_call2 is deprecated, update the secure world
communication.
Change-Id: Id971b2b71af9203340eab892d6a3398dbb943370
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Update the header file path in the code as it has moved to a
new location.
Change-Id: I36a55b91a121b9bb3d89641da1e4e22407f55b68
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
The DRM framework only calls the driver's preclose callback
function if the LEGACY driver feature is enabled. Therefore
strip out this logic as it never gets executed since LEGACY
is not supported for msm_drm driver.
Change-Id: I95474cd5424423ef194faae12f1241698f3e467e
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Since some APIs previously used during lastclose are no longer
exposed to drivers (__drm_atomic_helper_disable_plane, and
__drm_atomic_helper_set_config), make kms a DRM client and use
the drm_client_modeset_commit_force API to do lastclose cleanup.
Change-Id: I543392fe79558a3996e326a0f222793c56d71e4f
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
dmac_flush_range api is no longer avaialable on latest kernel.
Use dma_map_single to flush the scm buffer before switching to
higher execution previlege.
Change-Id: Ia1c18a6ab9a9c80f5f9ce79816d9dbd3777474b0
Signed-off-by: Abhijit Kulkarni <kabhijit@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>
Remove runtime_pm support from rsc driver. RSC driver
does not vote for MMCX. It relies on sde core driver
to keep vote and trigger call. That brings additional
dependency to manage runtime_pm references during
pm_suspend/pm_resume call. This change also updates
the runtime_pm call to manage the pm_suspend in
msm drm driver.
Change-Id: I111771994822c82db53fb6c23e5d942f90fd1af2
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
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>
Add changes to support avr mode config update during
prepare commit which happens before gpu fence wait
for the input buffers.
Change-Id: Ib2cb5b7e1f10501914c003f6cf066b85048f79d4
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>