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

Commit 80e82cf4 authored by Kamal Agrawal's avatar Kamal Agrawal Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Avoid parsing IBs during atomic snapshot



During IB parse, vmalloc is called which can sleep and
should not be called from atomic context. Since IBs are not
dumped during atomic snapshot, there is no need to parse it.

Change-Id: I116d095958d99a8caeafb24dc45684ead01c961d
Signed-off-by: default avatarKamal Agrawal <kamaagra@codeaurora.org>
parent 2a010244
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1424,6 +1424,14 @@ void adreno_hwsched_parse_fault_cmdobj(struct adreno_device *adreno_dev,
	struct adreno_hwsched *hwsched = to_hwsched(adreno_dev);
	struct cmd_list_obj *obj, *tmp;

	/*
	 * During IB parse, vmalloc is called which can sleep and
	 * should not be called from atomic context. Since IBs are not
	 * dumped during atomic snapshot, there is no need to parse it.
	 */
	if (adreno_dev->dev.snapshot_atomic)
		return;

	list_for_each_entry_safe(obj, tmp, &hwsched->cmd_list, node) {
		struct kgsl_drawobj_cmd *cmdobj = obj->cmdobj;

+8 −0
Original line number Diff line number Diff line
@@ -272,6 +272,14 @@ static void snapshot_rb_ibs(struct kgsl_device *device,
	int index, i;
	int parse_ibs = 0, ib_parse_start;

	/*
	 * During IB parse, vmalloc is called which can sleep and
	 * should not be called from atomic context. Since IBs are not
	 * dumped during atomic snapshot, there is no need to parse it.
	 */
	if (device->snapshot_atomic)
		return;

	/*
	 * Figure out the window of ringbuffer data to dump.  First we need to
	 * find where the last processed IB ws submitted.  Start walking back