提交線圖

1737 次程式碼提交

作者 SHA1 備註 日期
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
qctecmdr
d0add46ba2 Merge "disp: msm: dsi: avoid TE-based panel status check in Trusted-vm" 2020-11-16 14:22:17 -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
qctecmdr
7e52459f8e Merge "disp: msm: dsi: Add support for parsing mdp_intf base address from dt" 2020-11-13 05:34:43 -08:00
Veera Sundaram Sankaran
899b201a0a disp: msm: dsi: avoid TE-based panel status check in Trusted-vm
Add check to avoid the dsi panel status check with TE
method as the GPIO support is not available in Trusted-vm.

Change-Id: I5ad6e7b77b189b5150302ab34767dfc4d97aaf61
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00
Veera Sundaram Sankaran
c99f3fd6ae disp: msm: dsi: enable ESD trigger through debugfs in trsuted-vm
Add support to trigger ESD through debugfs by directly
modifying the reset GPIOs TLMM register in trusted-vm as GPIO
driver support is not enabled.

Change-Id: I859affe69c13dbe115a48b0a63a600a57027db58
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00
Veera Sundaram Sankaran
6dd2c3cd87 disp: msm: dsi: parse & store gpio registers used by the host & panel
Parse all the GPIO pins used by the DSI host and the display panel
along with its register ranges and store it in panel struct. This
avoids parsing the device-tree everytime during transitions between
trusted and primary vm.

Change-Id: Ibbb646358c0409703afda1c4f758f044fc8c0001
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 22:27:10 -08:00
qctecmdr
76dcac0a20 Merge "Revert "disp: msm: sde: fix race between disable commit and vblank work"" 2020-11-12 21:31:11 -08:00
qctecmdr
6fa30971f2 Merge "disp: msm: dp: unify hpd event for sst and mst" 2020-11-12 12:23:53 -08:00
Lipsa Rout
5407bf18f3 disp: msm: dsi: Add support for parsing mdp_intf base address from dt
Currently, mdp_intf_line_count and mdp_intf_tear_line_count register
addresses are defined in dsi_ctrl_hw for debug feature. But mdp_intf
base address is target specific and independent of dsi controller
version. This change adds support for parsing the mdp intf base
address from dt, thereby remapping using base + offset addressing.

Change-Id: Ibb72dfe84a786a5c8b95f6a400e8333f6b46814a
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2020-11-12 09:48:52 +05:30
qctecmdr
e09f74663b Merge "disp: msm: sde: use current crtc state during idle work scheduling" 2020-11-11 01:16:23 -08:00
Steve Cohen
f6cfe46a3c Revert "disp: msm: sde: fix race between disable commit and vblank work"
This is a partial revert of commit:
	31dd25c623.

The enc->crtc link cannot be relied upon outside of the display
thread context since the DRM legacy modeset API will detach and
re-attach this connection on every commit.

The logic to flush the event thread in all cases during the CRTC
disable is kept from the original patch.

Change-Id: I2cd4ae47589bb397c72de0e9deba9b0c710d379a
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-10 14:45:45 -05:00
Rajat Gupta
ecc89334b0 disp: msm: dp: add error handling for host init failures
Add error handling mechanism in host init function to take necessary
action upon failure. For example, power init can fail if we try to
do host_init in between PM suspend. In this case sink sends an hpd
irq with hpd_high equals to 0 and hpd_high equals to 1, after which
ADSP sends the events to DP driver. Now as apps core is in PM suspend
all the devices are put to suspend state and cannot be resumed if
their disable_depth is greater than 1. When driver tries to process
the hpd_high equals to 1 and does host_init in between PM suspend,
it sometimes leads to power init module failure. Inadequate handling
of host init failure as described can lead to a NOC error.

Change-Id: I23eff28e137a18b43eef204fbccc695b743cf726
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-11-09 21:23:45 -08:00
qctecmdr
fa46997b26 Merge "disp: msm: dsi: recount drm mode count" 2020-11-09 19:11:09 -08:00
qctecmdr
22e9e28e8a Merge "disp: msm: sde: fix race between disable commit and vblank work" 2020-11-09 16:30:07 -08:00
qctecmdr
cd1fb3642a Merge "disp: msm: sde: add traces for lastclose" 2020-11-09 16:30:07 -08:00
Sankeerth Billakanti
a8972ccc53 disp: msm: hdcp: avoid sink message processing when hdcp is off
Skip processing the sink message in sde_hdcp_2x_main thread when hdcp
TA is unloaded. If there is any error generated during the
authentication sequence, then the hdcp authentication is aborted and
the source will restart the authentication procedure. When
authentication is aborted, the qseecom handle is lost and memory it
referenced becomes protected. When a subsequent command execution in
the sde_hdcp_2x_main thread tries to dereference that particular
memory from the qseecom handle, there is a page fault crash observed.

This change will skip accessing the memory referenced by the qseecom
handle when hdcp authentication session is tearing down.

Change-Id: I71ed44042897f17cc8817a1b1c54a43e42cf5f73
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-11-08 20:52:54 -08:00
qctecmdr
752c268d6e Merge "disp: msm: avoid setting AMC and WAKE tage on icc vote" 2020-11-06 14:26:50 -08:00
Rajkumar Subbiah
2fc0439a46 disp: msm: dp: unify hpd event for sst and mst
Currently hpd uevent notification to usermode is triggered at different
points in the hpd handler callflow. With respect to the SST callflow,
the MST callflow has the following issues:
* the completion event object is getting reinitialized after the uevent
is sent
* The NOTIFIED states are not updated properly.
* dp_display_process_mst_hpd_high is overloaded to do two different
functions in the same flow and is controlled by the mst_probe argument.

This change cleans up the hpd callflows for MST and unifies the hpd
event notification. Also moved the mst check logic from
dp_display_process_mst_hpd_high to a separate function.

Change-Id: I8fdc92d2f9aae16d248c74643cb93688786dfbd5
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-11-06 16:48:02 -05:00
Yashwanth
8249e8b7f3 disp: msm: sde: use current crtc state during idle work scheduling
In the current code, previous crtc state is used to know
the idle timeout period and to schedule the idle notify
work. Due to this, notify work is not getting scheduled
in some cases even when idle timeout is specified. This
change uses current state for idle timeout period.

Change-Id: I3ff4df6a8edd6a5a20d2e19c3c27ebb221694ac1
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-11-06 15:57:58 +05:30
Zhao, Yuan
0cf3838ac8 disp: msm: dsi: recount drm mode count
Drm driver will remove the same mode that defined
in dsi panel dtsi. But the mode count was not updated,
so when checked drm mode, need to recount the mode.

Change-Id: I51a2c40ceb7d4ee83a15f74d9d724b4fb9c8a618
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-11-06 00:36:40 -08: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
Steve Cohen
31dd25c623 disp: msm: sde: fix race between disable commit and vblank work
This patch addresses the following sequence:
1. DRM framework drops vblank reference,
	work is queued on event thread
2. Lastclose stages disable commit,
	swap-state occurs on display thread
3. vblank worker runs on event thread
	encoder cannot drop the FW vblank reference since it's
	no longer in crtc->encoder_mask

Instead, iterate through all encoders and match the enc->crtc
back-pointer to be sure the vblank vote is applied. Also, flush
the event thread in all cases during the CRTC disable to be sure
the vblank work is complete before the back-pointer is removed.

Change-Id: Ib307e9aefc2d4f729a3af7a6140bc887684f4489
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-06 02:04:30 -05:00
qctecmdr
71267af524 Merge "disp: msm: sde: delay frame trigger on esd failure" 2020-11-05 19:52:37 -08:00
qctecmdr
d31481dbe6 Merge "disp: msm: sde: fix ich reset override logic" 2020-11-05 13:15:56 -08:00
Veera Sundaram Sankaran
1fce17fe87 disp: msm: sde: avoid backlight updates on enable/disable of TVM
Avoid setting backlight to max/0 during bridge enable/disable
for trusted-vm as the transition between the VMs are expected
to be seamless without any implicit changes to backlight.

Change-Id: Ib828113e49af1be4effea2b71b3106e3cbf401c2
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-03 17:56:19 -08:00
Jeykumar Sankaran
08c40fb26e disp: msm: sde: allow backlight device registration for trusted vm
Trusted VM can support dynamic backlight updates through DCS
commands. Allow SDE to register for the backlight device
only if the panel supports DCS backlight update mode.

Note that thermal driver is disabled in trusted vm. So we are
still avoiding registering with msm thermal  driver. The
backlight updates are only supported through backlight driver
provided sysfs nodes.

Change-Id: I9cd41d473445387c8bc9048d7e565d49124a36b7
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-11-03 17:56:02 -08:00
Rajkumar Subbiah
f8a75153b7 disp: msm: dp: send hpd notification before updating mst_active
When processing mst hpd low, the driver is clearing mst_active before
triggering hpd notification. The hpd notifier is common for both
sst and mst and since mst_active is cleared it incorrectly treats
this as sst unplug.

This change switches the order of these operations to trigger hpd
notification before clearing mst_active.

Change-Id: I28f90da699e4f2fe177a4e4cfd1d9f03957c3176
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-11-03 14:42:03 -05:00
Abhijit Kulkarni
f1a277597f disp: msm: sde: delay frame trigger on esd failure
This change adds support for delaying kickoff in case of ESD error.
This delay is required to handle a race condition between esd
workqueue and display thread.
When ESD workqueue detects the esd and while handling the failure
notification if the new updates arrive on display thread, there
is a possibility that ESD workqueue will keep on waiting on pp_done.
This could happen if display thread keeps on incrementing the kickoff_cnt
before workqueue can check the condition. With this change the kickoff is
delayed, allowing the workqueue to get scheduled and avoiding the race
condition.

Change-Id: I8e6fff5ea5494ae801d1e60ae85b7ad19cc12961
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-03 10:14:58 -08:00
Abhijit Kulkarni
2457f38adc disp: msm: sde: fix ich reset override logic
This change fixes the detection logic for overriding the ich
reset in both single and dual dsc case. In the previous logic
ich reset override was not getting triggered when partial update
on single dsc was enabled. This override is required to change the
default Hw behavior of changing the ich reset position.

ICH reset needs to be overridden in dual dsc merge case when
partial update disables the dsc merge and no. of slices per
encoder drops to 1. Similarly for single dsc case partial update
case when DSC encoder configuration changes from 2 slices to
single slice this override is required.

Change-Id: I435dc7ff10c9fb0edb8e40e6701608aa22136981
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-03 10:10:35 -08:00
Dhaval Patel
ff43683350 disp: msm: avoid setting AMC and WAKE tage on icc vote
Setting AMC and WAKE tag triggers AMC only and WAKE+SLEEP
only vote. These dynamic tag switching is not allowed
on interconnect driver. Display SW usecases also need
ACTIVE_ONLY tag for solver enabled and disabled
configuration. ACTIVE_ONLY tag triggers AMC+SLEEP
for solver disabled and WAKE+SLEEP for solver
enabled configuration.

Change-Id: I5abcc104378595724e5b5ae594c4b8c7a7922875
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-10-30 17:46:56 -07:00
qctecmdr
987888e623 Merge "disp: msm: sde: add msgq support for sde vm layer" 2020-10-29 11:24:07 -07:00
qctecmdr
cf37238a38 Merge "disp: msm: dsi: add dsi ramdump support without DEBUG_FS" 2020-10-29 05:17:45 -07:00
qctecmdr
c7ba46d5bf Merge "msm: sde: prevent illegal register access" 2020-10-28 18:43:29 -07:00
Narendra Muppalla
9b133dd201 disp: msm: dsi: add dsi ramdump support without DEBUG_FS
This change adds dsi display ramdump support when DEBUG_FS
is not enabled.

Change-Id: Ic6659a9380acd5eb55a3270d3e3b7016a9cd2bd7
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-10-28 13:07:28 -07:00
Jeykumar Sankaran
d076f02017 disp: msm: sde: add msgq support for sde vm layer
Linux message queues(msgq) are used to communicate between VM's
This change creates a display specific msgq and a set of
framework api's for the VM layer to invoke communication
between the VMs'.

Display msgq is bidirectional. Tx end is created by default for
both the VM's. Rx is kept optional to avoid unnecessary creation
of listener threads.

Change-Id: If4e6410045293d6b21087a76ec018d4784dd5238
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-10-28 00:52:12 -04:00
qctecmdr
2fb129f394 Merge "disp: msm: sde: update RSC when QSYNC property is updated" 2020-10-27 17:47:57 -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
qctecmdr
68399fac7e Merge "disp: msm: sde: limit encoders attached to crtc during trusted-ui" 2020-10-27 15:10:05 -07:00
Steve Cohen
50e20bde15 disp: msm: sde: update RSC when QSYNC property is updated
RSC is updated during encoder enable/disable/modeset or power-
collapse/wakeup. The RSC vote for primary display will change
depending on QSYNC status which might change without modeset or
power-collapse. Add a call to update the primary display's vote
when the QSYNC property is updated.

Change-Id: I664754e4aae689ef2db5b1ef7b8b55a4c5fad3be
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-10-27 13:27:56 -04: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
qctecmdr
ec3da37b4a Merge "disp: msm: sde: increment refcount of dma_fence before access" 2020-10-27 10:08:51 -07:00
qctecmdr
4d25c19eaa Merge "disp: msm: re-apply dma_map_attr during secure-UI to secure-vid transition" 2020-10-27 10:08:51 -07:00
qctecmdr
0f8c7b9d49 Merge "disp: msm: enable event log and disp ramdump without DEBUG_FS" 2020-10-27 07:51:07 -07: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
9fadc353f3 Merge "disp: msm: dp: handle FEC EN sequence collision with BS symbols in SW" 2020-10-23 09:51:33 -07:00
qctecmdr
83d31bb3f7 Merge "disp: msm: dp: use VESA recommended default dsc slice height" 2020-10-23 09:51:33 -07:00