Merge "msm: mdss: add additional debug code for timeout issues"

This commit is contained in:
Linux Build Service Account 2017-05-06 14:24:20 -07:00 committed by Gerrit - the friendly Code Review server
commit 0cd28ee7d9
7 changed files with 68 additions and 6 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -17,6 +17,7 @@
#include "mdss_dsi.h"
#include "mdss_mdp.h"
#include "mdss_debug.h"
/*
* mdss_check_te_status() - Check the status of panel for TE based ESD.
@ -157,6 +158,7 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
ctl->ops.wait_pingpong(ctl, NULL);
pr_debug("%s: DSI ctrl wait for ping pong done\n", __func__);
MDSS_XLOG(mipi->mode);
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
ret = ctrl_pdata->check_status(ctrl_pdata);

View file

@ -93,6 +93,48 @@ static inline bool mdss_xlog_is_enabled(u32 flag)
(flag == MDSS_XLOG_ALL && mdss_dbg_xlog.xlog_enable);
}
static void __halt_vbif_xin(void)
{
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
pr_err("Halting VBIF-XIN\n");
MDSS_VBIF_WRITE(mdata, MMSS_VBIF_XIN_HALT_CTRL0, 0xFFFFFFFF, false);
}
static void __halt_vbif_axi(void)
{
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
pr_err("Halting VBIF-AXI\n");
MDSS_VBIF_WRITE(mdata, MMSS_VBIF_AXI_HALT_CTRL0, 0xFFFFFFFF, false);
}
static void __dump_vbif_state(void)
{
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
unsigned int reg_vbif_src_err, reg_vbif_err_info,
reg_vbif_xin_halt_ctrl0, reg_vbif_xin_halt_ctrl1,
reg_vbif_axi_halt_ctrl0, reg_vbif_axi_halt_ctrl1;
reg_vbif_src_err = MDSS_VBIF_READ(mdata,
MMSS_VBIF_SRC_ERR, false);
reg_vbif_err_info = MDSS_VBIF_READ(mdata,
MMSS_VBIF_ERR_INFO, false);
reg_vbif_xin_halt_ctrl0 = MDSS_VBIF_READ(mdata,
MMSS_VBIF_XIN_HALT_CTRL0, false);
reg_vbif_xin_halt_ctrl1 = MDSS_VBIF_READ(mdata,
MMSS_VBIF_XIN_HALT_CTRL1, false);
reg_vbif_axi_halt_ctrl0 = MDSS_VBIF_READ(mdata,
MMSS_VBIF_AXI_HALT_CTRL0, false);
reg_vbif_axi_halt_ctrl1 = MDSS_VBIF_READ(mdata,
MMSS_VBIF_AXI_HALT_CTRL1, false);
pr_err("VBIF SRC_ERR=%x, ERR_INFO=%x\n",
reg_vbif_src_err, reg_vbif_err_info);
pr_err("VBIF XIN_HALT_CTRL0=%x, XIN_HALT_CTRL1=%x, AXI_HALT_CTRL0=%x, AXI_HALT_CTRL1=%x\n"
, reg_vbif_xin_halt_ctrl0, reg_vbif_xin_halt_ctrl1,
reg_vbif_axi_halt_ctrl0, reg_vbif_axi_halt_ctrl1);
}
void mdss_xlog(const char *name, int line, int flag, ...)
{
unsigned long flags;
@ -611,8 +653,17 @@ static void mdss_xlog_dump_array(struct mdss_debug_base *blk_arr[],
mdss_dump_dsi_debug_bus(mdss_dbg_xlog.enable_dsi_dbgbus_dump,
&mdss_dbg_xlog.dsi_dbgbus_dump);
if (dead && mdss_dbg_xlog.panic_on_err)
if (dead && mdss_dbg_xlog.panic_on_err) {
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
__dump_vbif_state();
__halt_vbif_xin();
usleep_range(10000, 10010);
__halt_vbif_axi();
usleep_range(10000, 10010);
__dump_vbif_state();
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
panic(name);
}
}
static void xlog_debug_work(struct work_struct *work)

View file

@ -2121,6 +2121,7 @@ static int mdss_fb_blank(int blank_mode, struct fb_info *info)
mdss_mdp_enable_panel_disable_mode(mfd, false);
ret = mdss_fb_blank_sub(blank_mode, info, mfd->op_enable);
MDSS_XLOG(blank_mode);
end:
mutex_unlock(&mfd->mdss_sysfs_lock);

View file

@ -6037,6 +6037,10 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
ctl_flush_bits |= ctl->flush_bits;
ATRACE_BEGIN("flush_kickoff");
MDSS_XLOG(ctl->intf_num, ctl_flush_bits, sctl_flush_bits,
mdss_mdp_ctl_read(ctl, MDSS_MDP_REG_CTL_FLUSH), split_lm_valid);
mdss_mdp_ctl_write(ctl, MDSS_MDP_REG_CTL_FLUSH, ctl_flush_bits);
if (sctl) {
if (sctl_flush_bits) {
@ -6048,8 +6052,6 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
}
ctl->commit_in_progress = false;
MDSS_XLOG(ctl->intf_num, ctl_flush_bits, sctl_flush_bits,
split_lm_valid);
wmb();
ctl->flush_reg_data = ctl_flush_bits;
ctl->flush_bits = 0;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -1757,6 +1757,8 @@ void mdss_mdp_hw_rev_debug_caps_init(struct mdss_data_type *mdata)
break;
case MDSS_MDP_HW_REV_300:
case MDSS_MDP_HW_REV_301:
case MDSS_MDP_HW_REV_320:
case MDSS_MDP_HW_REV_330:
mdata->dbg_bus = dbg_bus_msm8998;
mdata->dbg_bus_size = ARRAY_SIZE(dbg_bus_msm8998);
mdata->vbif_dbg_bus = vbif_dbg_bus_msm8998;

View file

@ -829,6 +829,8 @@ enum mdss_mdp_pingpong_index {
#define MMSS_VBIF_WR_LIM_CONF 0x0C0
#define MDSS_VBIF_WRITE_GATHER_EN 0x0AC
#define MMSS_VBIF_SRC_ERR 0x194
#define MMSS_VBIF_ERR_INFO 0x1A0
#define MMSS_VBIF_XIN_HALT_CTRL0 0x200
#define MMSS_VBIF_XIN_HALT_CTRL1 0x204
#define MMSS_VBIF_AXI_HALT_CTRL0 0x208

View file

@ -704,8 +704,10 @@ static void mdss_mdp_video_timegen_flush(struct mdss_mdp_ctl *ctl,
ctl_flush |= (BIT(31) >>
(sctx->intf_num - MDSS_MDP_INTF0));
}
MDSS_XLOG(ctl->intf_num, sctx?sctx->intf_num:0xf00, ctl_flush,
mdss_mdp_ctl_read(ctl, MDSS_MDP_REG_CTL_FLUSH));
mdss_mdp_ctl_write(ctl, MDSS_MDP_REG_CTL_FLUSH, ctl_flush);
MDSS_XLOG(ctl->intf_num, sctx?sctx->intf_num:0xf00, ctl_flush);
}
static inline void video_vsync_irq_enable(struct mdss_mdp_ctl *ctl, bool clear)