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>
This commit is contained in:
Abhijit Kulkarni
2021-05-20 13:59:01 -07:00
parent 72f7dfe428
commit b4f00361f3
3 changed files with 16 additions and 6 deletions

View File

@@ -117,7 +117,13 @@ enum sde_dbg_dump_context {
* number must be greater than print entry to prevent out of bound evtlog
* entry array access.
*/
#if IS_ENABLED(CONFIG_DRM_SDE_VM)
#define SDE_EVTLOG_ENTRY (SDE_EVTLOG_PRINT_ENTRY * 8)
#else
#define SDE_EVTLOG_ENTRY (SDE_EVTLOG_PRINT_ENTRY * 32)
#endif /* IS_ENABLED(CONFIG_DRM_SDE_VM) */
#define SDE_EVTLOG_MAX_DATA 15
#define SDE_EVTLOG_BUF_MAX 512
#define SDE_EVTLOG_BUF_ALIGN 32
@@ -162,7 +168,11 @@ extern struct sde_dbg_evtlog *sde_dbg_base_evtlog;
* number must be greater than number of possible writes in at least one
* single commit.
*/
#if IS_ENABLED(CONFIG_DRM_SDE_VM)
#define SDE_REGLOG_ENTRY 256
#else
#define SDE_REGLOG_ENTRY 1024
#endif /* IS_ENABLED(CONFIG_DRM_SDE_VM) */
struct sde_dbg_reglog_log {
s64 time;