提交線圖

107 次程式碼提交

作者 SHA1 備註 日期
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
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
qctecmdr
b299a0f04c Merge "disp: msm: sde: manage vblank refcount concurrency" 2020-06-28 04:32:57 -07:00
Dhaval Patel
44cde01fc7 disp: msm: sde: manage vblank refcount concurrency
Vblank refcount can reach out of sync with below case
 1. event_thread triggers the vblank_enable
 2. commit_thread triggers the modeset
   2.a modeset resets the vblank refcount with mode_set
 3. event_thread triggers the vblank_disable

Event 2.a resets the vblank refcount and vblank disable
request after 2.a is going to fail. This can be fixed
by avoiding concurrency between mode_set call and vblank
request.

Change-Id: Ibb810ec90e81d63feee443f1c37dd736d5cfac0d
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-06-25 13:54:21 -07:00
Amine Najahi
8479ed7278 disp: msm: sde: dump clock state before entering suspend
Add debug capability to dump clocks before entering pm suspend.
This will help debug invalid register access when clocks are off
during adversarial test cases.

Change-Id: I80d19b751a3b9a1de0cc64699a21a1852d614ced
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-06-22 13:40:03 -07:00
Jeykumar Sankaran
935af8104a disp: msm: sde: avoid MDSS register access during boot in trusted VM
Trusted VM will be assigned MDSS HW access dynamically only on TUI
use case start boundary. So, any HW access during the boot sequence
will result in stage2 faults. But SDE driver initializes few HW
blocks during the boot up sequence. This change fixes them by either
skipping those accesses, if those registers expected to be programmed
by the Primary VM or postponing those accesses until the HW is
assigned.

Change-Id: Ic85238c5d734e9ac993072374c1b0ae661708fca
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-06-19 15:39:03 -07:00
Veera Sundaram Sankaran
bd28c729e8 disp: msm: refactor dma buf attach device assignment
Assign default drm device for dma buf_attach when
IOMMMU is not present and for stage-2 only buffers.
Avoid setting lazy_unmap for stage-2 only buffers as
it doesn't have any impact without nested translations.
Assign default drm device when no device is found to
support transitions between secure usecases where
the nested context banks might not be attached back
at the prime_fd_to_handle time. These buffers would
be attached with the correct context bank device
during the delayed_import.

Change-Id: I9ccb38876d7843b4411762c7b8006ae8fca85391
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-06-19 11:36:29 -07:00
qctecmdr
d9b4204aad Merge "disp: msm: sde: add vig formats before qseed and csc initializations" 2020-06-12 00:11:19 -07:00
Amine Najahi
ed868466f5 disp: msm: dp: Extend mode filtering to support 8K
Currently DP driver determines if a mode is DSC capable
based on a DTSI entry and the required number of DSC
to support it. This approach does not scale when there
is an overlap in DSC requirement between DSI displays
and external DP display, thus causing one of the display to
report modes that cannot be supported.

This change compares the resources reserved for DP driver
calculated at initialization time and the currently available
ones to determine the correct number of resources that DP driver
can use. It also adds DSC and topology filtering logic and moves
DSC hardware specific from DP driver to SDE driver.

Change-Id: I8e601de33422b7c6d786826f7bfe152c4af8a6b5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-06-09 09:17:38 -04:00
Jayaprakash
19253d6e19 disp: msm: sde: modify the args for sid switch call
Modify the size of SID's passed as an argument during
scm call as per client requirement.

Change-Id: Idd3bb57a8f9e0a4e7eb6a23d96bfa5b68510063a
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-06-08 11:39:59 -07:00
Yashwanth
5792eb97d1 disp: msm: sde: add check for max encoder limit during allocation
This change checks max limit while allocating encoders
during display init.

Change-Id: I48736667c2b83f916f09f9e81cb1b24a9fef215a
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-06-08 11:39:36 -07:00
Ray Zhang
3bfb8cafce disp: msm: support framebuffer emulation in KMS driver
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>
2020-06-08 11:39:17 -07:00
Yashwanth
4194c7b7cd disp: msm: sde: add dt based support for pm qos irq latency
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>
2020-06-08 11:39:09 -07:00
Dhaval Patel
83860f0642 disp: msm: pass free dsc and lm availability info to dp
Primary and secondary dsi displays are built-in displays
and they are supported during all concurrency usecases
without resource allocation failure. DP mode filter
logic should provide supported mode information based
on free mdp resources after dsi resource assignment.

Change-Id: I3a9637a91ea1ffcc31997e25caff7f13605283ac
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-06-07 22:57:26 -07:00
Dhaval Patel
d46cae019e disp: msm: sde: trigger pm_qos vote with irq enable
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>
2020-05-27 17:46:07 -07:00
qctecmdr
281e18b317 Merge "disp: msm: sde: create a dummy smmu device for scm transactions" 2020-05-26 05:33:13 -07:00
Narendra Muppalla
43f4c3c9ce disp: msm: sde: create a dummy smmu device for scm transactions
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>
2020-05-14 11:31:25 -07:00
Veera Sundaram Sankaran
88acaa31b8 disp: msm: sde: reuse cont-splash path for LE VM resource allocation
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>
2020-05-11 12:11:48 -07:00
Veera Sundaram Sankaran
68b75aac24 disp: msm: use FB_NON_SEC_DIR_TRANS plane hint for TUI VM buffers
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>
2020-05-11 12:11:39 -07:00
Veera Sundaram Sankaran
bfec52ae7b disp: msm: sde: add SID setup function for pipes and lutdma
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>
2020-05-11 12:11:31 -07:00
Veera Sundaram Sankaran
7245366343 disp: msm: sde: parse MDSS HW from device tree
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>
2020-05-11 12:11:18 -07:00
Amine Najahi
c9eb6c1102 disp: msm: sde: fix mixer count calculation for 4LM topologies
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>
2020-05-06 11:33:08 -04:00
qctecmdr
dfc3e3ddc8 Merge "disp: msm: sde: add sys cache usage for static image" 2020-05-01 17:58:07 -07:00
Shashank Babu Chinta Venkata
8b8bfe0165 disp: msm: make msm_drm into single module
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>
2020-04-28 15:52:39 -07:00
Chandan Uddaraju
eaa458b165 disp: msm: move MDSS resource voting to probe
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>
2020-04-28 12:09:13 -07:00
Nilaan Gunabalachandran
83ee51cb5a disp: msm: sde: add sys cache usage for static image
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>
2020-04-27 15:12:17 -04:00
qctecmdr
da0b8d3812 Merge "disp: msm: sde: skip power events when cont-splash is enabled" 2020-04-16 14:02:26 -07:00
qctecmdr
d94c7aef02 Merge "disp: msm: sde: add pm QoS vote on CPU receiving display IRQ" 2020-04-12 23:31:30 -07:00
Samantha Tran
e85a88ea01 disp: msm: sde: add pm QoS vote on CPU receiving display IRQ
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>
2020-04-09 22:56:18 +08:00
Dhaval Patel
f97e75d7ab disp: msm: sde: flush crtc event thread before idle notification
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>
2020-03-29 19:25:20 -07:00