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

Commit 0547ddac authored by Shubhraprakash Das's avatar Shubhraprakash Das Committed by Matt Wagantall
Browse files

msm: kgsl: Ratelimit fence error messages



Ratelimit fence error messages which fail due to reasons
outside of kgsl driver.

Change-Id: Idefe9b88eac318d9816cfdcfdb7a861a8d5c0426
CRs-Fixed: 815262
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent 59dd7b8b
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -168,16 +168,12 @@ int kgsl_add_fence_event(struct kgsl_device *device,
	if (context == NULL)
		return -EINVAL;

	if (test_bit(KGSL_CONTEXT_PRIV_INVALID, &context->priv)) {
		KGSL_DRV_ERR(device,
			"Cannot create a fence: context %d is invalid\n",
			context->id);
	if (test_bit(KGSL_CONTEXT_PRIV_INVALID, &context->priv))
		goto out;
	}

	pt = kgsl_sync_pt_create(context->timeline, context, timestamp);
	if (pt == NULL) {
		KGSL_DRV_ERR(device, "kgsl_sync_pt_create failed\n");
		KGSL_DRV_CRIT_RATELIMIT(device, "kgsl_sync_pt_create failed\n");
		ret = -ENOMEM;
		goto out;
	}
@@ -191,14 +187,15 @@ int kgsl_add_fence_event(struct kgsl_device *device,
	if (fence == NULL) {
		/* only destroy pt when not added to fence */
		kgsl_sync_pt_destroy(pt);
		KGSL_DRV_ERR(device, "sync_fence_create failed\n");
		KGSL_DRV_CRIT_RATELIMIT(device, "sync_fence_create failed\n");
		ret = -ENOMEM;
		goto out;
	}

	priv.fence_fd = get_unused_fd_flags(0);
	if (priv.fence_fd < 0) {
		KGSL_DRV_ERR(device, "Unable to get a file descriptor: %d\n",
		KGSL_DRV_CRIT_RATELIMIT(device,
			"Unable to get a file descriptor: %d\n",
			priv.fence_fd);
		ret = priv.fence_fd;
		goto out;