Commit graph

1,970 commits

Author SHA1 Message Date
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
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
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
qctecmdr
8ace83edee Merge "disp: msm: dsi: Remove unused for loop in ESD reg read validation" 2021-06-12 00:38:09 -07:00
qctecmdr
babe9a447b Merge "disp: msm: sde: remove fb's attached to a drm_file in preclose" 2021-06-11 20:08:11 -07:00
qctecmdr
1cacbb513b Merge "disp: msm: sde: add register dumps to minidump" 2021-06-11 10:49:22 -07:00
Ritesh Kumar
587be9368e disp: msm: dsi: Add support to enable LP11 insertion feature
Some panels may require that the DSI link returns to the low-power
stop state (LP11) after transmission of every line. If a panel
requires that the DSI link returns to LP11, apply the LP11
insertion between lines feature.

This change adds support to
 - Disable the command mdp burst mode
 - Enable mdp idle ctrl
 - Program the No. of dsi pclk cycles of idle time to
   insert between command mode mdp packets. The idle time
   must be long enough to cover the time link takes to
   switch between HS to LP11 mode.

Change-Id: Ie718d334f05ce6c1ecd1a05b379bbbe18dec6330
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-06-10 12:58:28 +05:30
Venkata Prahlad Valluru
3fe858f773 disp: msm: sde: add support for monaco capabilities
Add support for SDE version 6.8.0.

Change-Id: I899be796f95dd63d2e3f0cecdb7693e94f5d17f3
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-06-09 16:00:16 +05:30
Ritesh Kumar
42ccb14154 disp: msm: dsi: Remove unused for loop in ESD reg read validation
In ESD register read validation, a for loop is used to increment a
local variable with the length of ESD command. But this is unused
in the validation of the read data. This change removes the unused
for loop.

Change-Id: I6d1a9233061ee33a2b5390e2f922a2412af7d605
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-06-07 00:52:18 -07:00
qctecmdr
e8b704e098 Merge "disp: msm: sde: fix imbalance power vote during cwb and dms concurrency" 2021-06-06 06:28:39 -07:00
qctecmdr
630d896ec6 Merge "disp: msm: sde: enable rotator in gki config for holi" 2021-06-03 15:41:13 -07:00
Jayaprakash Madisetty
dbe2279227 disp: msm: sde: fix imbalance power vote during cwb and dms concurrency
Imbalance power vote caused with below scenario:

1. Primary display running with CWB enabled.
2. Idle-PC has kicked in causing primary and cwb encoder to rc_idle state.
3. Post idle-PC with DMS switch enabled along with CWB.

Changes made are to avoid pre_modeset and post_modeset callbacks
for CWB encoder as it not required and it puts a unnecessary power
vote causing power issues in suspend usecase.

Change-Id: I95b7ba093484f50be5f575cafa63a02e8fbca441
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-06-03 17:09:11 +05:30
Yashwanth
5a0388a3ed disp: msm: sde: add regblk id for reglog through debugfs
This change adds register blk id for reglog while dumping
through debugfs.

Change-Id: I59ce35a0b6cb4199dd5489568c8d315e584650be
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-06-03 11:32:45 +05:30
Jayaprakash Madisetty
1834bd53be disp: msm: sde: set ctl preference for built in displays
Add changes to set CTL id preference for primary and secondary
builtin displays. This change check for preference if already set
from DT. If not preference will be set during connector init.
This avoids CTL datapath switches on secondary when there is dual
display usecase running concurrently with dp connect/disconnect.
In current issue scenario, due to the secondary ctl datapath
switch CTL_LAYER programming is happened on CTL_2 but CTL_FLUSH is
happened on CTL_1 causing pp_done timeout issues.

Change-Id: I5f1f52b7673740c48b249ab4d36e80b7a1d3db96
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-31 20:35:48 +05:30
Andhavarapu Karthik
b7db20d3ca disp: msm: sde: update perf cpu dma latency votes on idle in video mode
In video mode for fps greater than 60, perf cpu dma latency votes
are not removed during idle fallback. Made changes to remove and
add the perf cpu dma latency votes during idle fallback and idle
exit scenarios respectively.

Change-Id: I8dffc743bd48c96a6022935f71057a0223d9696e
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-31 17:44:06 +05:30
Jayaprakash Madisetty
6cddd238e8 disp: msm: sde: remove fb's attached to a drm_file in preclose
This change avoids upstream drm issuing drm_atomic_commit in
drm_fb_release which is leading to artifacts on screen or
atomic_check failures due to atomically unstaging each fb
from plane_state and committing remaining planes on hardware.

 a) This patch moves the state operations for setting crtc to
    connector state to a helper api.
 b) This patch clears any dim_layers present in the crtc_state
    as part of null commit.
 c) This patch removes any framebuffers attached to a drm_file
    in msm_preclose whose refcount is not managed by composer kill
    inadvertently and issues null flush to hardware in such cases.
 d) This patch handles msm_preclose as part of msm_release
    operation since legacy feature is not supported
    for msm_driver.

Change-Id: Ib2068d74d4b23b73b7c84544858c9f6bb6adfa67
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-27 20:42:47 +05:30
Jayaprakash Madisetty
2c8aa84b33 Revert "disp: msm: sde: remove all preclose logic"
This change reverts commit ae2dceb0b6 ("disp: msm:
 sde: remove all preclose logic"). This change also
modifies the force disable plane logic since
__drm_atomic_helper_disable_plane is not exposed to
drivers.

Change-Id: I89e19dead9ade724798952b1934b45b5663e1a42
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-26 11:35:04 +05:30
qctecmdr
73b5bf579d Merge "disp: rotator: add rev checks for rotator for blair target" 2021-05-24 21:58:28 -07:00
qctecmdr
b23c21020f Merge "disp: msm: sde: add rev checks for blair target" 2021-05-24 21:58:28 -07:00
Yashwanth
29f312b5d9 disp: msm: sde: enable rotator in gki config for holi
This change enables offline rotator in holi target for
gki defconfig.

Change-Id: Ic128d46fc1cfa98b873c6edb3e1b5e10396b8954
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-24 15:58:30 +05:30
Andhavarapu Karthik
b7d7dbc6e7 disp: msm: sde: add register dumps to minidump
Add register dumps partition to minidump.

Change-Id: I587e5169747eb60780a698b0f7756bb52c9ef853
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-24 11:59:41 +05:30
Andhavarapu Karthik
cab792ba29 disp: msm: sde: aggregate all register dump memory allocation
In current implementation, register dump memory is allocated
separately for each range and block. When register dumps are
added to minidump, this will generate around 32 minidump bin files.
Changes are made to allocate all the required register dump memory
once. When register dumps are added to minidump, this will generate
only one minidump file.

Change-Id: I04d4d8db559f21f862f8989d3dfcfa7d9aef6dc5
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-24 11:45:23 +05:30
Venkata Prahlad Valluru
50da4227a1 makefile: add monaco config for display techpack
Add required changes to makefile and enable the config
keys for monaco target compilation.

Change-Id: I9cef5beb43abb257de913df62044f9c24bdf948f
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-05-21 01:29:16 -07:00
Venkata Prahlad Valluru
6acbb2dea4 disp: msm: typecast variables as long long for 64 bit operations
Define 64 bit variables as unsigned long long to ensure
8 bytes in 32 bit builds.

Change-Id: I723ae0c4ba6a0de07c92d14eeef95bde095c8e3d
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-05-21 01:28:59 -07:00
Venkata Prahlad Valluru
6eab43458e techpack: display: fix div64 error for 32 bit build
use div_u64 instead of /, for 64 bit division.

Change-Id: I791e027beb6817810d63a6a2d0a1a29f88bdb5d5
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-05-21 01:28:43 -07:00
Andhavarapu Karthik
ad69f4cc0c disp: rotator: add rev checks for rotator for blair target
Add revision checks required for rotator for blair
target.

Change-Id: I04b107b5c85a20585a473a0ace56be07b26a357f
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-21 12:13:30 +05:30
qctecmdr
41c8fc3cfe Merge "disp: msm: sde: modify in_clone_mode after wb_reset is done" 2021-05-20 05:52:33 -07:00
qctecmdr
8e46f0888f Merge "disp: msm: sde: correct num_datapath during PM resume with CWB" 2021-05-20 05:52:33 -07:00