커밋 그래프

175 커밋

작성자 SHA1 메시지 날짜
Linux Build Service Account
a8ca469548 Merge "disp: msm: remove use of drm_display_mode vrefresh" into display-kernel.lnx.5.10 2021-01-13 14:23:33 -08:00
Amine Najahi
08358fd857 disp: msm: remove use of drm_display_mode vrefresh
Use of drm_display_mode vrefresh is being deprecated in
upstream DRM framework. Downstream driver need to use
drm_mode_vrefresh API from now on.

This change removes dependency on drm_display_mode vrefresh
and replaces it with drm_mode_vrefresh API in SDE, DSI and
DP driver. In addition, it also modifies drm_display_mode clock
to align with upstream approach where an uncompressed mode clock
is required to match drm_mode_vrefresh API.

Change-Id: Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-01-13 16:08:27 -05:00
Yuan Zhao
73cb7a36c5 disp: msm: sde: remove drm panel callback
For GKI2.0, the old drm_panel_notifier function could not
be used anymore, so removed it.

Change-Id: I858f90d7c39816dc95ab59f88c8988237319eadc
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2021-01-13 12:09:40 +08:00
orion brody
d00d481360 disp: msm: move from drm_mode to msm_mode
Move away from the private and private_flags fields from drm_mode,
as it is being deprecated in latest kernel version. Instead, Add
msm_display_mode as a wrapper to be used in downstream to store these
parameters. Also, store msm_mode in connector_state to be accessed
in commit path.

Change-Id: Ia5bdebe75f00aa15fb7db4dc3a0d50c30894a95c
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2021-01-04 13:18:36 -08:00
Samantha Tran
ee58486c84 disp: msm: move vblank enable and disable to crtc hooks
Upstream now prefers to utilize vblank enable and disable
through crtc hooks rather than drm driver. Remove
calls from kms vblank enable/disbale.

Change-Id: Ic6911838f14f93a0d277b7bdc2c1968270ec25a2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 10:25:06 -05:00
Samantha Tran
2616e57a0a disp: msm: encoder_ids replaced in drm_connector
Commit 62afb4ad425a ("drm/connector: Allow max possible encoders
to attach to a connector") enables additional encoders per
connector through use of a mask rather than encoder ids.
This change updates the driver when looking for an encoder
for the connector to look through the list of all possible encoders.

Change-Id: I69cc7c38cd0a9842ed2f15712feeb3c6b88daadf
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
da5f5ff1ae disp: msm: fix always true/false conditionals
Remove unnecessary error conditionals that are
always true or false.

Change-Id: Ied1041b3165647364b741d3d95edca85039491c2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Steve Cohen
4eff2d1bce disp: msm: sde: use prepare_commit connector callback for DSI
Some DSI panels require qsync on/off DCS commands to be sent in
prepare commit phase. Add the hook for sending these commands
to the panel. If these commands are not present in the panel's
device tree node, it will be treated as a NO-OP.

Change-Id: Ida65512fe0214779dfa848f6c7b33644d3934afd
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-30 14:02:50 -05:00
qctecmdr
69e06f9fd7 Merge "disp: msm: dsi: avoid TE status check based on rechecks count" 2020-11-21 13:13:35 -08:00
Linux Build Service Account
b76d65a7a6 Merge "disp: msm: sde: use drm mode set by user-mode in trusted-vm" into display-kernel.lnx.5.4 2020-11-20 17:17:33 -08:00
Linux Build Service Account
3f6007cead Merge "disp: msm: sde: reset sw state on vm transition" into display-kernel.lnx.5.4 2020-11-20 17:17:32 -08:00
Veera Sundaram Sankaran
643e9c2d80 disp: msm: sde: move vm-ownership check to crtc custom events
Currently all the custom event register/unregister calls are
blocked based on the vm-ownership checks. Avoid this check
for connector events as it has only software updates unlike
the crtc events which directly touch the HW registers. This
allows the connector events to be registered before the first
commit where the VM ownership is obtained.

Change-Id: Id78e365929cb958ead10221b9267f1c1c0406a27
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-19 12:13:17 -08:00
Veera Sundaram Sankaran
e07097c244 disp: msm: sde: use drm mode set by user-mode in trusted-vm
Trusted-vm uses the cont-splash path to initialize the software
states by reading the hardware registers and populating the
SDE & DRM software states. But drm mode cannot be determined by
register reads, so rely on user-mode to get the mode which comes
as part of the first atomic_commit check phase which handles the
transition. The primary-vm user-mode passes the current mode to
trusted-vm through qrtr which is in-turn passed to driver to
set that particular mode.

Change-Id: I4fb86b40b8a0583c8edb539b0a51dcd33de731ff
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-18 17:32:58 -08:00
Veera Sundaram Sankaran
b403c57119 Revert "disp: msm: sde: use mdp scratch register to pass drm mode info"
This reverts commit e8309fcbf5. Removing
the scratch register logic to pass information between the VMs as the
design changed from kernel to user-mode for passing the mode information
through qrtr from primary-vm to trusted-vm.

Change-Id: Ibfa4b0004496f68b272da808e866f5226b02c013
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-18 16:56:50 -08:00
Abhijit Kulkarni
fef65e7b8c disp: msm: sde: reset sw state on vm transition
This change resets the plane and crtc dirty properties on
transition to other VM. This ensures when the VM acquires the
hw again all these properties on the new state are reapplied.

Change-Id: Id95676453eb9ae937b1b22f0e244b47449101cb0
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-18 14:37:04 -08:00
qctecmdr
7a98aa2134 Merge "disp: msm: sde: fix missing error handling in VM ops" 2020-11-17 02:59:24 -08:00
qctecmdr
783f3f8d88 Merge "disp: msm: sde: fix invalid dual-display TVM restriction check" 2020-11-17 02:59:24 -08:00
qctecmdr
dafa11efb1 Merge "disp: msm: sde: fix TUI CRTC selection for dual-display" 2020-11-17 02:59:24 -08:00
qctecmdr
614b3d7589 Merge "disp: msm: sde: bound crts and encoders for TUI displays" 2020-11-17 02:59:24 -08:00
Amine Najahi
622e4a37c9 disp: msm: sde: fix TUI CRTC selection for dual-display
Currently, driver is always querying CRTC-0 to determine if
a TUI session is active or not independently of where the request
is coming from (PVM/TVM) and the display it is intended to. This
leads to an invalid CRTC selection in dual-display use case as
the CRTC must be dynamically selected depending on the display
selection.

This change adds helper functions to dynamically query the
CRTC with an active VM request and uses those helpers in
PVM ops.

Change-Id: I62ef46a1f23bb812287ab1545e444b90eb8f554c
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-16 15:46:15 -05:00
Amine Najahi
84beddbe9e disp: msm: sde: bound crts and encoders for TUI displays
Currently, when starting a TUI session on a secondary display,
user-mode will select CRTC[1]/DSI-2 to initiate the session in
PVM and select CRTC[0]/DSI-2 in TVM to drive the frame. This
breaks existing cont. splash assumption that secondary display
will be using CRTC[1] in TVM session. Instead, driver can inform
user-mode of the possible CRTCs to use for each of the encoders.

This change sets the possible_crtcs variable on both DSI encoders
so that user-mode selects DSI-1/CRTC[0] and DSI-2/CRTC[1] in the
TVM use case.

Change-Id: Ic68f92901e42db80fb97799a05d11b5f3473af97
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-13 14:49:39 -05:00
Amine Najahi
c5648939cd disp: msm: sde: fix missing error handling in VM ops
Fix missing error handling in VM ops and add debug logs
to track DRM objects involved in TUI session.

Change-Id: If021ea5a38235386d6cea0b9ae3f753e9fce654e
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-11 17:01:37 -05:00
Amine Najahi
387cda7632 disp: msm: sde: fix invalid dual-display TVM restriction check
Currently, driver enforces that a TUI session is only happening
on a single display using the number of DSI displays. This check
leads to an atomic check failure for the dual-display use case,
since 2 DSI displays are connected at the same time. Instead of
using the number of DSI display, the validation check should use
the number of active displays.

This change modifies the validation check to use cont_splash_enabled
variable, which contains information about the interface state.

Change-Id: Ie820832df812c37ebff67f6083d6922d32cbd98a
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-11 13:44:19 -05:00
Steve Cohen
e01b1494f3 disp: msm: sde: add traces for lastclose
Add logging during sde_kms_lastclose to know when driver cleanup
is being triggered. These traces are very helpful with debugging
shell stop/start issues.

Change-Id: I00ecc1287a3ee5cc096b7edc3f872e122b7d3fc8
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-06 02:04:46 -05:00
qctecmdr
c7ba46d5bf Merge "msm: sde: prevent illegal register access" 2020-10-28 18:43:29 -07:00
Ping Li
a0ae165cc3 msm: sde: prevent illegal register access
If event register is called from LA VM when the HW is owned by trusted
VM, it will lead to a crash. This change adds checks to prevent illegal
register access when the HW is not owned by LA VM.

Change-Id: Ib4d956fdce4b5aae41e765d7355082c5e233efe2
Signed-off-by: Ping Li <pingli@codeaurora.org>
2020-10-27 16:51:56 -07:00
Veera Sundaram Sankaran
a61f249398 disp: msm: sde: limit encoders attached to crtc during trusted-ui
Add checks to block transition to trusted-vm when multiple encoders
are attached to a crtc. This ensures, concurrent writeback is
disabled before trusted-ui usecase. Additionally, avoid enabling /
disabling the IRQs associated with the cwb encoder during all
the transitions to avoid any unbalanced calls.

Change-Id: I022077018ac9b7dfb62506cfaddcb60cb8b35ed8
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-27 13:18:19 -04:00
Veera Sundaram Sankaran
303c324c43 disp: msm: sde: fix crtc_state iteration during vm release
Iterate over the crtc old/new state and decide which ones
to process by checking the active state of both during
the vm release in error cases.

Change-Id: Iab20e89792c53fb72e0c00f1fa5091616c7afbf3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-23 23:01:33 -07:00
Veera Sundaram Sankaran
26b6ae2d21 disp: msm: sde: fix Trusted-ui state transition check
Fix the checks done as part of the trsuted-ui transition.
Allow full validation to go through whenever the new vm request
or old vm request is not NONE. Split the checks and the vm acquire,
so vm acquire can be done after all necessary checks are over.

Change-Id: I91165010ad110193c2ca3947af8c6504cd259919
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-23 23:01:27 -07:00
qctecmdr
68f4129cc6 Merge "disp: msm: sde: add support for qsync min fps list" 2020-10-19 16:18:30 -07:00
qctecmdr
b267a4e5a2 Merge "disp: msm: sde: fix vblank handling during trusted UI" 2020-10-16 00:13:41 -07:00
Raviteja Tamatam
e5ff0b8f30 disp: msm: sde: add support for qsync min fps list
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.

Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-10-15 12:32:25 +05:30
qctecmdr
c83a1df2b3 Merge "disp: msm: sde: avoid tx wait during cwb disable and reset" 2020-10-14 23:19:14 -07:00
Veera Sundaram Sankaran
9d1eee0817 disp: msm: sde: fix vblank handling during trusted UI
Currently vblank enable/disable events are processed based
on the vm ownership check. Use the vblank helper functions
instead, during the transitions to avoid processing the
vblank from DRM framework level.

Change-Id: Icb2bd569e73d9206a234489a288320fecf631845
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-14 11:06:58 -07:00
Jayaprakash
d1b2e0be42 disp: msm: sde: add verbose evtlogs for debug purpose
Add changes to extend the current evtlogs for ease
of debug purposes.

Change-Id: Ibe136afbf25b8b8decfc06ef3868e3f628df4dcb
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-14 11:19:05 +05:30
Veera Sundaram Sankaran
689f5eb836 disp: msm: sde: fix trusted-ui transition checks
Avoid crtc_state active_changed flag and explicitly check new/old
crtc_state active to decide if trusted vm transition checks are
required. As the active_changed might not be set at this point
in atomic_check sequence.

Change-Id: I142befad68359ae5ee862a1306bdc75531d63e70
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-10-13 15:10:32 -07:00
Dhaval Patel
d9f194e6f7 disp: msm: sde: avoid tx wait during cwb disable and reset
Avoid TX wait during CWB encoder disable and delay
reset call after last CWB frame trigger.

Change-Id: I9f96d522cfe4205e0272b6b3fa9edd409cab3648
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-10-08 21:51:23 -07:00
Dhaval Patel
8d6fea832e disp: msm: sde: delay cwb done wait for last frame
Commit Ifa100424733 ("disp: msm: sde: delay
encoder disable for clone mode") delays the CWB
encoder disable but it is also skipping the CWB
disable flush. That can cause the underrun on dp
display if it uses the same 3d_merge HW block. This
change reverts the portion of original code and
only delays the last cwb frame done wait. It still
keep the last CWB frame done wait as it is if crtc
is also moving to inactive state.

Change-Id: I3461188a35197f2925899ceea7ef705adf00a398
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-30 10:19:23 -07:00
qctecmdr
ffde2ecd77 Merge "disp: msm: sde: populate connector modes during init" 2020-09-24 16:51:56 -07:00
Jeykumar Sankaran
9de6eee40e disp: msm: sde: accept and reclaim resources on user prompt
Currently, trusted VM accepts and releases the resources
on RM notifications.

In cases, where TUI fails to submit the first frame on the trusted
vm, display cannot rely on the teardown commit IOCTL to release the
resources back to primary VM.

To handle scenarios where RM notification drops, the VM's should be
able to ACCEPT/RECLAIM resources without relying on the RM.

To address above scenarios, this change moves the resource handling
calls from notification handlers to user prompt. With this change,
trusted VM will ACCEPT the resource only on the first frame commit and
primary VM can RECLAIM the resources back if the TUI use case fails
or any of the RM notifications fail to deliver.

Change-Id: Iebb1724a7558e52567f8af1a49e38f8adbec88a0
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-09-24 11:24:28 -07:00
Jeykumar Sankaran
a521764b53 disp: msm: sde: populate connector modes during init
When continuous splash is enabled, KMS populates the modes of
a connector during splash config. With TUI VM enabled, this path
will also be exercised by trusted vm for splash handoff, where for
a given display we try to use the same HW blocks configured by
the primary VM.

Since the trusted VM invokes the path under connection_mutex lock,
calling fill_modes will lead to a deadlock. So, move the connector
mode population during init for DSI displays, since the modes are
available for the connector during initialization.

Change-Id: I12f920f4af84b7bccc97a5f5edb5117ada49b960
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-09-24 11:24:03 -07:00
qctecmdr
21a74c8c10 Merge "disp: msm: sde: fix panel early event blank notifier call" 2020-09-21 03:57:31 -07:00
Rajeev Nandan
2103ce58b8 disp: msm: sde: fix panel early event blank notifier call
If trusted vm is disabled, the DRM_PANEL_EARLY_EVENT_BLANK
notifier does not get called because of this touch early
suspend does not happen which leads to continuous touch
i2c transfer failure during suspend.

Change-Id: I6abaacb9f8343eec24d5642f7eda9e7c410fd8b7
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-09-17 13:52:00 +05:30
Yashwanth
4ec0f2a9e8 disp: msm: sde: remove previous pm qos irq vote during affinity change
In the current code during affinity change, irq cpu mask is
being updated without clearing previous pm qos vote. Due to
this, even after entering idle state, qos vote is still
present on other cpus. This change clears previous pm qos
vote before adding another.

Change-Id: Ic0326a09d37d03d5a8b0444362a6f1492993040c
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-14 14:39:00 +05:30
qctecmdr
683bf52ce0 Merge "disp: msm: sde: update crtc check in drm_check_dpms" 2020-09-12 19:19:50 -07:00
qctecmdr
b0775fe9da Merge "disp: msm: add allowed_mode_switch blob property" 2020-09-12 00:11:57 -07:00
qctecmdr
ef551ad4ae Merge "disp: msm: sde: release splash memory using memblock_free" 2020-09-11 16:46:33 -07:00
Raviteja Tamatam
66d9e1e9ab disp: msm: sde: update crtc check in drm_check_dpms
In cases of adb shell stop, connector->state->crtc is
not updated which prevents panel power down
notification to be sent. In such cases updated crtc
from old connector state.

Change-Id: I94f9e5ad469d771cc673123b4e0cc65ea8f4653e
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-09-10 16:34:24 -07:00
Krishna Manikandan
2b492f05d9 disp: msm: add new mode to notify when there is a fps change
Add a new mode DRM_PANEL_BLANK_FPS_CHANGE whenever there is
a change in fps and the power mode remains the same.
This will avoid unnecessary resume operations in touch driver.

Change-Id: Id3d5884ba862c864782636360e3832854464bf65
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-09-10 16:32:41 -07:00
Adrian Salido
fb50dda175 disp: msm: add low power mode notifier
Introduce low power mode so that listeners are aware when
display is going into low power mode. This requires moving notifier
inside sde code to be able to retrieve the low power state.

Change-Id: I8671e86af29c959d97e1b8ad758a07719ffa4bec
(cherry picked from commit c4b15f56dd63d24d6f4482deab2423809c700d7a)
Signed-off-by: Adrian Salido <salidoa@google.com>
[samtran@codeaurora.org: move changes to different file as
downstream use of notifier struct comes from different file]
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-09-10 16:28:22 -07:00