提交图

50 次代码提交

作者 SHA1 备注 提交日期
qctecmdr
88877f3037 Merge "disp: msm: sde: add sde data to va minidumps" 2021-08-15 18:31:12 -07:00
qctecmdr
8ff5362a29 Merge "disp: msm: update register dump and debug bus memory allocation" 2021-07-21 21:20:52 -07:00
Andhavarapu Karthik
76d171e611 disp: msm: sde: add sde data to va minidumps
VA minidumps supports to add any allocated variable or data to
minidumps. Add panic notifier and wrapper function to add
sde data to minidump va. Add event log, register log, register dumps,
debug bus and different sde variables and states info to minidump.

Change-Id: If54da0b7067df17877e4da645d82f1705baa3f6d
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-07-19 16:00:57 +05:30
Karthik Andhavarapu
2db495708f disp: msm: update register dump and debug bus 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 multiple minidump bin files
after a crash. 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 bin file.
Use kvzalloc and kvfree to allocate and free this memory as
the memory needed to allocate is around 126 KB. Update the
allocation of debug buses also to kvzalloc and kvfree.

Change-Id: Ia5cca47b085bcca57ce09981a55cc1bfbeeae77e
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-07-15 23:00:09 +05:30
Samantha Tran
ae94f07d6e disp: msm: avoid using spinlock while adding evtlog entry
Add support to use atomic variable instead of spinlog
for event log while adding enries. This change will
help optimize event log writing time.

Change-Id: I83661b85cd76ca738729ac51aa5afd97d162508d
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-07-07 16:25:32 -07:00
Prabhanjan Kandula
5fbf873b7b disp: msm: avoid miscalculation in dsi debug bus dump size
Fix dsi count calculation which is used in determining size of
the memory allocated for dsi debug bus dump of all dsi controllers.

Change-Id: I22462eff41ebafde787a6cf4c1751104846bc6a5
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-06-21 12:35:06 -07:00
Abhijit Kulkarni
b4f00361f3 display: msm: optimize driver debug allocations
This change uses kvzalloc to allocate memory for eventlog and register
dumps. This is needed since kernel cannot guarantee that physically
contiguous allocations greater than 32 KB will succeed.
Additionally it reduces the number of entries for evt logs and
register dumps for trusted vm.

Change-Id: I8b76e79d62850904f6445d8b66c882529ba6e9ba
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-05-28 14:44:18 -07:00
qctecmdr
5c98599ecd Merge "disp: msm: avoid logging reg virtual addr by default in sde_dbg_dump" 2021-05-15 21:42:12 -07:00
Veera Sundaram Sankaran
179a858272 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>
2021-05-10 08:53:35 -07:00
Veera Sundaram Sankaran
9afca0236d disp: msm: avoid logging reg virtual addr by default in sde_dbg_dump
Avoid all info logging during sde_dbg_dump by default as it can be
derived while parsing the ramdumps. Use the reg_dump & dbgbus_dump
debugfs nodes to control the in-mem/in-log mode of these logs.

Change-Id: I709d49a4a503618b9621f32725a8fbd5359a0600
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-05-10 07:53:21 -07:00
qctecmdr
73af2dd604 Merge "disp: msm: add physical address info when dumping display registers" 2021-05-07 17:41:36 -07:00
Yu Wu
55340a43c3 disp: msm: add physical address info when dumping display registers
In dumping display registers, physical address will be appended after
each block name. This is to support register compare between kernel
and UEFI.

Change-Id: Ic20d3e2bd4c95aa7c71c4b646a149f7e83ad731a
Signed-off-by: Yu Wu <zwy@codeaurora.org>
2021-05-06 02:59:16 -07:00
Veera Sundaram Sankaran
808949e35c disp: msm: avoid logging event logs by default in sde_dbg_dump
Avoid printing the eventlogs in kernel logs during display debug
logging through sde_dbg_dump to avoid excessive logging. Add a
debugfs node to control in-mem/in-log mode of eventlogs to help
in debugging.

Change-Id: If98b129cafa9d29eccd0c44285f1058876f3e1ea
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-05-05 14:43:39 -07:00
Veera Sundaram Sankaran
031b1b5935 disp: msm: enable power resources while dumping registers in WQ
Enable sde power resources while dumping the registers in
SDE_DBG_DUMP_IRQ_CTX context after switching to workqueue.
The call is initiated from IRQ context and queued to workqueue
for execution. The extra vote will make sure the resources are
kept enabled through the register dumping.

Change-Id: I938049f6e2f1504ada2ce34ed4f56abb9c564f10
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-04-12 10:21:14 -07:00
Yashwanth
0a70e05ee5 disp: msm: sde: remove static access specifier for sde_dbg_base
In DLKM builds, all the display symbols are included as part
of msm_drm.ko and symbols are dynamically linked while
loading ramdumps. This change removes static specifier for
sde_dbg_base in order to access the variable from ramparser
and extract the required logs with the help of ramparser
tool and also in automation stability runs.

Change-Id: I3eae0bc9db3bd285642bf9f7930a31ab47c446e3
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-03-31 15:25:21 -07:00
Yashwanth
43d147f299 disp: msm: sde: save register write logs in dump
Changes are made to add register write logs to memory dump.
This can be extracted from crash dumps and used for analysis.

Change-Id: If46aaa4ae68f83c79d4b51cbe5dfd22340aa991d
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-03-31 15:02:54 -07:00
Veera Sundaram Sankaran
b261fe33db disp: msm: avoid sde_dbg HW access based on HW ownership
Add VM ownership checks before accessing the HW through the debugfs
path in sde dbg module to avoid illegal access. Set the ownership
status on bootup based on the VM.

Change-Id: I30f2a1eb7e049740f1f7fe3ed03aa411264ba7b3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-31 14:57:04 -07:00
qctecmdr
19e9831a45 Merge "disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name" 2021-03-25 14:22:21 -07:00
Tatenda Chipeperekwa
c6257272d4 disp: msm: fix compilation errors for dlkm compilation
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.

Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-22 15:25:36 -07:00
Veera Sundaram Sankaran
5bbf449148 disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name
Currently, SDE_DBG_DUMP takes any number of hw block names along with
few defined strings as arguments. This set of arguments is used to
determine which HW block registers needs to be dumped. Move to a
blk bitmask to avoid passing a large set of arguments. The bitmask is
split based on the clks required to access the HW block for ease of use.
The lower 0-23 bits are used for HW blocks which can be accessed by just
enabling the MDP clks. DP is kept separate as it needs DP specific
clks to be enabled. Add a debugfs node through which the mask can be
modified, which can be useful while using the debugfs dump option to
force a panic.

As part of the change, remove in-log/in-mem enable mask debugfs node
for every debugbus and use a single node to control the logging
mechanism for all the HW blocks debugbus.

Change-Id: Ibb6354b3e3265c9911104bb0f964616eb8a898c9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-19 16:50:45 -07:00
Veera Sundaram Sankaran
84ec84696e disp: msm: add dp register & debugbus dump support
Add support to the dump the DP register space and debugbus information.

Change-Id: I903471b07fdd1926b0fc505a980b2a5048387b69
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-08 14:38:28 -08:00
Veera Sundaram Sankaran
6389071ca8 disp: msm: add rscc wrapper debugbus support
Add support to the dump rscc wrapper debugbus information.

Change-Id: Id680615ebda6aeec093437b1b0b1708357f01d37
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-08 14:38:25 -08:00
Veera Sundaram Sankaran
e8dd7a5ab3 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>
2021-03-08 14:38:21 -08:00
Veera Sundaram Sankaran
cbdfd8b56d 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: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-08 14:38:18 -08:00
Veera Sundaram Sankaran
32db918ef9 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: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-08 14:38:15 -08:00
Mahadevan
626d6ef343 disp: msm: re-factor debug bus logic to dump all test points
As per the HW teams guidelines, allow dumping the status of
all the HW blocks blocks at every test point.
This code brings in the following changes
1) Featurize the hw block  and test point range per target.
2) Reduce the debug bus entries and decrease the static
   memory foot print.
3) Allow analyzers to be integrated into the new format.

Change-Id: Ic3bc2c1b77f5617b0f81a2066b22e50cfd6ff8dd
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2020-12-23 08:55:48 +05:30
Dhaval Patel
4a21b7b6d8 disp: msm: enable event log and disp ramdump without DEBUG_FS
This patch allows event log and display ramdump
module compilation when DEBUG_FS config is in disabled
state.

Change-Id: Ibe1ff7d9d4a4f3c64091df757caba2450295e7ec
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-10-21 17:01:52 -07:00
Christopher Braga
4a4e450b2c disp: msm: sde: Add debug bus dump support for LUTDMA
Add hooks to dump LUTDUMA debug bus status during dumping
of system debug status. LUTDMA debug bus can be accessed
from userspace via the "recovery_lutdma_dbgbus" debugfs node.
Output control of the LUTDMA_dbbus is managed by the
"reg_dma_dbgbus" node.

Change-Id: Iea011279dd3806f0f594102ce7a5dc018a8d2b7c
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-08-20 16:07:07 -04:00
Samantha Tran
22923230ef disp: msm: modify handling of debugfs initialization
Add support to allow creation of debugfs node only if
CONFIG_DEBUG_FS is enabled.

Change-Id: Iaeaf51b3654c9458cf8131a9756e6b905007c4ae
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2020-04-16 23:55:48 -07:00
Steve Cohen
b5acfe1e42 disp: msm: refactor DSI debugbus dumping
Move DSI debugbus dumping logic from DSI driver to sde_dbg
in order to utilize the framework in place for debugbuses.

This allows for more control over the dumping logic, such
as where the dump data is stored(memory/console), via nodes
populated in debugfs.

Change-Id: Iff507fdaa02d26af26743e81f6048aec57c09a76
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-30 23:35:42 -04:00
Steve Cohen
5e1d3e5869 disp: msm: fix buffer size calculation for VBIF debug bus
Fix the buffer size calculations for dumping VBIF debug bus
data. The previous code didn't take in to account that not
all test point reads start from 0 resulting in a much larger
than necessary buffer containing lots of useless zeroed data.

Change-Id: I4379f9e6517d51e1eaebe1ded32a7fc1f87cb3d4
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-30 23:31:28 -04:00
Steve Cohen
39e4e0bd82 disp: msm: use generic read function for dbgbus dumps via debugfs
Use a single read function for dumping SDE, VBIF, and DSI debugbus
dumps via debugfs when a recovery event occurs.

Change-Id: I9828a308cabea6f73d9219d784b097913a31dcee
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-30 23:31:28 -04:00
Steve Cohen
f26ab4d5c4 disp: msm: enable debugbus support for MDSS 7.x derivatives
Change the version checks to only consider the major revision
so debug bus support trickles down from premium tier targets.

Change-Id: I882957c043c9de7cebf595d719bfd35f2c18f447
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-30 23:27:42 -04:00
Dhaval Patel
141afabada dips: msm: configure sde and vbif dbg name
Configure sde and vbif debug bus name when
it is registered instead of while registering
the debugfs node.

Change-Id: I41afeede0b3d725a3b6d164e1c0f22e05f7320ec
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-03-29 19:25:04 -07:00
Steve Cohen
a75c28266e disp: msm: add debugbus support for lahaina
Update the table with new testpoints added for lahaina.

Change-Id: Ib1253f696e6e670b6dc475cc68a73c8c41ee264b
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-16 19:58:57 -04:00
Steve Cohen
7fe084620e disp: msm: sde: use devm_kzalloc for debug dumps
Upstream has added an "enhancement" to the DMA allocator to
reject coherent allocations less than a a full page, so allocate
device managed memory instead of artificially inflating the
buffer sizes. This has the added benefit of having this memory
automatically freed when the module is unloaded, avoiding
possible leaks.

Change-Id: I653f2cd1f06f1a352cd61e36ea8baaf7c30efd98
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-16 19:56:33 -04:00
Steve Cohen
32ad348d81 disp: msm: sde: add MDSS_HW block range for debugfs register access
Register the MDSS_HW block (at base offset 0) for access via the
sde_reg node in SDE's debugfs directory. This is needed for
validating correct UBWC register programming.

Change-Id: I2494e066a7603747f2ec12546e58a17f2120a521
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-03-08 01:42:56 -08:00
Gopikrishnaiah Anandan
62e17c125b disp: msm: update debug dump for ltm block
Local tone mapping hardware block has defined test points for debug bus.
Change updates the missing test points and enables dumping of the
registers in case of DPU hang.

Change-Id: I5bb5419255e84427c0a1393f8e9322b981eea084
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2019-10-22 11:43:47 -07:00
qctecmdr
dc7e1224cc Merge "disp: msm: add length check for debugfs_ctrl" 2019-08-30 20:06:42 -07:00
Prashant Singh
4145770b07 disp: msm: add length check for debugfs_ctrl
Add check for length of debugfs_ctrl value before
copying to user buffer invoked during read operation.

Change-Id: I199110992921d0ae3791129fa0bf1e51dcca9107
Signed-off-by: Prashant Singh <prasin@codeaurora.org>
2019-08-27 20:34:45 +05:30
Vara Reddy
e7e59b8ec4 disp: msm: sde: add dsi debug bus for kona device
Change adds dsi debug bus support for kona based devices.

Change-Id: Ied969abff63128efdd39a9900380dd726666842d
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-07-30 13:46:43 -07:00
Satya Rama Aditya Pinapala
edef6ae040 disp: msm: dsi: snapshot of dsi from 4.14 to 4.19
This change is a snapshot of dsi files taken of 4.14
as of commit 764f7c2 (Merge remote-tracking branch
'quic/dev/msm-4.14-display' into msm-4.14)

Change-Id: I8361a844c35a4450f7800964a8da2741676fd6c7
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-07-11 12:29:10 -07:00
Lakshmi Narayana Kalavala
b69f691680 disp: msm: sde: enable reg write only for debug defconfig
Write to hardware registers should be exposed for only debug
purpose. Hence use CONFIG_DYNAMIC_DEBUG to restrict register
writes only for debug defconfig.

Change-Id: I0b67b46a69920f6620570ace9d4faf732076126d
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-06-13 14:53:17 -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
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
3f35432626 Merge "disp: msm: avoid vbif and wb register dumps in secure mode" 2019-05-21 01:20:03 -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
Veera Sundaram Sankaran
bbd12dee59 disp: msm: avoid vbif and wb register dumps in secure mode
VBIF and WB register HLOS access is revoked during
secure-display session. Dumping those registers at
ping pong done timeout causes access violation.
Hence avoid vbif and wb register space dumping in secure mode.

Change-Id: I5d327178e9f6232257b3d2fbfef8ca7ef78db2e1
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-05-13 15:22:41 -07:00
Dhaval Patel
a74d2cf7fa disp: msm: add runtime_pm ops support in drm driver
Add runtime_pm ops support in drm driver instead
of direct sde_power_resource_enable/disable call.
It allows drm driver to use runtime pm refcount logic
to track the resources instead of custom implementation.
The change also removes the NRT_CLIENT support from
sde_power_handle code to simplify it further.

Change-Id: Ib14692dca5876703d0a230da2512d731b69b8ebb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-04-24 13:27:48 -07:00
Narendra Muppalla
3709853456 Display drivers kernel project initial snapshot
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.

Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-04-14 22:20:59 -07:00