Commit graph

1,995 commits

Author SHA1 Message Date
Srihitha Tangudu
f6d96209a5 disp: msm: dsi: Fix deadlock issue in debugfs_esd_trigger_check function
In debugfs_esd_trigger_check, display mutex is not unlocked in error 
scenario which may lead to deadlock. This change adds fix to handle this.

Change-Id: I44d78959630a49bd1e9dcf871cfc108ac43232db
Signed-off-by: Srihitha Tangudu <tangudu@codeaurora.org>
2021-09-08 15:21:00 +05:30
qctecmdr
6c7d4ccc36 Merge "disp: msm: sde: use fixed prefill lines in rscc static wakeup calculation" 2021-09-03 02:17:28 -07:00
qctecmdr
862239a2f3 Merge "disp: msm: fix dsi debugbus in-mem logging" 2021-08-31 21:32:04 -07:00
Jayaprakash Madisetty
b45b583f53 disp: msm: sde: use fixed prefill lines in rscc static wakeup calculation
In dual display during bootup, panel prefill lines may be used in
configuring rscc static wakeup due to ongoing autorefresh in secondary
display. Due to this, there can be a case when transfer time for the
commit is greater than the static wakeup calculated when panel has
large prefill lines(vbp + vpw + vfp) causing janks on primary when
secondary display enters idle and primary display is running. Add changes
to use default_prefill_lines for configuring static wakeup during bootup
when rsc is in clk state. For vid state only, panel prefill
lines will be taken into account for rsc static wakeup calculation.

Change-Id: I3c0ceec984b24b81e3e4d0341f25cdd28f178925
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-08-31 17:48:19 +05:30
qctecmdr
433e1f67b4 Merge "disp: msm: sde: add checks to avoid null pointer dereference" 2021-08-31 01:42:54 -07:00
Yashwanth
9021984e14 disp: msm: sde: add checks to avoid null pointer dereference
This change adds required checks to avoid accessing the
null pointer in case where memory allocation fails while
dumping the registers in memory.

Change-Id: Ic087a1bd041d193820289672d325a78795c48c14
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-08-30 12:01:14 +05:30
qctecmdr
8c8660fcda Merge "disp: msm: assign aspace to gem object for mmap buffer" 2021-08-19 23:46:20 -07:00
qctecmdr
16b3d11221 Merge "disp: msm: sde: remove idle time from Qsync threshold calculation" 2021-08-19 23:46:19 -07:00
Yashwanth
d7d8a487ca disp: msm: assign aspace to gem object for mmap buffer
During gem fault, if aspace value is found to be NULL
pages map request will be failed. This change assigns
nonsecure aspace to gem object before mapping the pages
in such cases.

Change-Id: Ia838fd8a446e21771742ec9d51e30fe08c989e6e
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-08-19 10:45:46 +05:30
qctecmdr
a85df97b3a Merge "disp: pll: Fix cfg1 value when pclk_src_mux parent is updated" 2021-08-17 01:43:27 -07:00
qctecmdr
b7747c3d23 Merge "disp: msm: sde: hold vmlock only during transition in check phase" 2021-08-13 05:10:34 -07:00
Ritesh Kumar
272f660e76 disp: pll: Fix cfg1 value when pclk_src_mux parent is updated
Currently, PLL_CFG1(1:0) register is updated with cached values
in dsi_pll_enable. This can create issue when UEFI and kernel
cfg1 programming is not same. To fix it, return cached value
of cfg1 when its read in pclk_mux_read, so that pclk_mux_write
is called and cached value is updated. This fix is for 10nm pll.

Change-Id: I8465cb9027a1639f3cdeb02274513ac680f84632
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-08-12 04:08:13 -07:00
Steve Cohen
77d385f62d disp: msm: sde: remove idle time from Qsync threshold calculation
Remove idle time from the Qsync calculation, round down to
the nearest multiple of 4 and remove a couple of extra lines
to compensate for possible latencies. This helps to reduce
the possibility of causing tearing due to the driver calculation
mismatching with the DDIC's expected timeout value.

Change-Id: I8a53a989e26cbd7f0e2b94caa8df8f5bee3ad26c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-08-11 22:38:04 -07:00
Veera Sundaram Sankaran
2a15e531a3 disp: msm: fix dsi debugbus in-mem logging
Update the dump_mem pointer offset while storing the debugbus
data for the second DSI to avoid overwriting to same memory.
As part of the change, register the DSI ctrl with sde_dbg from
ctrl_init directly, instead of debugfs_init to avoid code replication.

Change-Id: I4089f3038ffa89136eaea956d27270f638a99043
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-08-10 16:02:55 +05:30
Veera Sundaram Sankaran
b8a5bf949a disp: msm: add capability to dump limited debugbus info in logs
Add a flag SDE_DBG_DUMP_IN_LOG_LIMITED based on which the debug bus
registers dumped in log can be limited. In memory logging will continue
to dump the full range of configured registers if that flag is set.
Currently the in-log limited support is enabled  only for the sde/vbif
debugbus and both IN_LOG & IN_LOG_LIMITED will be treated the same way
for other blocks.

Change-Id: Ie85d3d16955cfa507bb3e02954d9b313851eef78
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-08-10 15:37:16 +05:30
Andhavarapu Karthik
75fa44a8ab disp: msm: format register/debugbus dumping in logs
Add macros for logging the registers/debugbus, so all blocks
can use the same macros to keep the log format consistent.

Change-Id: Ie28ce83a742f24f3091bedab66c8cf1454bbb943
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-08-10 15:28:46 +05:30
Andhavarapu Karthik
afafffe4ac disp: msm: refactor debugbus to use same helpers
Refactor the debugbus read/logging for sde/dsi/vbif/lutdma to use the
same helpers. Use function pointers to read/write specific hw block
operations. Remove the DBGBUS_FLAGS_DSPP and related checks  as it is
not used. Increase the debugbus block/test-point ranges for all the
blocks to log all the test-points used by hardware.

Change-Id: I07b23d21f9c556eb7575b892f87ab94adfe41116
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-08-10 15:10:06 +05:30
Yashwanth
d7ae274eeb disp: msm: sde: hold vmlock only during transition in check phase
In the current code, vmlock is always acquired in check
phase even if there is no transition between vm's. This
might result in janks if vmlock is held concurrently by
other processes such as backlight update. This change
ensures that vmlock is held only if there is a valid
transition request between vm's in check phase.

Change-Id: I022f04c19ba04fdd5494580cc1436747620b9354
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-08-10 10:24:59 +05:30
qctecmdr
043cd065b3 Merge "disp: msm: sde: increase max size of KMS_INFO" 2021-07-29 21:32:35 -07:00
qctecmdr
75c310ae3e Merge "disp: msm: sde: skip RM reserve for primary in cwb on/off usecase" 2021-07-29 21:32:35 -07:00
qctecmdr
2ffb1dcad6 Merge "disp: msm: sde: add frame trigger count to detect frame count in TE period" 2021-07-29 21:32:34 -07:00
Yashwanth
3f82428a39 disp: msm: sde: add frame trigger count to detect frame count in TE period
When qsync is enabled, if there is a large start threshold
window, there might be a case where two frame transfers
could happen in single TE period if second frame trigger
start is issued within the window and could cause tearing
on the screen. This change adds a atomic variable to detect
multiple frame count and adds vsync wait in such cases to
fix this issue. This variable will be set whenever
wr_ptr_irq arrives and will be reset during rd_ptr_irq.

Change-Id: Ice77b8a717a18d39d70dc08647e15b761ad1c126
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-07-29 14:44:14 +05:30
Jayaprakash Madisetty
90e249a796 disp: msm: sde: update fence offset during cwb usecase in cmd mode
Add changes to avoid clone_mode encoder for detection of panel mode.
This allows cmd mode display to signal the release_fence right after
pp-done/wb-done interrupt and unblocks any input buffers waiting
on release_fence.

Change-Id: Id87e54f29c960e301d42d49d4763220e6e4cc6f5
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-07-29 10:44:29 +05:30
Jayaprakash Madisetty
4e9b8dc601 disp: msm: sde: clear cwb_enc_mask post in_clone_mode is set
Add changes to clear the cwb_enc_mask in sde_crtc_state post
phys_enc->in_clone_mode is set. This is required to avoid
race issues seen when cwb gets enabled in alternate commits.

Change-Id: I555cc0401b3200f7e8bcc6be8884d04cb3ce69fb
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-07-29 10:40:06 +05:30
Mahadevan
2517261d34 disp: msm: sde: increase max size of KMS_INFO
This change increases the size of KMS_INFO which helps
to accommodate large number of timing nodes for exposure
to userspace.

Change-Id: I32b1f47a32dba8ba62731e522fabd406b023ed69
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-07-28 12:38:10 +05:30
Jayaprakash Madisetty
ee9b8ca504 disp: msm: sde: skip RM reserve for primary in cwb on/off usecase
Add changes to skip RM allocation during atomic_check for dsi connectors
which can have a seamless transition during CWB usecase. When CWB gets
enabled in alternate commits N, N+2 on dsi connectors there is back to
back connectors_changed modeset and poll gets enabled for the consecutive
commit N+1, N+3 on rsvp_nxt to get cleared. This rsvp_nxt will be cleared
on drm_atomic_state_put of commit N, N+2, hence atomic_check of commit N+1,
N+3 is blocked until this time causing commit failures.

Change-Id: I06f7a8d9dadb42b6d69201afeff099d554edd98e
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-07-26 14:25:07 +05:30
qctecmdr
ad61b3f235 Merge "disp: msm: sde: update rsvp_cur when poll is enabled for rsvp_nxt" 2021-07-22 23:50:57 -07:00
qctecmdr
a3f4a6ec1a Merge "disp: msm: sde: enable merge_3d_active in ctl when mode_3d is set" 2021-07-20 04:26:34 -07:00
Krishna Manikandan
909d927f88 disp: msm: sde: add dim layer check during secure transition
If no planes are staged during non-secure to secure transition,
dim layer should be staged at the highest blend stage. Add
check to fail those commits where dim layer is not staged
in such scenarios.

Change-Id: Ifd49b00a8ff64547ea12751f6c765fd12e55629e
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2021-07-15 16:49:33 +05:30
osaisruj
4b823cfd80 disp: msm: dsi: change pr_warn to pr_debug
Change pr_warn to pr_debug to avoid extra logging.

Change-Id: I4baf22083005641c77c2ca5a48157d1238b091a2
Signed-off-by: osaisruj <osaisruj@codeaurora.org>
2021-07-09 05:45:49 -07:00
Jayaprakash Madisetty
3e47cf9e55 disp: msm: sde: update rsvp_cur when poll is enabled for rsvp_nxt
This change updates rsvp_cur pointer to latest to avoid use
after free issues. rsvp_cur pointer can be freed in few cases due
to the unlock, wait and lock of rm_lock present in
_sde_rm_poll_get_rsvp_nxt_locked.

Change-Id: I389048188e8a615edc3e75dd1102d4ca8c74af65
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-07-09 17:05:35 +05:30
qctecmdr
9122159c0c Merge "disp: msm: dsi: Logging Improvement in dsi driver" 2021-07-09 02:16:36 -07:00
qctecmdr
9392b33187 Merge "disp: msm: sde: add null check for drm file in msm_release" 2021-07-09 02:16:36 -07:00
Ritesh Kumar
79217384db disp: msm: dsi: Logging Improvement in dsi driver
This change adds additional logs in dsi driver for
easy debugging of issues related to command transfer.

Change-Id: Ica784bed6c360b2760d6606d625837e23a22410c
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-07-07 11:18:46 +05:30
qctecmdr
2ae11f78dd Merge "disp: msm: sde: set ctl preference for built in displays" 2021-07-06 08:55:44 -07:00
qctecmdr
53322c29af Merge "disp: msm: sde: allocate virtually contiguous memory" 2021-06-30 22:10:39 -07:00
qctecmdr
788a042e21 Merge "disp: msm: sde: reset dim layer dirty prop during idle pc" 2021-06-24 12:54:52 -07:00
qctecmdr
b9cf5b2116 Merge "disp: msm: sde: add regblk id for reglog through debugfs" 2021-06-24 12:54:52 -07:00
Jayaprakash Madisetty
b34e02b641 disp: msm: sde: enable merge_3d_active in ctl when mode_3d is set
Add changes to set merge_3d_active in ctl datapath when
mode3d is enabled without half panel partial update.

Change-Id: I35c1f4c6045c4040cac730f23a6d9ce5f36cf5fb
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-06-24 18:53:33 +05:30
Yashwanth
564ee1441d disp: msm: sde: reset dim layer dirty prop during idle pc
During idle power collapse, dim layer dirty flags are
stored in sde_crtc_state which might be invalid if state
swap occurs. This change adds revalidate mask in sde_crtc
structure to revalidate after coming out of idle power
collapse.

Change-Id: Ie2f34a794896a3f8e729ef7d1f3ae35340123257
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-06-23 13:27:07 +05:30
Krishna Manikandan
9d88585e1d disp: msm: sde: add null check for drm file in msm_release
Drm file is not set to NULL after freeing it from drm
release. This can result in use-after-free issues in
some scenarios. Add a mutex lock and other proper null
checks to prevent such issues.

Change-Id: Ic35b0a76166b0f47a354b1737e6f4c3ac1437ed4
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2021-06-23 12:00:38 +05:30
Lei Chen
b961099875 display: msm: qpic: Add QPIC display support base on DRM framework
QPIC display is used to send frame data to panel over Qualcomm Parallel
Interface Controller on MDM project.
Old QPIC display driver is base on framebuffer framework, but now
msm framebuffer driver is no longer used.
So add supoport for QPIC display driver base on tiny DRM framework.

Change-Id: I4f2434c9f9ad536e2ea56ed3daa6eb12ad56255b
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-06-20 22:18:43 -07:00
qctecmdr
dbb61136a6 Merge "disp: msm: sde: poll for rsvp nxt after idle" 2021-06-18 15:10:34 -07:00
qctecmdr
40dce79003 Merge "disp: msm: sde: add support for monaco capabilities" 2021-06-18 02:23:49 -07:00
qctecmdr
4355bbf51e Merge "disp: msm: sde: update perf cpu dma latency votes on idle in video mode" 2021-06-17 22:15:38 -07:00
qctecmdr
81f6f90580 Merge "disp: msm: sde: add changes to fix the sde fence signaled logic" 2021-06-17 07:30:22 -07:00
Nilaan Gunabalachandran
fb8235db1b disp: msm: sde: poll for rsvp nxt after idle
During mode enable after idle, rsvp next would be set without
rsvp cur. Back to back test only should be serialized, but currently
this would be possible right after idle. This is established by
commit 11aab5f9c3 ("disp: msm: sde: Fix null dereference errors").
This change updates the condition to poll for rsvp next clear
during this usecase as well.

Change-Id: I300254967cbec69fff8b31545b8d659afc56f283
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-06-16 20:42:53 +05:30
qctecmdr
20f10a6f65 Merge "disp: msm: dsi: Add support to enable LP11 insertion feature" 2021-06-16 01:11:10 -07:00
Anjaneya Prasad Musunuri
0730de9e4b disp: msm: sde: allocate virtually contiguous memory
This change uses kvzalloc to allocate memory for lutdma buffers.
This is needed since kernel cannot guarantee that physically
contiguous allocations greater than 32 KB will succeed.

Change-Id: I91c12bbd612408692ba8e4a3cd9ac1ce308eda64
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
2021-06-15 22:20:45 +05:30
Jayaprakash Madisetty
85ea12542f disp: msm: sde: add changes to fix the sde fence signaled logic
This change allows signalling of sde fences when sequence number is
less than done_count. In current scenario, fence is not signaled as
the subtraction result is not typecasted to int before updating
the status causing the UI thread to block on sde fence.

Change-Id: I3ca62222e0c67223b9eaf299474a2c282d761d3a
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-06-15 18:50:08 +05:30