Add a check to make sure that the length of bytes copied
to the destination buffer doesn't exceed the requested
buffer length before calling the copy_to_user to avoid
buffer overflow.
Change-Id: Icd65b9be2791a8a487dfc8d7461aadce61de3f1b
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Sanitize debugfs inputs to only allow access to mdp memory block
specified in dtsi file. This change will allow only one single block
to be read at the time and will avoid accessing memory outside of valid
decode space which can trigger AHB error bus response.
Change-Id: I91b91ac2b31eac4facb0c402c92ed8fcfc01d91e
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Add rgb flag to make sure HDMI customized mode pass
the format check.
Change-Id: I2d1df731bef493e15f83dac569673589e2408c68
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
Currently, the EDID parser adds the formats based on the
parsing of the Video data blocks and other CTA blocks.
However, there is no input validation based on the
HDMI HFVSDB block to check whether the mode advertised
by the sink actually falls in the TMDS char rate limits.
Add this check in the EDID parser to make sure invalid
formats are not added to the list.
Change-Id: I9a8e8f023924421710cf27402be98150554d0271
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This change is done to detach all pipes first before the first commit
proceed, Kernel will have to do the pipe detach when kernel got the first
valid frame and we want to detach all the splash pipes after the LK is
being notified to stop.
Change-Id: I3a599a102286596333a35273e27d8a363f2134b7
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
HDMI display on auto boards has disabled pluggable function
and hardcoded 1080p mode for output. So ddc related function
should also be skipped. Otherwise, some HDCP related error
messages are printed during boot up when accessing ddc.
Change-Id: I0fea0470dd11cc599bc7eb86d7fe3fb4ccf96693
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
Add new remove framebuffer ioctl that simply unreferences the
given framebuffer instead of triggering a shutdown of the CRTC
if the buffer is in active use. This allows the user space to
proactively unref the buffer without triggering an unwanted
shutdown.
Change-Id: Iac06985d069989b28affcf620d4e3feba6d07644
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
Clear the display mode private flags before assigning
the new value. These flags retain the values from the
previous mode set which could be stale in cases where
the mode is different across the hotplugs.
Change-Id: I4bd7021970737e5ae22bade3074d8debfeddc7b3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
SDE connector stores the information related to the HDMI
VSDB and VCDB data blocks. This connector information is
retained till the connector is destroyed which does not
happen across hotplug.
Clear the HDMI VSDB and VCDB related data fields when
the bridge is disabled so that across a hotplug stale
information is not retained.
Change-Id: I4dabfda03a6446f38913ac45d9df2d2ae411a7f0
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Y420CMDB block parsing is too complex and incorrect
in handling cases where more than one byte of bitmap
is present.
Fix this logic to make it more simple and capable to
handle all such cases.
Change-Id: I7aef80f588ec44def000c9f04e1da4c10020699d
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Define common flag for hypervisor platforms and make use of it to:
1. Enable drm/msm-hyp
2. Disable drm/msm
Change-Id: I6eb6a7cd2a1128ed8d2bf6efd96c4829556eb876
Signed-off-by: Camus Wong <camusw@codeaurora.org>
DSI phy state's update should be called by one unique
API, to ensure no operation is missed. Otherwise, the
incomplete operation will bring DSI regulator off error
and trigger device watchdog reset.
CRs-Fixed: 2282416
Change-Id: If8d08f224f713547a4df607f817e21c49bbc4ed6
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
This change initializes variable i and j value to 0 in
dsi_display_prepare() as it was used uninitialized earlier.
Change-Id: I84ed753cfa64a719ec2f1b44a8ef24d5331b0fbc
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
MDP underrun error is being reported to recovery manager as and when they
are detected by the interrupt handler. Since most of the times errors are
recovered successfully and stabilizes and hence we do not need to report in
those scenarios.
This implementation uses a delayed work to figure out if the error is
stabilized. In case if error is still persists then it would be reported
to the recovery manager.
Change-Id: I3509484867d86dc946dd4be856d85de444c0aa60
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
This implementation adds the following support:
1. handle bridge chip error reported by driver to DBA. error reported
to DBA will be send to recovery manager to recover the faulty
bridge chip by performing a power cycle.
2. smmu fault error notification.
3. detection on errors in bridge chip driver.
Change-Id: I86cc491e3cd25fdcf9b998a0d687baba0a06d836
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
Early domain services run on cpu1 in LK, so hotplug
cpu1 once early domain services are finished.
Change-Id: I23b57b8b7460c5740083b27af72251b2fad78ed4
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
HDMI display on auto boards has disabled pluggable function
and hardcoded 1080p mode for output. So ddc related function
should also be skipped. Otherwise, some error messages are
printed when accessing ddc.
Change-Id: I42694b0586dd870e7881b422cd3d6ee960276b17
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Fix the %p format prints with %pK.
Change-Id: I1743bacb76c1db4bfa304146f7d391751b35273c
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Signed-off-by: Navid Bahrani <nbahrani@codeaurora.org>
This implementation facilitates a framework to report and recover the
errors in display hardware pipeline.
Change-Id: Ie4059dd8bcdd83f73b5a5165ae5a8363ae4efb94
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
When splash handoff is enabled, it should skip the hardware init
function. However, the software context should setup properly to
reflect actual hardware state.
Change-Id: I2a69bf5fadab726459e874597022cf5b54503102
Signed-off-by: Camus Wong <camusw@codeaurora.org>
This reverts commit 56902791977fa54fd0c34a7a6ea0c5da78b2334d.
Display blanking or black frames should be requested explicitly
by user space clients and shouldn't be triggered on system
suspend/resume transitions.
Change-Id: Ic0cf5b7b6d97dd118c0a43b81911eb9ee6ed8459
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
This reverts commit b80fa28840.
This change can't guarante the sequence of smmu operation for
early splash case, and more, the commit validity check is
mandatory to avoid potential glitch during display handoff.
So revert this change.
Change-Id: Ic8327dedc1357ed5d8ef6ca490390ce66b7eb986
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Stage 1 translation enablement should be called after
user has finished early mapping for splash buffer.
Origianl sequence will bring potential race competition.
This change can avoid race condition happens.
CRs-Fixed: 2247983
Change-Id: I00ce034c5c54e06a2c1514faca22f9d65aca727f
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
When the split display has preferred control path, the preferred
control path ID should be cleared before searching secondary control
path. Otherwise the search would fail.
Change-Id: Ie2cc1c4d0ec2d162cdcfedbbbef62400e5798bb6
Signed-off-by: Camus Wong <camusw@codeaurora.org>
This feature only works on top of dsi split mode. When
enabling it, DSI output will be swapped.
CRs-Fixed: 2266483
Change-Id: I84a10814e2bec5e229b2a734153e82cb5fac7e10
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
In the split display use case that has two DSPPs, we enabled the caller
to have different global PA value for each DSPP.
Change-Id: Ie19a48229a07e39fe20a5626aa18c065ad9946d6
Signed-off-by: Camus Wong <camusw@codeaurora.org>
Update global PA implementation base on newer kernel revision. Hue,
Saturation, Black/White, Contrast is now go through one internal
API call instead of separate calls.
Change-Id: I9e056f4d68b29bf246c8414e6dff8032f6f9b6c9
Signed-off-by: Camus Wong <camusw@codeaurora.org>
Such validity check will let Android FDR test failed.
This is because kernel has enabled interrupts, and
access registers, but with this validity check, LK also
co-exists with kernel, while it has disabled interrupts.
Hence conflict happens.
CRs-Fixed: 2247983 2258043
Change-Id: I21be9ae2beeaa0bc187aee241572ce530b9bc93a
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Each displays's splash status should be set to false after
splash handoff is done, this will avoid potential display risk
when display output is configured again.
CRs-Fixed: 2251770
Change-Id: I62733cb1bcd52e584766349465047e466f211f82
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Array ilm_pair_mask may use index larger than its size. This change
can avoid the risk happens.
Change-Id: I18b2ae814aa19e6c76884bbe71cdd9ea659ce05a
Signed-off-by: Lan Zou <lanz@codeaurora.org>
Check the number of bytes to copy against the size of the
user buffer before copy to user to avoid buffer overflow.
Change-Id: Ida3f2470b8441010adc30312c12c6d75fdd6ccb8
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
DSI display will have a short blue screen flicker
issue when enabling early splash. This is caused by
the DSI state setting. The patch is to fix this.
CRs-Fixed: 2225630
Change-Id: I69f1d9473827ff5d420f9581e709f37d00b2c2e8
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Signed-off-by: Camus Wong <camusw@codeaurora.org>