The 'display->modes' pointer must be set to NULL immediately
after calling kfree on it to prevent potential double-free
vulnerabilities or use-after-free issues.
This change ensures robust memory management by clearing the
pointer to previously freed memory, aligning with best practices
for kernel memory deallocation.
Change-Id: I4fd939bc6ee5f3d9c506f0c311a9400f366e7fd2
Signed-off-by: Vedant Yevale <vyevale@qti.qualcomm.com>
(cherry picked from commit 1d3c5a477ea8f6aca1158209e1b87209c21c61f5)
Currently, panel_init is getting called redundantly from host_ready
and panel_ready for eDP, causing delay in display to come up.
Remove panel_init call from host_ready to reduce the delay.
Change-Id: I73d59e37df7b9d79f132b684bfb862a90935afd3
Signed-off-by: Nilesh Laad <nlaad@qti.qualcomm.com>
Use atomic operations for shared variables to ensure
safe concurrent access from both ISR and task context.
Change-Id: I02d4bde88692d0be7027b158648a3ab8a5704b2d
Signed-off-by: Gopi Botlagunta <botlagun@qti.qualcomm.com>
Use atomic operations for shared variables to ensure
safe concurrent access from both ISR and task context.
Change-Id: I02d4bde88692d0be7027b158648a3ab8a5704b2d
Signed-off-by: Gopi Botlagunta <botlagun@qti.qualcomm.com>
Use atomic operations for shared variables to ensure
safe concurrent access from both ISR and task context.
Change-Id: I72a235007f0b36553f436a900a3e9a91afcd75a4
Signed-off-by: Arpit Saini <arpisain@qti.qualcomm.com>
IOMMU fault handler can be invoked post SMMU destroy
which can lead to use-after-free issue.
Unregister the SMMU fault handler before freeing
SMMU context and unregistering the platform device.
Change-Id: I1cddd4a381f16d650258850a3d012d380fbe5ef8
Signed-off-by: Harini Manikumar <hmanikum@qti.qualcomm.com>
Signed-off-by: Karthik Veeranki <quic_kveerank@quicinc.com>
Non null terminated string from user space can cause out
of bound access issue. Hence added a NULL character
explicitly in name when received from user space.
Change-Id: I6d498f16a59ec2832ddc0951952101859666eacf
Signed-off-by: yadwan <quic_yadwan@quicinc.com>
(cherry picked from commit 7eb70ce3648b8eb8e5340b0bf3c5bb3a7605d811)
Currently, splash_display->encoder is invalid for edp so
_sde_kms_release_splash_resource is not releasing the resources.
ea245e7982 ("disp: msm: sde: Remove pm vote at time of handoff")
partially addressing the issue, but _sde_kms_free_splash_display_data
is not called, resulting in smmu mapping not freed.
Since iommu framework is not aware of this direct mapping through
smmu so any allocations to this iova will fail due to this existing
mapping, resulting in mapping and commit failures.
Populate splash_display for edp so that cleanup of splash region is
proper and revert ea245e7982, which is no longer needed.
Change-Id: I5bd2b0d5996f0f91e4b0cf1e4f78e03feee4afe4
Signed-off-by: Vishnu Saini <vishsain@qti.qualcomm.com>
In case of external bridges, modes are not available for
setting splash_mode. Add support to get modes
supported by the external bridges.
Change-Id: Ib17e17bcf1ec91b582da2e0cf5d648b9c366b292
Signed-off-by: Gopi Botlagunta <quic_botlagun@quicinc.com>
Currently, panel_init is getting executed even when
host is already ready. Handle panel_init such that
it will be called only as part of host ready. Handle
continuous splash case as well.
Change-Id: Id022fed099e1e1a87282c58bead839e68f502098
Signed-off-by: Nilesh Laad <quic_nlaad@quicinc.com>
Signed-off-by: Prahlad Valluru <quic_vvalluru@quicinc.com>
A possible kms NULL pointer access is found during CPU vote for IRQ
when kms isn't NULL checked before accessing structure members. So,
perform kms NULL check before accessing members.
Change-Id: I137759ea0723be8580e9166c983d1ba38f4eb281
Signed-off-by: Jayasri Sampath Kumaran <quic_jsampath@quicinc.com>
(cherry picked from commit 393118f87846d64a10c1d5a32161bcbe012c0667)
(cherry picked from commit 17513cad23c67a11431fdfd77a59d5e207352dbc)
Set parent to xo clock for link clocks,
before we enter suspend, so that framework and hw state are
in correct state, when we exit from hibernation.
Change-Id: Ib0e2ca6ac57aec566171b2f72e2b6822e2d9fde2
Signed-off-by: Venkata Gopi Nagaraju Botlagunta <quic_botlagun@quicinc.com>
dp_parser is only available post connector init, so if parser is
not available get display_type from devicetree itself and remove
redundant code.
Change-Id: I2131a257cb4795f52be1706882dce533baf94600
Signed-off-by: Nilesh Laad <quic_nlaad@quicinc.com>
Add support to limit the maximum resolution that can
be supported on display port.
Change-Id: I2729743f57997302d3f4e3bd01bfad2fd4b23c6d
Signed-off-by: Navjyot SINGH <quic_navjsing@quicinc.com>
Add for eDP display support pluggable and support eDP as secondary.
Change-Id: I25d153282f08b8db21fdad15d3c971f609cdf49a
Signed-off-by: Boyuan Yan <quic_boyuyan@quicinc.com>
Add a check on number of built in displays to avoid
array index out of bounds issue.
Signed-off-by: Nilesh Laad <quic_nlaad@quicinc.com>
Change-Id: I1af626d2f05bf822e02c8e228c28823370d32b4f
For eDP connectors, store brightness setting during
bridge disable and restore during bridge enable.
Signed-off-by: Nilesh Laad <quic_nlaad@quicinc.com>
Change-Id: I04834b86110d9bec40d458f609adb8aeae49b9dd
(cherry picked from commit f76dda607b)
For eDP connectors, store brightness setting during
bridge disable and restore during bridge enable.
Signed-off-by: Nilesh Laad <quic_nlaad@quicinc.com>
Change-Id: I04834b86110d9bec40d458f609adb8aeae49b9dd
Add a keystr into the connector property if wants this
external bridge to support hpd. Userspace can get this
info from the connector, and do hpd support.
Change-Id: I19e8c2684ef054fbd5c5bf5951357edb1b4ea40c
Signed-off-by: Shubham Talekar <quic_stalekar@quicinc.com>
Get the interface number from dsi panel timing node, if no
timing node was set, set the number as ext_bridge_num.
Change-Id: I1f36df6b5780f6eb1ef42e5b260cbdb16ec61c15
Signed-off-by: Boyuan Yan <boyuyan@qti.qualcomm.com>