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

Commit 6104617f authored by Jayaprakash Madisetty's avatar Jayaprakash Madisetty Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: avoid minidump region addition for mdss register dumps



This change enables minidump for register dumps, debug bus collection
based on CONFIG_QCOM_VA_MINIDUMP config. The minidump driver in 5.4 kernel
needs physical contiguous memory allocation as a requirement. The
minidump collection failure is seen with commit fdf36d71
("disp: msm: use vzalloc for large allocations") and it uses
vzalloc to address memory allocation failure with order 5. This
patch will disable minidump collection for regdumps, debug bus
to address minidump collection failure.

Change-Id: If5ff91ff95279ee2997765599dbeab16ac2dae60
Signed-off-by: default avatarJayaprakash Madisetty <quic_jmadiset@quicinc.com>
parent 77fba483
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -999,8 +999,10 @@ static void _sde_dbg_dump_sde_dbg_bus(struct sde_dbg_sde_debug_bus *bus)
		bus->cmn.content_size = list_size / sizeof(u32);
	}

#ifdef CONFIG_QCOM_VA_MINIDUMP
	if (sde_mini_dump_add_region(bus->cmn.name, list_size, *dump_mem) < 0)
		pr_err("minidump add %s failed\n", bus->cmn.name);
#endif

	dump_addr = *dump_mem;
	SDE_DBG_LOG_DUMP_ADDR(bus->cmn.name, dump_addr, list_size, 0);
@@ -1047,8 +1049,10 @@ static void _sde_dbg_dump_dsi_dbg_bus(struct sde_dbg_sde_debug_bus *bus)
		bus->cmn.content_size = list_size / sizeof(u32);
	}

#ifdef CONFIG_QCOM_VA_MINIDUMP
	if (sde_mini_dump_add_region(bus->cmn.name, list_size, *dump_mem) < 0)
		pr_err("minidump add %s failed\n", bus->cmn.name);
#endif

	dump_addr = *dump_mem;

@@ -1098,10 +1102,12 @@ static void _sde_dump_array(struct sde_dbg_reg_base *blk_arr[],
		pr_err("Failed to allocate memory for reg_dump_addr size:%d\n",
				reg_dump_size);

#ifdef CONFIG_QCOM_VA_MINIDUMP
	if (dbg_base->reg_dump_addr &&
			sde_mini_dump_add_region("reg_dump",
			reg_dump_size, dbg_base->reg_dump_addr) < 0)
		pr_err("minidump add regdump failed\n");
#endif

	if (dump_all)
		sde_evtlog_dump_all(sde_dbg_base.evtlog);
+4 −4
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ struct sde_dbg_evtlog *sde_evtlog_init(void)
{
	struct sde_dbg_evtlog *evtlog;

	evtlog = vzalloc(sizeof(*evtlog));
	evtlog = kzalloc(sizeof(*evtlog), GFP_KERNEL);
	if (!evtlog)
		return ERR_PTR(-ENOMEM);

@@ -240,7 +240,7 @@ struct sde_dbg_reglog *sde_reglog_init(void)
{
	struct sde_dbg_reglog *reglog;

	reglog = vzalloc(sizeof(*reglog));
	reglog = kzalloc(sizeof(*reglog), GFP_KERNEL);
	if (!reglog)
		return ERR_PTR(-ENOMEM);

@@ -351,7 +351,7 @@ void sde_evtlog_destroy(struct sde_dbg_evtlog *evtlog)
		list_del(&filter_node->list);
		kfree(filter_node);
	}
	vfree(evtlog);
	kfree(evtlog);
}

void sde_reglog_destroy(struct sde_dbg_reglog *reglog)
@@ -359,5 +359,5 @@ void sde_reglog_destroy(struct sde_dbg_reglog *reglog)
	if (!reglog)
		return;

	vfree(reglog);
	kfree(reglog);
}