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

Commit 5b730b48 authored by Clarence Ip's avatar Clarence Ip
Browse files

drm/msm: add more vbif error info to vbif debug bus dump



Dump out extra VBIF error info for respective xin clients
if errors are detected, even if the xin halt status is
idle.

Change-Id: I3233f28b13a8537d175aa6debd9db8fb7a200abc
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent 5f300da0
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -56,6 +56,8 @@
#define MMSS_VBIF_TEST_BUS_OUT		0x230

/* Vbif error info */
#define MMSS_VBIF_PND_ERR		0x190
#define MMSS_VBIF_SRC_ERR		0x194
#define MMSS_VBIF_XIN_HALT_CTRL1	0x204
#define MMSS_VBIF_ERR_INFO		0X1a0
#define MMSS_VBIF_ERR_INFO_1		0x1a4
@@ -2373,7 +2375,7 @@ static void _sde_dbg_dump_vbif_dbg_bus(struct sde_dbg_vbif_debug_bus *bus)
	u32 **dump_mem = NULL;
	u32 *dump_addr = NULL;
	u32 value, d0, d1;
	unsigned long reg;
	unsigned long reg, reg1, reg2;
	struct vbif_debug_bus_entry *head;
	phys_addr_t phys = 0;
	int i, list_size = 0;
@@ -2447,13 +2449,18 @@ static void _sde_dbg_dump_vbif_dbg_bus(struct sde_dbg_vbif_debug_bus *bus)
	wmb();

	/**
	 * Extract VBIF error info based on XIN halt status.
	 * If the XIN client is not in HALT state, then retrieve the
	 * VBIF error info for it.
	 * Extract VBIF error info based on XIN halt and error status.
	 * If the XIN client is not in HALT state, or an error is detected,
	 * then retrieve the VBIF error info for it.
	 */
	reg = readl_relaxed(mem_base + MMSS_VBIF_XIN_HALT_CTRL1);
	dev_err(sde_dbg_base.dev, "XIN HALT:0x%lX\n", reg);
	reg1 = readl_relaxed(mem_base + MMSS_VBIF_PND_ERR);
	reg2 = readl_relaxed(mem_base + MMSS_VBIF_SRC_ERR);
	dev_err(sde_dbg_base.dev,
			"XIN HALT:0x%lX, PND ERR:0x%lX, SRC ERR:0x%lX\n",
			reg, reg1, reg2);
	reg >>= 16;
	reg &= ~(reg1 | reg2);
	for (i = 0; i < MMSS_VBIF_CLIENT_NUM; i++) {
		if (!test_bit(0, &reg)) {
			writel_relaxed(i, mem_base + MMSS_VBIF_ERR_INFO);