Skip to content

Commit

Permalink
soc/google: DSS: Fix s2r dss logging
Browse files Browse the repository at this point in the history
- DSS logging - suspend to ram cannot work because initialized with
  dss disabled status. Fix it to start after enable done.

BUG: 258745602
Signed-off-by: Hajun Sung <[email protected]>
Change-Id: Id73e633f5e4d83372d65f45412d7480210c18628
  • Loading branch information
Hajun Sung authored and Jone Chou committed Nov 11, 2022
1 parent 90a4995 commit 5298cf3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions drivers/soc/google/debug/debug-snapshot-local.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ struct dbg_snapshot_dpm {
extern void dbg_snapshot_init_log(void);
extern void dbg_snapshot_init_dpm(void);
extern void dbg_snapshot_init_utils(void);
extern void dbg_snapshot_start_log(void);
extern int dbg_snapshot_dt_scan_dpm(void);
extern int dbg_snapshot_get_enable(void);
extern void __iomem *dbg_snapshot_get_header_vaddr(void);
Expand Down
13 changes: 9 additions & 4 deletions drivers/soc/google/debug/debug-snapshot-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,6 @@ void dbg_snapshot_init_log(void)
{
struct dbg_snapshot_item *item = &dss_items[DSS_ITEM_KEVENTS_ID];
struct dbg_snapshot_log_item *log_item;
struct device_node *np = dss_desc.dev->of_node;
struct property *prop;
const char *str;
unsigned int i = 0;

log_item_set_filed(TASK, task);
log_item_set_filed(WORK, work);
Expand All @@ -710,6 +706,15 @@ void dbg_snapshot_init_log(void)
log_item_set_filed(THERMAL, thermal);
log_item_set_filed(ACPM, acpm);
log_item_set_filed(PRINTK, print);
}

void dbg_snapshot_start_log(void)
{
struct property *prop;
const char *str;
unsigned int i = 0;

struct device_node *np = dss_desc.dev->of_node;

if (dbg_snapshot_is_log_item_enabled(DSS_LOG_SUSPEND_ID)) {
register_trace_suspend_resume(dbg_snapshot_suspend_resume, NULL);
Expand Down
1 change: 1 addition & 0 deletions drivers/soc/google/debug/debug-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ static int dbg_snapshot_probe(struct platform_device *pdev)
dbg_snapshot_set_slcdump_status();

dbg_snapshot_set_enable(true);
dbg_snapshot_start_log();

if (sysfs_create_groups(&pdev->dev.kobj, dss_sysfs_groups))
dev_err(dss_desc.dev, "fail to register debug-snapshot sysfs\n");
Expand Down

0 comments on commit 5298cf3

Please sign in to comment.