Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cd28ee7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 1bf879ca dc897f9c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* 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);
+52 −1
Original line number Diff line number Diff line
@@ -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,9 +653,18 @@ 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)
{
+1 −0
Original line number Diff line number Diff line
@@ -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);
+4 −2
Original line number Diff line number Diff line
@@ -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;
+3 −1
Original line number Diff line number Diff line
/*
 * 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;
Loading