@@ -1563,7 +1563,7 @@ void dpu_encoder_helper_hw_reset(struct dpu_encoder_phys *phys_enc)
rc = ctl->ops.reset(ctl);
if (rc) {
DPU_ERROR_ENC(dpu_enc, "ctl %d reset failure\n", ctl->idx);
- DPU_DBG_DUMP("dbg_bus", "vbif_dbg_bus");
+ dpu_dbg_dump(false, __func__, true, true);
}
phys_enc->enable_state = DPU_ENC_ENABLED;
@@ -262,7 +262,7 @@ static int _dpu_encoder_phys_cmd_handle_ppdone_timeout(
atomic_read(&phys_enc->pending_kickoff_cnt));
dpu_encoder_helper_unregister_irq(phys_enc, INTR_IDX_RDPTR);
- DPU_DBG_DUMP("dbg_bus", "vbif_dbg_bus");
+ dpu_dbg_dump(false, __func__, true, true);
}
atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0);
@@ -638,7 +638,7 @@ static void dpu_encoder_phys_vid_prepare_for_kickoff(
DPU_ERROR_VIDENC(vid_enc, "ctl %d reset failure: %d\n",
ctl->idx, rc);
dpu_encoder_helper_unregister_irq(phys_enc, INTR_IDX_VSYNC);
- DPU_DBG_DUMP("dbg_bus", "vbif_dbg_bus");
+ dpu_dbg_dump(false, __func__, true, true);
}
}
@@ -2248,39 +2248,22 @@ static void _dpu_dump_work(struct work_struct *work)
dpu_dbg_base.dbgbus_vbif_rt.cmn.include_in_deferred_work);
}
-void dpu_dbg_dump(bool queue_work, const char *name, ...)
+void dpu_dbg_dump(bool queue_work, const char *name, bool dump_dbgbus_dpu,
+ bool dump_dbgbus_vbif_rt)
{
- bool dump_dbgbus_dpu = false;
- bool dump_dbgbus_vbif_rt = false;
- va_list args;
- char *blk_name = NULL;
-
if (queue_work && work_pending(&dpu_dbg_base.dump_work))
return;
- va_start(args, name);
- while ((blk_name = va_arg(args, char*))) {
- if (IS_ERR_OR_NULL(blk_name))
- break;
-
- if (!strcmp(blk_name, "dbg_bus"))
- dump_dbgbus_dpu = true;
-
- if (!strcmp(blk_name, "vbif_dbg_bus"))
- dump_dbgbus_vbif_rt = true;
- }
- va_end(args);
-
- if (queue_work) {
- /* schedule work to dump later */
- dpu_dbg_base.dbgbus_dpu.cmn.include_in_deferred_work =
- dump_dbgbus_dpu;
- dpu_dbg_base.dbgbus_vbif_rt.cmn.include_in_deferred_work =
- dump_dbgbus_vbif_rt;
- schedule_work(&dpu_dbg_base.dump_work);
- } else {
+ if (!queue_work) {
_dpu_dump_array(name, dump_dbgbus_dpu, dump_dbgbus_vbif_rt);
+ return;
}
+
+ /* schedule work to dump later */
+ dpu_dbg_base.dbgbus_dpu.cmn.include_in_deferred_work = dump_dbgbus_dpu;
+ dpu_dbg_base.dbgbus_vbif_rt.cmn.include_in_deferred_work =
+ dump_dbgbus_vbif_rt;
+ schedule_work(&dpu_dbg_base.dump_work);
}
/*
@@ -22,14 +22,6 @@ enum dpu_dbg_dump_flag {
DPU_DBG_DUMP_IN_MEM = BIT(1),
};
-/**
- * DPU_DBG_DUMP - trigger dumping of all dpu_dbg facilities
- * @va_args: list of named register dump ranges and regions to dump, as
- * registered previously through dpu_dbg_reg_register_base and
- * dpu_dbg_reg_register_dump_range.
- */
-#define DPU_DBG_DUMP(...) dpu_dbg_dump(false, __func__, ##__VA_ARGS__, NULL)
-
#if defined(CONFIG_DEBUG_FS)
/**
@@ -60,14 +52,14 @@ void dpu_dbg_destroy(void);
/**
* dpu_dbg_dump - trigger dumping of all dpu_dbg facilities
- * @queue_work: whether to queue the dumping work to the work_struct
- * @name: string indicating origin of dump
- * @va_args: list of named register dump ranges and regions to dump, as
- * registered previously through dpu_dbg_reg_register_base and
- * dpu_dbg_reg_register_dump_range.
+ * @queue_work: whether to queue the dumping work to the work_struct
+ * @name: string indicating origin of dump
+ * @dump_dbgbus: dump the dpu debug bus
+ * @dump_vbif_rt: dump the vbif rt bus
* Returns: none
*/
-void dpu_dbg_dump(bool queue_work, const char *name, ...);
+void dpu_dbg_dump(bool queue_work, const char *name, bool dump_dbgbus_dpu,
+ bool dump_dbgbus_vbif_rt);
/**
* dpu_dbg_set_dpu_top_offset - set the target specific offset from mdss base
@@ -105,7 +97,8 @@ static inline void dpu_dbg_destroy(void)
{
}
-static inline void dpu_dbg_dump(bool queue_work, const char *name, ...)
+static inline void dpu_dbg_dump(bool queue_work, const char *name,
+ bool dump_dbgbus_dpu, bool dump_dbgbus_vbif_rt);
{
}
Now that we don't have arbitrary register dumping, remove the macro and just call dpu_dbg_dump directly. Signed-off-by: Sean Paul <seanpaul@chromium.org> --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 +- .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +- drivers/gpu/drm/msm/dpu_dbg.c | 37 +++++-------------- drivers/gpu/drm/msm/dpu_dbg.h | 23 ++++-------- 5 files changed, 21 insertions(+), 45 deletions(-)