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

Commit 5ddf908c authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Correct format specifiers used in syncobj timeout logs



Variables context ID, queue, submit, start and retire timestamps
all are unsigned integer type but format specifier used to dump
these in syncobj timeout error logs is for signed integer type
resulting in negative values. Use correct format specifier to avoid
negative values in syncobj timeout logs.

Change-Id: Ie8aa6ba80b7956545fe4fcf99db48a1a9ea22d2b
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 839e0382
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ static void sync_event_print(struct seq_file *s,
{
	switch (sync_event->type) {
	case KGSL_CMD_SYNCPOINT_TYPE_TIMESTAMP: {
		seq_printf(s, "sync: ctx: %d ts: %d",
		seq_printf(s, "sync: ctx: %u ts: %u",
				sync_event->context->id, sync_event->timestamp);
		break;
	}
@@ -219,7 +219,7 @@ static void cmdobj_print(struct seq_file *s,
	else
		seq_puts(s, " markerobj ");

	seq_printf(s, "\t %d ", drawobj->timestamp);
	seq_printf(s, "\t %u ", drawobj->timestamp);

	seq_puts(s, " priv: ");
	print_flags(s, cmdobj_priv, ARRAY_SIZE(cmdobj_priv),
@@ -264,7 +264,7 @@ static int ctx_print(struct seq_file *s, void *unused)
	struct kgsl_event *event;
	unsigned int queued = 0, consumed = 0, retired = 0;

	seq_printf(s, "id: %d type: %s priority: %d process: %s (%d) tid: %d\n",
	seq_printf(s, "id: %u type: %s priority: %d process: %s (%d) tid: %d\n",
		   drawctxt->base.id,
		   ctx_type_str(drawctxt->type),
		   drawctxt->base.priority,
+7 −7
Original line number Diff line number Diff line
@@ -62,13 +62,13 @@ void adreno_drawctxt_dump(struct kgsl_device *device,
	 * deadlock. To prevent this use spin_trylock_bh.
	 */
	if (!spin_trylock_bh(&drawctxt->lock)) {
		dev_err(device->dev, "  context[%d]: could not get lock\n",
		dev_err(device->dev, "  context[%u]: could not get lock\n",
			context->id);
		return;
	}

	dev_err(device->dev,
		"  context[%d]: queue=%d, submit=%d, start=%d, retire=%d\n",
		"  context[%u]: queue=%u, submit=%u, start=%u, retire=%u\n",
		context->id, queue, drawctxt->submitted_timestamp,
		start, retire);

@@ -78,7 +78,7 @@ void adreno_drawctxt_dump(struct kgsl_device *device,

		if (test_bit(ADRENO_CONTEXT_FENCE_LOG, &context->priv)) {
			dev_err(device->dev,
				"  possible deadlock. Context %d might be blocked for itself\n",
				"  possible deadlock. Context %u might be blocked for itself\n",
				context->id);
			goto stats;
		}
@@ -91,7 +91,7 @@ void adreno_drawctxt_dump(struct kgsl_device *device,

			if (kgsl_drawobj_events_pending(syncobj)) {
				dev_err(device->dev,
					"  context[%d] (ts=%d) Active sync points:\n",
					"  context[%u] (ts=%u) Active sync points:\n",
					context->id, drawobj->timestamp);

				kgsl_dump_syncpoints(device, syncobj);
@@ -115,10 +115,10 @@ void adreno_drawctxt_dump(struct kgsl_device *device,
		msecs = drawctxt->submit_retire_ticks[index] * 10;
		usecs = do_div(msecs, 192);
		usecs = do_div(msecs, 1000);
		pos += scnprintf(buf + pos, sizeof(buf) - pos, "%d.%0d ",
		pos += scnprintf(buf + pos, sizeof(buf) - pos, "%u.%0u ",
			(unsigned int)msecs, usecs);
	}
	dev_err(device->dev, "  context[%d]: submit times: %s\n",
	dev_err(device->dev, "  context[%u]: submit times: %s\n",
		context->id, buf);

	spin_unlock_bh(&drawctxt->lock);
@@ -522,7 +522,7 @@ void adreno_drawctxt_detach(struct kgsl_context *context)
	 */
	if (ret && ret != -EAGAIN) {
		dev_err(device->dev,
				"Wait for global ctx=%d ts=%d type=%d error=%d\n",
				"Wait for global ctx=%u ts=%u type=%d error=%d\n",
				drawctxt->base.id, drawctxt->internal_timestamp,
				drawctxt->type, ret);

+1 −1
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ void kgsl_context_dump(struct kgsl_context *context)
	device = context->device;

	if (kgsl_context_detached(context)) {
		dev_err(device->dev, "  context[%d]: context detached\n",
		dev_err(device->dev, "  context[%u]: context detached\n",
			context->id);
	} else if (device->ftbl->drawctxt_dump != NULL)
		device->ftbl->drawctxt_dump(device, context);
+4 −4
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ void kgsl_dump_syncpoints(struct kgsl_device *device,
				&retired);

			dev_err(device->dev,
				"  [timestamp] context %d timestamp %d (retired %d)\n",
				"  [timestamp] context %u timestamp %u (retired %u)\n",
				event->context->id, event->timestamp,
				retired);
			break;
@@ -134,7 +134,7 @@ static void syncobj_timer(struct timer_list *t)
	device = drawobj->context->device;

	dev_err(device->dev,
		"kgsl: possible gpu syncpoint deadlock for context %d timestamp %d\n",
		"kgsl: possible gpu syncpoint deadlock for context %u timestamp %u\n",
		drawobj->context->id, drawobj->timestamp);

	set_bit(ADRENO_CONTEXT_FENCE_LOG, &drawobj->context->priv);
@@ -151,7 +151,7 @@ static void syncobj_timer(struct timer_list *t)

		switch (event->type) {
		case KGSL_CMD_SYNCPOINT_TYPE_TIMESTAMP:
			dev_err(device->dev, "       [%d] TIMESTAMP %d:%d\n",
			dev_err(device->dev, "       [%u] TIMESTAMP %u:%u\n",
				i, event->context->id, event->timestamp);
			break;
		case KGSL_CMD_SYNCPOINT_TYPE_FENCE: {
@@ -159,7 +159,7 @@ static void syncobj_timer(struct timer_list *t)
			struct event_fence_info *info = &event->info;

			for (j = 0; j < info->num_fences; j++)
				dev_err(device->dev, "       [%d] FENCE %s\n",
				dev_err(device->dev, "       [%u] FENCE %s\n",
					i, info->fences[j].name);
			break;
		}
+1 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ static void events_debugfs_print_group(struct seq_file *s,
		group->readtimestamp(event->device, group->priv,
			KGSL_TIMESTAMP_RETIRED, &retired);

		seq_printf(s, "\t%d:%d age=%lu func=%ps [retired=%d]\n",
		seq_printf(s, "\t%u:%u age=%lu func=%ps [retired=%u]\n",
			group->context ? group->context->id :
						KGSL_MEMSTORE_GLOBAL,
			event->timestamp, jiffies  - event->created,