Merge "msm: kgsl: Check user generated timestamp before queuing drawobjs"
This commit is contained in:
commit
d092d362dd
1 changed files with 17 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-2019, 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
|
||||
|
@ -1405,6 +1405,22 @@ int adreno_dispatcher_queue_cmds(struct kgsl_device_private *dev_priv,
|
|||
|
||||
user_ts = *timestamp;
|
||||
|
||||
/*
|
||||
* If there is only one drawobj in the array and it is of
|
||||
* type SYNCOBJ_TYPE, skip comparing user_ts as it can be 0
|
||||
*/
|
||||
if (!(count == 1 && drawobj[0]->type == SYNCOBJ_TYPE) &&
|
||||
(drawctxt->base.flags & KGSL_CONTEXT_USER_GENERATED_TS)) {
|
||||
/*
|
||||
* User specified timestamps need to be greater than the last
|
||||
* issued timestamp in the context
|
||||
*/
|
||||
if (timestamp_cmp(drawctxt->timestamp, user_ts) >= 0) {
|
||||
spin_unlock(&drawctxt->lock);
|
||||
return -ERANGE;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
||||
switch (drawobj[i]->type) {
|
||||
|
|
Loading…
Add table
Reference in a new issue