dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 1/2] amdgpu: remove sequence mutex
Date: Mon, 24 Aug 2015 11:43:29 +0200	[thread overview]
Message-ID: <1440409410-7907-1-git-send-email-deathsimple@vodafone.de> (raw)

From: Christian König <christian.koenig@amd.com>

It's not used any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 amdgpu/amdgpu_cs.c       | 10 ----------
 amdgpu/amdgpu_internal.h |  3 ---
 2 files changed, 13 deletions(-)

diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index 41071fd..ae78a4c 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -58,10 +58,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev,
 
 	gpu_context->dev = dev;
 
-	r = pthread_mutex_init(&gpu_context->sequence_mutex, NULL);
-	if (r)
-		goto error;
-
 	/* Create the context */
 	memset(&args, 0, sizeof(args));
 	args.in.op = AMDGPU_CTX_OP_ALLOC_CTX;
@@ -75,7 +71,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev,
 	return 0;
 
 error:
-	pthread_mutex_destroy(&gpu_context->sequence_mutex);
 	free(gpu_context);
 	return r;
 }
@@ -96,8 +91,6 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context)
 	if (NULL == context)
 		return -EINVAL;
 
-	pthread_mutex_destroy(&context->sequence_mutex);
-
 	/* now deal with kernel side */
 	memset(&args, 0, sizeof(args));
 	args.in.op = AMDGPU_CTX_OP_FREE_CTX;
@@ -195,8 +188,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
 		chunk_data[i].ib_data.flags = ib->flags;
 	}
 
-	pthread_mutex_lock(&context->sequence_mutex);
-
 	if (user_fence) {
 		i = cs.in.num_chunks++;
 
@@ -249,7 +240,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
 	ibs_request->seq_no = cs.out.handle;
 
 error_unlock:
-	pthread_mutex_unlock(&context->sequence_mutex);
 	free(dependencies);
 	return r;
 }
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index 7161db0..a6051ef 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -108,9 +108,6 @@ struct amdgpu_bo_list {
 
 struct amdgpu_context {
 	struct amdgpu_device *dev;
-	/** Mutex for accessing fences and to maintain command submissions
-	    in good sequence. */
-	pthread_mutex_t sequence_mutex;
 	/* context id*/
 	uint32_t id;
 };
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2015-08-24  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24  9:43 Christian König [this message]
2015-08-24  9:43 ` [PATCH 2/2] amdgpu: serialize drmPrimeFDToHandle Christian König
2015-08-24 13:55   ` Zhou, Jammy
2015-08-25 14:31     ` Alex Deucher
2015-08-24 15:10   ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440409410-7907-1-git-send-email-deathsimple@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox