msm: kgsl: Allow sync points to be created on the submitter's context

There are situations where a submitting thread may wish to create a
syncpoint on an already issued timestamp to pause a context until a
previous command has been retired.  Relax the restriction against
submitting a sync point against one's own context and only check to
make sure the user isn't submitting a syncpoint against a future
timestamp (which would be an certain deadlock).

Change-Id: Ic0dedbad883fc228da0d94c8416a88504f5d1377
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
This commit is contained in:
Carter Cooper 2013-08-05 13:35:12 -06:00 committed by Iliyan Malchev
parent f1fa739d77
commit 79bab10ef5

View file

@ -1639,7 +1639,13 @@ static int kgsl_cmdbatch_add_sync_timestamp(struct kgsl_device *device,
if (context == NULL)
return -EINVAL;
/* Sanity check - you can't create a sync point on your own context */
/*
* We allow somebody to create a sync point on their own context.
* This has the effect of delaying a command from submitting until the
* dependent command has cleared. That said we obviously can't let them
* create a sync point on a future timestamp.
*/
if (context == cmdbatch->context) {
KGSL_DRV_ERR(device,
"Cannot create a sync point on your own context\n");