提交图

135 次代码提交

作者 SHA1 备注 提交日期
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
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
qctecmdr
1ea1264b80 Merge "disp: msm: sde: update irq enable check during irq affinity notify" 2020-09-09 02:29:19 -07:00
qctecmdr
9f952e6831 Merge "disp: msm: sde: avoid double mmu destroy during mmu init failure" 2020-09-09 02:29:19 -07:00
Yashwanth
638de5f7dd disp: msm: sde: update irq enable check during irq affinity notify
MDSS irq will be enabled/disabled only during post-enable
and pre-disable power events. During idle usecase in video
mode, interrupts will be disabled but not mdss hw irq.
This change uses irq vote count check while adding pm
qos irq vote.

Change-Id: Iae0ea19fbe688d0ee762b5e75f37548ba5671def
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-08 10:21:48 +05:30
Chandan Uddaraju
7ef5f60e6b disp: msm: sde: release splash memory using memblock_free
The splash memory initialized by the bootloader needs
to be released after the first frame update. Add
memblock_free() call to release this memory that was
reserved during the kernel boot.

Change-Id: I2633305528b1767b87273d027b8a939da0cedfc4
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-09-07 18:05:01 -07:00
Satya Rama Aditya Pinapala
03f9c40e7d disp: msm: add allowed_mode_switch blob property
The change adds a new mode property allowed_mode_switch. The new
property is a 32bit bitmask that indicates the modes each mode
can switch to. This change is required to pass the driver mode
switching capabilities, so that user mode can reject any mode switch
that is not supported by the driver.

Change-Id: I76d1733a07a6d57487ba9f461055270d7e60e060
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-09-04 17:58:46 -07:00
qctecmdr
5a5f61466b Merge "disp: msm: sde: add vote for trusted vm splash handoff" 2020-09-04 08:52:18 -07:00
Lei Chen
ad0b79b8d7 disp: msm: sde: do DRM encoder NULL check before waking up display
DRM encoder can be NULL during modeset concurrency, so add this
change to check drm encoder and only wake up display when drm encoder
is available.

Change-Id: I50dd85eb39567aba4895dc19801020d7ead841b8
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-09-01 00:58:45 -07:00
Jeykumar Sankaran
cbaca0039b disp: msm: sde: add vote for trusted vm splash handoff
Trusted VM adapts splash handoff path to acquire the same
set of HW blocks the tui display was using in the primary VM
before switching out.

To use the splash handoff path, Trusted VM should add an
additional vote to the PM so that refcounts will be remain
balanced after the splash path cleanup at the completion
of the first valid commit.

This change adds the needed vote and as a result cleans up
explicit voting from trusted vm commit paths.

Change-Id: I9eb33c364f1dfb4205547a8353f57b73c68b8af3
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-08-26 12:31:22 -07:00
qctecmdr
f1b667341c Merge "disp: msm: add connector API to disable cont_splash resource votes" 2020-08-25 09:23:14 -07:00
qctecmdr
cc3f133167 Merge "disp: msm: sde: update rotator sid value in continuous splash case" 2020-08-24 04:01:01 -07:00
qctecmdr
ead6a35953 Merge "disp: msm: dsi: add parsing logic for panel gpio pins/address" 2020-08-21 12:36:22 -07:00
Yashwanth
38372059b3 disp: msm: sde: update rotator sid value in continuous splash case
This change programs rotator sid value irrespective of
continuous splash since it is not configured from
bootloader. It also handles trusted vm support
to prevent accessing mdss hw register.

Change-Id: I80e286364286457545dfa236d629447241d98f95
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-08-21 19:52:35 +05:30
qctecmdr
57807a5d97 Merge "disp: msm: dp: use base connector properties for mst connectors" 2020-08-20 23:40:52 -07:00
Rajkumar Subbiah
9522cd1382 disp: msm: dp: use base connector properties for mst connectors
When DRM property objects are created, the DRM framework attaches a
dellocator which can eventually free the object when the last reference
is removed from it. The framework can only do this before the driver is
registered. If a property is created after the registration then the
framework is unable to attach a deallocator causing a memory leak during
tear down.

The current DP driver creates a new colorspace property whenever a
new dp connector is initialized. It creates a base connector at probe
time prior to registration. But then it also creates new connectors,
post registration, whenever a new MST dongle is attached to the
topology, causing memory leaks.

This change limits the property creation to the base connector and
attaches the same object to MST connectors to avoid memory leak.

Change-Id: Ib97dc7aac260b4f3f96c1097f58bd276c68501f8
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-17 21:20:04 -04:00
Chandan Uddaraju
35b60f6208 disp: msm: add connector API to disable cont_splash resource votes
The panel regulator votes are added by default during
dsi probe to make sure sync state driver doesn't disable
these regulators for cont_splash use case. These regulator
votes need to be removed when cont_splash feature is
disabled. Add a new connector API to handle this.

CRs-Fixed: 2734419
Change-Id: Ie54c8f246877a042afacddaeae8b90440652116f
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-08-17 16:18:01 -07:00
Veera Sundaram Sankaran
f7fece8238 disp: msm: parse SPMI registers and append to IO lend list
Parse the display peripheral related SPMI SID/Peripheral
mask from device-tree and get the dynamic register range
of these peripherals using the SPMI API. These registers
are appended to the list of display IO ranges that is
lent from HLOS to trusted VM during trusted UI. This would
help in adding restrictions for SPMI registers on HLOS during
the trusted UI use case along with validation of the register
ranges in trusted VM.

Change-Id: I7077dac7962466e845d061e9ccd205f1bc0ce3ea
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-08-17 09:47:28 -07:00
Jeykumar Sankaran
a962ce3f02 disp: msm: sde: expose helper api at VM layer
Add helper API's at VM layer to avoid repeated
VM structure dereferencing in rest of SDE files.

Change-Id: I31ee506adbd12c5452bef15da7c468c87b2c9f96
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-08-14 16:21:14 -07:00
Jeykumar Sankaran
7b50ca2b1e disp: sde: hold an extra PM refcount in trusted VM
pm runtime suspend/resume is not supported in trusted vm since
the power domain is controlled by the primary VM. Hold an
extra refcount on the drm device in trusted vm to avoid pm
runtime calls.

Change-Id: I57c22887eb8b11f8ce318479ca36b84cda385d60
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-08-13 16:40:57 -07:00
Raviteja Tamatam
900ddf4a1b disp: msm: sde: avoid double mmu destroy during mmu init failure
mmu destroy is called in _sde_kms_mmu_destroy as part of
smmu_aspace_destroy. This change avoids msm_smmu already getting
freed at smmu_aspace_destroy.

Change-Id: I00ff2a99295534189ceec7c769cd0a01762408c2
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-07-24 15:21:19 -07:00
qctecmdr
2b8aaf8652 Merge "disp: msm: fix driver unload issues in gki config" 2020-07-24 11:17:20 -07:00
qctecmdr
13f1a4ee8e Merge "disp: msm: sde: add handoff implementation for color processing features" 2020-07-23 13:59:55 -07:00
Linux Build Service Account
87f5eca6e0 Merge changes I63392417,I6ca0188d into display-kernel.lnx.5.4
* changes:
  disp: msm: add trace logs in display early wakeup function
  disp: msm: add support for display early wakeup
2020-07-23 07:38:30 -07:00
Ping Li
98821c4384 disp: msm: sde: add handoff implementation for color processing features
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>
2020-07-21 16:45:38 -07:00
qctecmdr
1e19ca1adb Merge "disp: msm: sde: trigger pm_qos vote with encoder idle pc" 2020-07-19 08:19:48 -07:00
Veera Sundaram Sankaran
e8309fcbf5 disp: msm: sde: use mdp scratch register to pass drm mode info
Use MDP scratch registers to pass drm mode index information
between the VMs. Expose the APIs which LA VM can use to set
the current mode for all active displays before handoff.
LE VM relies on this information to set the corresponding
display in correct mode during handoff.

Change-Id: I4569dd58e953e588bca816ac718335d3f3f7e29b
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-07-16 10:43:50 -07:00
Veera Sundaram Sankaran
96438460c6 disp: msm: sde: reserve resources on trusted vm usecase start
The MEM & IRQ lend handlers signals the resources
are lent from the primary VM. Reserve the SDE HW
resources in trusted VM using the cont-splash path
and setup the SDE & DRM software states. Set the
DSI connector status to active for the handoff
display during the start and disable it at the end
of the session.

Change-Id: I75b6df735eb5609cc521808aca0ddfb0b3993e84
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-07-16 10:40:52 -07:00
Jeykumar Sankaran
f53b6a06ec disp: msm: sde: add VM guard checks for vblank control
Check against the HW ownership before servicing vblank
control requests from clients.

Change-Id: I22544817fde72afa7f668fbc08caa28abe0330ee
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-16 09:22:46 -07:00
Jeykumar Sankaran
ce532fb486 disp: msm: sde: add trusted UI support for SDE
Extends atomic check to validate TUI transition request aginst
SDE and non-SDE client states. Triggers HW assignment after
making sure current frame is  completely flushed out of HW
pipeline. Initiate the acquire after TUI end after restoring
the software states.

Change-Id: I6ceccd44c18526ff818723b5631b66af3ff083c1
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-16 08:40:28 -07:00
Orion Brody
66f04c4716 disp: msm: fix driver unload issues in gki config
Resolves segmentation fault during driver unload in GKI
configuration, caused by repeated debugfs destroy calls.
Also removes redundant unload calls.

Change-Id: I20a8efc1916b9a60766f9c7714a4b458aa518566
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2020-07-15 12:26:08 -07:00
Dhaval Patel
5a6facc39e disp: msm: sde: trigger pm_qos vote with encoder idle pc
Commit d46cae019e ("disp: msm: sde: trigger pm_qos vote
with irq enable") moves the pm_qos vote with irq
enable/disable state. Such irq enable/disable call may be
triggered from atomic context and lead to scheduling issues
due to mutex_lock usage in pm_qos APIs. This change moves
the vote with encoder idle pc to allow lock usage with sleep.

Change-Id: I2d22566fbfb5399c5d2d2a4efe882a1928cfbbf8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-07-14 16:26:51 -07:00
Lei Chen
eb679f5289 disp: msm: add support for display early wakeup
Display clocks and IRQs are disabled during idle state
on command mode for power saving, and will be enabled
when a new frame commits to display driver. But enable
display clocks and IRQs will cause some latency.
So add a new SDE custom IOCTL for user-space to early wake
up display before first frame commits to kernel.

Change-Id: I6ca0188d321c4964f29c46e588b64d06b9634c59
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-07-12 19:08:23 -07:00
qctecmdr
6d1c929a4d Merge "disp: msm: sde: use tracing_mark_write as a node point for sde traces" 2020-07-12 14:50:18 -07:00
qctecmdr
0ea5003877 Merge "disp: msm: sde: parse property for max concurrent TUI displays" 2020-07-10 21:28:17 -07:00
Jeykumar Sankaran
c3389d315c disp: msm: sde: register io resource collection VM event hook
Add support to read register ranges and IRQ lines that needs
isolation during VM switch. Register for vm resource collection
event providing the callback function.

Change-Id: Ie1edf0794a8de89cc44279892433b45a54eba609
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-10 15:48:19 -07:00
Jeykumar Sankaran
cd0ab0f62e disp: msm: sde: fix space between operators
Fix overdue kernel check patch errors by adding needed
spaces between operators in sde_kms file.

Change-Id: I7d734736d26366ac44ea2b66decb2fcf271b4382
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-08 23:13:55 -07:00
qctecmdr
5c92c5ac78 Merge "disp: msm: debugfs interface for sde connector to do DSI read" 2020-07-08 13:03:55 -07:00
qctecmdr
9ec78e3339 Merge "disp: msm: sde: dump clock state before entering suspend" 2020-07-06 23:49:03 -07:00
Yuan Zhao
5bba78331d disp: msm: debugfs interface for sde connector to do DSI read
This change implements a new feature to read the cmds response
of the panel from sde connector interface. Sde connector opens
debugfs interface for all the connectors those have support for
cmd receive operation.

Sde connector init module creates rx_cmd debugfs file at
/<debugfs-root>/dri/0/DSI-1/ for DSI-1 connector.
Format for DSI command transfer:
echo "command bytes" > /<debugfs-root/dri/0/DSI-1/rx_cmd
byte-0: the length of received buffer
byte-1: data-type
byte-2: last command. always 0x01
byte-3: channel number
byte-4: flags. MIPI_DSI_MSG_*, must be set to 0xa
byte-5: 0x00
byte-6 and byte-7: command payload length
byte-8 to byte-[8+payload length]: command payload
Example:
echo "0x01 0x06 0x01 0x00 0x0a 0x00 0x00 0x01 0x0a" > rx_cmd
The command receive operations are allowed only if controller
(ex. DSI controller) is in active state.
Read the value of panel response:
cat /<debugfs-root>/dri/0/DSI-1/rx_cmd
returns the value of this command.
nothing - failure, xx xx - success.

Change-Id: I912b65d606e248c7a886d219f4363bf7766ee7b6
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-07-01 00:55:51 -07:00
Narendra Muppalla
925a7687f4 disp: msm: sde: use tracing_mark_write as a node point for sde traces
This change uses tracing_mark_write as default trace 
point for msm drm driver traces.

Change-Id: I13056a8ff0513935f31bef7d8280c0a95c4394b6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-06-29 13:03:13 -07:00
qctecmdr
1e80d51447 Merge "disp: msm: refactor dma buf attach device assignment" 2020-06-28 04:32:57 -07:00