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: Kamal Agrawal <kamaagra@codeaurora.org>
This commit is contained in:
Kamal Agrawal 2021-09-20 14:56:01 +05:30 • committed by Gerrit - the friendly Code Review server
commit 80e82cf4fb
2 changed files with 16 additions and 0 deletions

View file

@ -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;

View file

@ -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