Commit Graph

147 Commits

Author SHA1 Message Date
Lakshmi Narayana Kalavala
6da86ccee2 disp: msm: sde: fix null access for wb modes
Writeback modes are passed from DRM driver client and it may provide
invalid configuration. Add null checks for sde_wb_config provided by
client to avoid null access in subsequent calls.

Change-Id: I0924f8907d98e2ecb891cfc0c09191823d9033e8
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-06-17 12:32:25 -07:00
qctecmdr
9d87e36a77 Merge "disp: msm: add changes missing during snapshots" 2019-06-04 23:42:23 -07:00
qctecmdr
90ae258727 Merge "disp: msm: dp: add 1.4a cts support for link training" 2019-06-04 10:22:59 -07:00
qctecmdr
eddbcba8a5 Merge "disp: msm: dp: link training enhancements" 2019-06-04 07:37:12 -07:00
qctecmdr
371ccc78c2 Merge "disp: msm: sde: fix encoder parsing in atomic_check phase" 2019-06-04 06:15:13 -07:00
qctecmdr
a384fb7f72 Merge "disp: msm: sde: Fix open method in sde_reg_fops and sde_off_fops" 2019-06-04 04:36:48 -07:00
qctecmdr
5a495e6138 Merge "disp: msm: sde: use local_clock in sde event log" 2019-06-04 01:03:19 -07:00
qctecmdr
bd0467d1d5 Merge "disp: msm: sde: remove vblank cache logic" 2019-06-03 23:21:29 -07:00
qctecmdr
0b1886cb06 Merge "disp: msm: sde: turn off/on vblank callbacks as per crtc" 2019-06-03 21:51:47 -07:00
qctecmdr
e162550a2c Merge "disp: msm: sde: avoid wb done wait for cwb in wait_for_commit" 2019-06-03 20:22:04 -07:00
qctecmdr
b4add676a4 Merge "disp: correct secure id to hold vaddr" 2019-06-03 16:52:32 -07:00
Veera Sundaram Sankaran
89511222a6 disp: msm: sde: fix encoder parsing in atomic_check phase
During atomic_check phase the encoder_mask is taken
from old crtc->state leading to wrong validation.
Fix it by taking the encoder_mask from new crtc state.

Change-Id: Ifcfc4bee887168d8208ffdafb1cf5ea4c4473796
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-06-03 15:46:36 -07:00
qctecmdr
04e4ba8741 Merge "disp: msm: sde: avoid multiple frame-done encoder events" 2019-06-03 14:35:11 -07:00
Dhaval Patel
df2fbca4b8 disp: msm: sde: avoid wb done wait for cwb in wait_for_commit
Existing cwb implementation waits for WB done interrupt in
wait_for_commit_done API call. This serializes the cwb commit
and causes frame trigger delay on primary display. MDSS hw allows
to trigger the cwb frame when previous frame is in-progress. This
change updates driver to allow parallel frame trigger for cwb
enabled display. It releases frame N cwb output buffer in frame
N+1 wait_for_commit done call.

Change-Id: Id4f2a0cc78a3f24a1b5ce96dc907780246768dbf
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2019-06-03 10:04:19 -07:00
Samantha Tran
1ab07a4d7c disp: msm: add changes missing during snapshots
This change ports the missing changes from 4.14 to 4.19
that were missed. It includes changes up until
commit 0f8fb25421ff ("cnss2: Add device version to
SOC info structure").

Change-Id: Idfdfe891f146e389e3c65cc3fc4c98d93220e789
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-06-03 09:07:38 -07:00
Ajay Singh Parmar
aa11061eed disp: msm: dp: add 1.4a cts support for link training
Add support for new requirements in 1.4a CTS which need
to try link training 1 on different lane counts and link
rates.

CRs-Fixed: 2458753
Change-Id: I2039822f420a73232df7293afcddd7bee263c7b4
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-06-02 19:02:18 -07:00
Ajay Singh Parmar
91b9fb1222 disp: msm: dp: link training enhancements
Update the link training process along with the AUX
communications during link training as per hardware
recommendations.

Update the pre-emphasis and swing values for active
lanes only instead of all lanes.

During link training, update pre-emphasis and swing
values in hardware first and then update sink.

CRs-Fixed: 2458753
Change-Id: Ie05c9d6508b0c564b194032ae4ebb1bc5550e7b8
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-06-02 19:01:21 -07:00
qctecmdr
2eeed8c7ff Merge "disp: msm: dp: update swing and pre-emp with new hardware settings" 2019-06-01 03:51:15 -07:00
qctecmdr
b84d2c5ad0 Merge "disp: msm: sde: dynamic lm reservation for secondary disp" 2019-05-31 16:20:33 -07:00
Lakshmi Narayana Kalavala
a4570ec11b disp: msm: sde: Fix open method in sde_reg_fops and sde_off_fops
The open method for the debug fops are supposed to extract
the appropriate register base for the corresponding
hardware blocks, which are later used for the register
read and writes for the associated hardware block. But
the current open method being used points to some random
register base which can lead to fatal issues when performed
reads and writes to registers. Hence implemented a new
open method to extract the appropriate register base of the
various mdp hardware blocks. This patch also fixes
the valid sub range check against the corresponding
hardware blocks instead of checking across all the hardware
blocks.

Change-Id: I2a08fae74b3cbd31f2931c3b89b7308feb4b84e8
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-05-31 14:47:35 -07:00
qctecmdr
f0d4d74c9e Merge "disp: msm: dp: add support for lane count reduction" 2019-05-31 13:21:07 -07:00
Lakshmi Narayana Kalavala
70486d209c disp: msm: sde: remove vblank cache logic
Userspace is not supposed to request vblank until crtc is enabled,
because drm framework rejects the request if crtc is not enabled.
Any vblank request prior to that need to be cached in the userspace.
Hence removing the cache logic from the downstream driver.

Change-Id: I78ceee331cba2d691f68fd649bd5cf33f7868e72
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-05-30 16:22:59 -07:00
Lakshmi Narayana Kalavala
5fd0d8d44b disp: msm: sde: use local_clock in sde event log
The display driver uses ktime_to_us to timestamp the messages
in the sde event log. But the kernel logs use local_clock to
timestamp the messages. Using same timestamp routine in sde event
log helps to correlate the messages from both the logs
for debug purpose.

Change-Id: Id94e03ba21f82e2162e4ef4290c10d2d09110d4c
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-05-30 16:17:48 -07:00
Lakshmi Narayana Kalavala
9e17babe6a disp: msm: sde: turn off/on vblank callbacks as per crtc
Current sde driver allows vblank enable and wait requests
even after crtc is disabled which would eventually lead to
enable of irq and timeouts in caller context. This change fixes
it by updating vblank callback status as 'on' during crtc enable
and shutdowns vblank callbacks before crtc disable is complete.

Change-Id: I52b74f685107f4dc8c83305c28f23cdcb4747730
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-05-30 16:13:09 -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
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
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