The register offsets are decremented instead of incrementing during
the logging of registers through the debugfs option. Fix it to be
incremental to help in debugging.
Change-Id: Iefc98c40143554fa7169ff220793431d774f57ce
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
Currently, driver is determining the amount of memory to allocate
based on the event log object indexes (first, last). The last index
can change if there is additional logging done during the coredump
phase and potentially cause an out-of-bound memory access during
buffer traversal.
This change restrict the event log object traversal to a maximum
of the output buffer size.
Change-Id: I91e5734362d2d7a796129fce85e27611bab2245f
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
Add support display emulation targets on RUMI
This change does the following:
-parse dt node to enable display emulation mode.
-use sde_reg_read for pool timeout ops and debug fs dump.
-increases the kickoff timeout when emulation is enabled.
-bypass AXI halt operation when emulation is enabled.
Change-Id: Idc493964c0b8fc89f5d85fcc5755e0874a12d211
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
Merge reg_dump and dbgbus dump flag into dump_mode, and bring
back debugfs node "evtlog_dump" to keep flexible controlling
of evtlog.
Set in_mem option as default dump mode, since in_coredump
option will be enabled once HW recovery feature is enabled.
Change-Id: I75de1a69b01594b652479bf79201591ac0bf62e5
Signed-off-by: Bruce Hoo <quic_bingchua@quicinc.com>
Set a flag to avoid multiple reading of sde_dbg info, that
reduces devcoredump reading time.
Change-Id: I83f77dea35bb818d51b0982124a54ffeef7db8af
Signed-off-by: Bruce Hoo <quic_bingchua@quicinc.com>
* quic/display-kernel.lnx.5.10:
disp: msm: sde: avoid error during fal10_veto override enablement
disp: msm: update copyright description
disp: msm: sde: configure dest_scaler op_mode for two independent displays
disp: msm: dp: updated copyright set for 4nm target
Revert "disp: msm: sde: consider max of actual and default prefill lines"
disp: msm: sde: Reset backlight scale when HWC is stopped
disp: msm: dp: avoid duplicate read of link status
disp: msm: dsi: update vreg_ctrl settings for cape
disp: msm: fail commit if drm_gem_obj was found attached to a sec CB
disp: msm: dp: updated register values for 4nm target
disp: msm: sde: update framedata event handling
disp: msm: dsi: Add new phy comaptible string for cape
disp: msm: sde: software override for fal10 in cwb enable
disp: msm: update cleanup during bind failure in msm_drm_component_init
disp: msm: sde: dump user input_fence info on spec fence timeout
disp: msm: sde: add null pointer check for encoder current master
disp: msm: dsi: enable DMA start window scheduling for broadcast commands
disp: msm: sde: avoid alignment checks for linear formats
disp: msm: reset thread priority work on every new run
disp: msm: sde: send power on event for cont. splash
disp: msm: sde: always set CTL_x_UIDLE_ACTIVE register to "1"
disp: msm: use vzalloc for large allocations
disp: msm: sde: Add support to limit DSC size to 10k
disp: msm: sde: add tx wait during DMS for sim panel
disp: msm: dsi: add check for any queued DSI CMDs before clock force update
disp: msm: sde: correct pp block allocation during dcwb dither programming
disp: msm: sde: avoid setting of max vblank count
disp: msm: sde: add cached lut flag in sde plane
disp: msm: sde: avoid use after free in msm_lastclose
disp: msm: sde: update TEAR_SYNC_WRCOUNT register before vsync counter
disp: msm: dsi: Support uncompressed rgb101010 format
disp: msm: sde: update idle_pc_enabled flag for all encoders
disp: msm: sde: flush esd work before disabling the encoder
disp: msm: sde: allow qsync update along with modeset
disp: msm: dp: avoid dp sw reset on disconnect path
disp: msm: sde: consider max of actual and default prefill lines
disp: msm: ensure vbif debugbus not in use is disabled
disp: msm: sde: update cached encoder mask if required
disp: msm: sde: while timing engine enabling poll for active region
disp: msm: enable cache flag for dumb buffer
disp: msm: sde: disable ot limit for cwb
disp: msm: sde: avoid race condition at vm release
disp: msm: dsi: set qsync min fps list length to zero
disp: msm: sde: reset mixers in crtc when ctl datapath switches
disp: msm: sde: update vm state atomic check for non-primary usecases
disp: msm: sde: reset CTL_UIDLE_ACTIVE register only if uidle is disabled
Change-Id: If480e7f33743eb4788549f853ba05e744ecb38d3
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
Update the DSI debugbus logging to print correct offsets for
DSI0/DSI1. Change the VBIF logging to reflect the actual register
value written for block-id instead of BIT value. Update the register
dump format to match the logging style across all dumping methods.
Change-Id: Id862c47e3fb77e1518327dad550a55df1825df89
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
Remove unnecessary register block size < REG_DUMP_ALIGN check during
the sde_dbg registration of a HW blcok. This avoids the registration
failures for few smaller hw blocks. The register size is padded later
according to REG_DUMP_ALIGN during the hw block register dump time.
Change-Id: I36474720a630f1c3e96072b1d6d8743018fcaeec
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
Use #if IS_ENABLED() instead of #ifdef for configurations as vendor module
guidelines.
Use #if IS_ENABLED(CONFIG_XXX) instead of #ifdef CONFIG_XXX to ensure that
the code inside the #if block continues to compile if the config changes
to a tristate config in the future.
The differences are as follows:
1.#if IS_ENABLED(CONFIG_XXX) evaluates to true when CONFIG_XXX is set to
module (=m) or built-in (=y).
2.#ifdef CONFIG_XXX evaluates to true when CONFIG_XXX is set to
built-in(=y) , but doesn't when CONFIG_XXX is set to module(=m).
Use this only when you're certain you want to do the same thing
when the config is set to module or is disabled.
Change-Id: Ia806b9b01ad8414d0e4de027a382cb68e7fb4a6a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Add devcoredump support for sde_dbg. Devcoredump is a mechanism
providing generalized way to get data from kernel modules. This change
integrates devcoredump into sde_dbg to get evtlog, register dump and
dbg_bus when display failure happens.
Change-Id: I4daf25443ccd2646de580314a0bfe08b84dbc282
Signed-off-by: Bruce Hoo <quic_bingchua@quicinc.com>
pm_runtime_get_sync increases the usage_count refcount immaterial of
success/failure of the call, leading to invalid refcount on failures.
Use pm_runtime_resume_and_get instead, which takes care of reducing the
refcount on failure cases before returning from the function.
Change-Id: Ib96050d5d7ecbd717e58b8a0dde2d03312444e15
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
Large allocations using kzalloc can lead to timeouts. This updates
the allocation calls accordingly to use vzalloc to remove
requirements on contiguous memory.
Change-Id: I86fa0ae13277d97477210a082703514df792d8a9
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
Ensure register write is complete with a write barrier
while disabling other vbif debugbus when not in use
and also while clearing the test point.
Change-Id: I40da69027f86e13f4a71d87ad3975f94a5a1cb31
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
This change adds support in mdp and dsi driver to support
multiple SIS.
Change-Id: I432068cea17e1784d7570a472fbadaa86695df07
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Align the HW catalog to use common naming amongst the "revision"
and "version" structure members.
Change-Id: Ib6c81aee6cb49208b0699db4a75b4eb9dc79e800
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
Latest Kernel modified list_sort to receive 'const' parameters in
its function pointer, this change modifies the functions used
by list_sort to add 'const' parameters.
Change-Id: I83212e1e7a749132c90011d0a8933c5eb2990bd2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add support to the dump the DP register space and debugbus information.
Change-Id: I903471b07fdd1926b0fc505a980b2a5048387b69
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>