Commit Graph

176 Commits

Author SHA1 Message Date
Veera Sundaram Sankaran
bce30d62b7 disp: msm: allow DMS before cont-splash handoff
Currently dynamic mode-switch is allowed only after
the cont-splash handoff is handled during the first
frame. Remove this restriction for cmd-mode alone as
it can handle the use-case.

Change-Id: I5f9dc758f50a91fec0b9f710c74f2ea78c4e75eb
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-05-30 15:26:44 -07:00
Veera Sundaram Sankaran
b8b095b57d disp: msm: sde: avoid multiple frame-done encoder events
Currently there is a race condition in checking the
pending_kickoff_cnt in wr_ptr_irq wait from display-thread
and pp_done_irq from interrupt context. In both places,
pending_kickoff_cnt is read first and modified later. In
partial update cases where the frame-transfer is short,
such a race condition might happen and would lead to both
triggering the frame-done/release fence for the same frame.
Fix it by combining read/modify to one statement in both places.

Change-Id: I9162e7dc3f12af3590514f1ebfd68023aa920181
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-05-30 15:24:54 -07:00
Ping Li
6ccf6c045e disp: msm: sde: Add additional property for queuing LTM buffer
Add 3 properties for queuing LTM histogram buffers to remove the
limitation that we cannot send two buffers back in the same display
commit.

Change-Id: Ia37c6d9e7faa6b5a086a9737e20c44eed865c66d
Signed-off-by: Ping Li <pingli@codeaurora.org>
2019-05-28 13:37:11 -07:00
Samantha Tran
d025293ae2 disp: correct secure id to hold vaddr
This change corrects the secure id to hold vaddr
instead of paddr.

Change-Id: I021f5c0c7708eb2a0b166fe3a6c13b11aaf33419
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-05-28 10:46:31 -07:00
qctecmdr
5af1fe1891 Merge "disp: msm: dsi: program DSI_PHY_CMN_CTRL_4 register" 2019-05-24 16:13:15 -07:00
qctecmdr
9c05197ef9 Merge "disp: msm: sde: use wr_ptr interrupt instead of ctl_start" 2019-05-24 09:38:19 -07:00
Nilaan Gunabalachandran
52855c704a disp: msm: sde: dynamic lm reservation for secondary disp
Primary and secondary displays should have first priority
when reserving lms. Static reservation can potentially block
higher resolutions for the required displays. This patch gets
the layer mixer requirement for primary or secondary display
if available. It reserves those layer mixers dynamically
for the respective display when connector is registered.

Change-Id: Id69dac4c72d6b20008049f4aeb71c0f97d0a426b
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-05-24 06:35:07 -07:00
Ritesh Kumar
d9448326ce disp: msm: dsi: program DSI_PHY_CMN_CTRL_4 register
For some phy ver 4 chipsets, DSI_PHY_CMN_CTRL_4 needs to be programmed
in normal power up sequence. This change adds support to program the
same based on minor phy version.

Change-Id: I68bed48ca671f540efafd13f8d56c7e90de8b25c
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2019-05-24 02:54:07 -07:00
qctecmdr
06f8bcc142 Merge "disp: msm: dsi: add debug support to configure clock gating" 2019-05-23 21:54:20 -07:00
qctecmdr
30b14e8caf Merge "disp: msm: dsi: block TE signal check for ESD on video mode panels" 2019-05-23 19:36:19 -07:00
qctecmdr
15959feb73 Merge "disp: msm: sde: fix logging in crtc and kms" 2019-05-23 18:17:37 -07:00
qctecmdr
d37cbd374b Merge "drm/msm/dsi-staging: update dsi clock calculations" 2019-05-23 16:40:53 -07:00
Ajay Singh Parmar
de5f4d652e disp: msm: dp: add support for lane count reduction
Add support for lane count reduction as per the new requirements
for DP 1.4a during link training 2.

CRs-Fixed: 2458753
Change-Id: I58c9b6101338e8a1d1b4e3dec80f8fdf2a25ae5b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-05-23 14:30:37 -07:00
qctecmdr
bd03e365b7 Merge "disp: msm: dsi: fix out of bounds access errors" 2019-05-23 13:35:11 -07:00
Ajay Singh Parmar
9a54f87c18 disp: msm: dp: update swing and pre-emp with new hardware settings
Update the DP controller and PHY programming according to
the new hardware recommendations.

CRs-Fixed: 2458753
Change-Id: I1bce5915ba6ebbb250cc5c4aac907b0b287eece7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-05-23 12:54:14 -07:00
Aravind Venkateswaran
dc65566994 disp: msm: dsi: add debug support to configure clock gating
Add support to selectively enable clock gating for supported
DSI clocks using a new debugfs node - config_clk_gating. This
new node would be created for every display node. See below
for usage examples:

To enable clock gating only for BYTE clock:
echo 1 > /sys/kernel/debug/<display_name>/config_clock_gating

To enable clock gating only for PIXEL clock:
echo 2 > /sys/kernel/debug/<display_name>/config_clock_gating

To enable clock gating only for PHY clock:
echo 4 > /sys/kernel/debug/<display_name>/config_clock_gating

To enable clock gating only for all clock:
echo 7 > /sys/kernel/debug/<display_name>/config_clock_gating

To disable clock gating for all clocks:
echo 8 > /sys/kernel/debug/<display_name>/config_clock_gating

To go back to default setting:
echo 0 > /sys/kernel/debug/<display_name>/config_clock_gating

Change-Id: I83713d86eb1b9675d40d51fc20de81cca0aeb1c0
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2019-05-23 12:08:22 -07:00
Veera Sundaram Sankaran
6daf1c58e7 disp: msm: sde: use wr_ptr interrupt instead of ctl_start
SDE driver triggers the frame and waits for the
ctl_start interrupt for command mode display. This interrupt
provides confirmation that hardware has picked up the
frame. Retire fence signaling is associated with
this interrupt and it is sent at the rd_ptr interrupt
after ctl_start. Due to lut dma delay, ctl_start interrupt
may be trigger before rd_ptr or after rd_ptr. SW manages
this complexity and handle retire fence for different cases
with 500us threshold logic.

This change replaces the ctl_start interrupt with wr_ptr
interrupt by programming it to trigger at 1st write line
count. This is guaranteed to come every time and it is close
to rd_ptr interrupt. That allows retire fence trigger at
wr_ptr interrupt and simplifies the SW logic. CRTC commit
thread would be held slightly longer with this change
as the wr_ptr is always close to rd_ptr and after
ctl_start.

Change-Id: Ic47a8f82c854b4aded0d70c95af853b28a68ffd6
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-05-23 10:29:30 -07:00
Linux Build Service Account
c44165dd40 Merge "disp: msm: dsi: avoid panel mode switch flag after deep sleep" into display-kernel.lnx.4.19 2019-05-23 00:27:39 -07:00
Satya Rama Aditya Pinapala
8e1a796595 disp: msm: dsi: block TE signal check for ESD on video mode panels
If we set esd check mode as TE signal check for video mode panels
the panel will be continuously reset. This change doesn't allow
TE signal check as ESD check mode.

Change-Id: I42a09d605b259d9f06c67cb126d3684ed4489699
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-05-22 14:38:59 -07:00
Satya Rama Aditya Pinapala
684e070ab1 disp: msm: dsi: fix out of bounds access errors
This change fixes the invalid memory access. It allocates
enough memory so that out of bounds access is avoided.

Change-Id: I0749eac54cfa91891a4377b99fbd7f24dd3bd02a
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-05-22 14:38:16 -07:00
Samantha Tran
3be27eafcc disp: msm: snapshot of msm and sde driver
This snapshot ports changes from 4.14 to 4.19 into
the msm and sde layer. Snapshot was taken as of
commit 0f8fb25421ff ("cnss2: Add device version to
SOC info structure").

Change-Id: I59b799a78319c2db6930a2a10bc38976f8c09898
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-05-22 13:08:31 -07:00
qctecmdr
80aed77020 Merge "disp: msm: sde: avoid rc lock deadlock during esd failure" 2019-05-22 12:20:00 -07:00
Samantha Tran
0cfa54e503 disp: msm: dsi: avoid panel mode switch flag after deep sleep
This change updates the checks needed before setting the flag
to enable panel switching between command and video mode.
New crtc active state remains disabled and it causes a failure
in the previous case.

Change-Id: I059731d2faa0f7844d3784fcf7694509fbba3ff7
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-05-22 11:20:28 -07:00
Steve Cohen
bcbb734010 disp: msm: sde: delay backlight update until the first commit
In the current implementation panel set backlight can be called even before
receiving a frame from the driver during the first commit. Hence there is
chance for some garbage content to be shown onto the panel. So this change
imposes a condition to delay backlight update of the panel until the
first frame is received from the HW.

This change includes only a missing portion of the original that was somehow
left out of the snapshot ported to 4.19. Original change ID is preserved.

Change-Id: I735a97088efef91159e724bba615549dba49e4e3
Signed-off-by: Tharun Raj Soma <tsoma@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2019-05-22 13:09:31 -04:00
Manoj Kumar AVM
6af277472c Revert "disp: msm: sde: turn off/on vblank callbacks as per crtc"
This reverts commit 16bfab7ddf.

Change-Id: I5c5ef6a2fcb83607acd2c737f574199c010c89fa
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
2019-05-21 18:33:54 -07:00
Manoj Kumar AVM
7fc5e5d45f Revert "disp: msm: sde: remove vblank cache logic"
This reverts commit e6754ef40a.

Change-Id: If5921c6428b2b79ae5979d782138f10e4673d1fb
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
2019-05-21 18:33:28 -07:00
qctecmdr
51e46a53a0 Merge "disp: msm: sde: add per_pipe_bw_high option" 2019-05-21 11:20:01 -07:00
qctecmdr
1adffe8c6e Merge "disp: msm: dp: use extended DPCD fields to configure dp link rate" 2019-05-21 10:03:56 -07:00
qctecmdr
ab3c7fdd80 Merge "disp: pll: update SSC offset value" 2019-05-21 07:34:58 -07:00
qctecmdr
dcfc57ce16 Merge "drm/msm: avoid unmapping the buffer twice during msm_release" 2019-05-21 05:50:25 -07:00
qctecmdr
82ff7e3a57 Merge "drm/msm: Only add available components" 2019-05-21 02:50:07 -07:00
qctecmdr
3f35432626 Merge "disp: msm: avoid vbif and wb register dumps in secure mode" 2019-05-21 01:20:03 -07:00
qctecmdr
e9cf18686e Merge "disp: msm: dsi: remove reg dump sub range" 2019-05-20 23:52:43 -07:00
qctecmdr
366415bb0a Merge "disp: pll: fix TRACE_INCLUDE_FILE path issue" 2019-05-20 22:20:02 -07:00
qctecmdr
d47e3af033 Merge "disp: msm: dp: perform mst phy operations during suspend resume" 2019-05-20 20:50:00 -07:00
qctecmdr
b08df2e6a6 Merge "disp: msm: sde: add rev check for LITO target" 2019-05-20 16:35:06 -07:00
Samantha Tran
c423e14b22 disp: msm: sde: add per_pipe_bw_high option
This change populates values for per_pipe_bw_high
from the device tree. This value is exposed to userspace
as the bandwidth per pipe available in the no VFE
scenario.

Change-Id: I61346ee55dfd4b6b0736ecf0b96e061f4f3934c3
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-05-20 15:42:06 -07:00
qctecmdr
a8d58b7c0d Merge "disp: msm: sde: update min prefill lines to 35 for kona" 2019-05-20 13:06:00 -07:00
qctecmdr
3638af7654 Merge "disp: msm: sde: log pp-line count in event logs" 2019-05-20 11:33:55 -07:00
qctecmdr
118d196a8d Merge "disp: msm: sde: reduce log level for invalid encoder master" 2019-05-19 20:49:35 -07:00
qctecmdr
89a6e5d512 Merge "disp: msm: fix out-of-bound access and NULL dereference" 2019-05-19 16:45:53 -07:00
Dhaval Patel
56e88a7fdc disp: msm: sde: avoid rc lock deadlock during esd failure
Each mode_set call makes sure that previous frame is triggered
and triggers the esd check if there is pp_timeout. This may
lead to deadlock between crtc commit and event threads. Crtc
commit thread acquires the rc_lock and triggers the flush_thread
API on event_thread. Event thread again tries to acquire the
rc_lock to wait for frame. This can be prevented by avoiding the
pre_kickoff call from esd_failure notification if it is generated
through pp_timeout.

Change-Id: I561fef0345976ab0cae61aab6718214c47fa1393
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-05-17 15:39:16 -07:00
Samantha Tran
0cbfaf1a4b disp: msm: fix out-of-bound access and NULL dereference
Fix possible out-of-bound access and NULL pointer
dereference in SDE and PLL driver.

Change-Id: Ic5c34b3b4c3e983413a0351c38206cf3f3ab3b1f
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-05-17 11:30:48 -07:00
Dhaval Patel
627f4335aa disp: msm: sde: update min prefill lines to 35 for kona
Update minimum prefill ines to 35 lines for kona
target.

Change-Id: Ib37304024947c581a2a29f820eef881d6db984f9
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-05-16 20:44:13 -07:00
Veera Sundaram Sankaran
1e3d105dc0 disp: msm: sde: log pp-line count in event logs
Log ping-pong current line count during ctl-start
and rd-ptr interrupt. This will help in debugging
ping-pong timeout issues.

Change-Id: I58185330fe9e8a64f48d6da60c974b23a9e68b44
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-05-15 15:36:06 -07:00
Veera Sundaram Sankaran
ef68f9d670 disp: msm: sde: reduce log level for invalid encoder master
Reduce the log level from error to debug for invalid
master encoder in encoder restore path during idle
power-collapse. This would avoid unnecessary logging
when concurrent writeback gets enabled after a
power-collapse event, the restore happens based on
encoder_mask attached in the crtc before the actual
enable call for the cwb encoder.

Change-Id: I54cd7de62f1a9030f68a963c8ed27ff098302e04
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-05-15 14:34:19 -07:00
Vara Reddy
f28b596aac drm/msm/dsi-staging: update dsi clock calculations
Change updates dsi clock calculations for command mode
as per recommendation. Now dsi clocks are tied to
frame transer time. Propagate correct frame transfer
time to hal to update mdp clocks and bandwidth needed
accordingly.

Change-Id: I46f9038622ddd47cc53c5f3d54229f69a7008c8a
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-05-15 13:06:43 -07:00
Fuad Hossain
ac1149d273 disp: msm: dp: perform mst phy operations during suspend resume
Perform mst phy operations during suspend/resume
to allow sinks to be in a correct state. A usbpd
api must also be called before and after the phy
operations to allow the system to go into deep
suspend and resume in a timely manner.

CRs-Fixed: 2363921
Change-Id: Ie21ef9b1caf2044e598466373a6059d2a1e5e58c
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-05-15 14:39:37 -04:00
Narendra Muppalla
4e0078b8cf disp: pll: fix TRACE_INCLUDE_FILE path issue
This change address incorrect TRACE_INCLUDE_FILE issue
in pll driver.

Change-Id: I8d8d83f5cc93eb4700557d8b8564a949d0421caa
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-05-14 12:44:55 -07:00
Jayaprakash
f0bc6e4683 disp: msm: sde: add rev check for LITO target
Add required revision checks for lito target.

Change-Id: I53b4bace46b0e8c99b7765e0f2a7b625ee08b38c
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-05-14 13:15:16 +05:30