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

Commit 974e321c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: log debug info to help detect syncpoint deadlock"

parents 3fd5058b d35aafe6
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -1541,6 +1541,7 @@ static void _kgsl_cmdbatch_timer(unsigned long data)
{
	struct kgsl_device *device;
	struct kgsl_cmdbatch *cmdbatch = (struct kgsl_cmdbatch *) data;
	struct kgsl_cmdbatch_sync_event *event;

	if (cmdbatch == NULL || cmdbatch->context == NULL)
		return;
@@ -1556,7 +1557,30 @@ static void _kgsl_cmdbatch_timer(unsigned long data)
		cmdbatch->context->id, cmdbatch->timestamp);
	dev_err(device->dev, " Active sync points:\n");

	kgsl_dump_syncpoints(device, cmdbatch);
	/* Print all the pending sync objects */
	list_for_each_entry(event, &cmdbatch->synclist, node) {
		switch (event->type) {
		case KGSL_CMD_SYNCPOINT_TYPE_TIMESTAMP: {
			unsigned int retired;

			kgsl_readtimestamp(event->device,
				event->context, KGSL_TIMESTAMP_RETIRED,
					&retired);

			dev_err(device->dev,
				"  [timestamp] context %d timestamp %d (retired %d)\n",
				event->context->id, event->timestamp, retired);
			break;
		}
		case KGSL_CMD_SYNCPOINT_TYPE_FENCE:
			if (event->handle && event->handle->fence)
				sync_fence_log(event->handle->fence);
			else
				dev_err(device->dev, "  fence: invalid\n");
			break;
		}
	}

done:
	spin_unlock(&cmdbatch->lock);
}