public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jacek Danecki <jacek.danecki@intel.com>
To: Daniel Vetter <daniel.vetter@intel.com>,
	"Sapala, Rafal A" <rafal.a.sapala@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] intel: Adding locks for drm objects synchronization.
Date: Fri, 19 Sep 2014 15:45:27 +0200	[thread overview]
Message-ID: <541C3377.6090203@intel.com> (raw)
In-Reply-To: <20140918124338.GP31703@phenom.ffwll.local>

On 09/18/14 14:43, Daniel Vetter wrote:
> I can't merge patches with this disclaimer ...

We're working on this, sorry... We'll send it again.

Btw, in another tests with prime we have also found new problem with synchronization, which below patch fixed.

From: Rafal Sapala <rafal.a.sapala@intel.com>
Date: Thu, 18 Sep 2014 18:01:02 +0200
Subject: [PATCH] Prime sharing mechanism mutex patch for multithread usage

Signed-off-by: Rafal Sapala <rafal.a.sapala@intel.com>
---
 intel/intel_bufmgr_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index d512343..e05920a 100755
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2604,6 +2604,7 @@ drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int s
 	struct drm_i915_gem_get_tiling get_tiling;
 	drmMMListHead *list;

+   pthread_mutex_lock(&bufmgr_gem->lock);
 	ret = drmPrimeFDToHandle(bufmgr_gem->fd, prime_fd, &handle);

 	/*
@@ -2611,7 +2612,6 @@ drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int s
 	 * for named buffers, we must not create two bo's pointing at the same
 	 * kernel object
 	 */
-	pthread_mutex_lock(&bufmgr_gem->lock);
 	for (list = bufmgr_gem->named.next;
 	     list != &bufmgr_gem->named;
 	     list = list->next) {
--
1.7.12.4

-- 
jacek

  reply	other threads:[~2014-09-19 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 18:51 [PATCH] intel: Adding locks for drm objects synchronization Rafal Sapala
2014-09-18 12:43 ` Daniel Vetter
2014-09-19 13:45   ` Jacek Danecki [this message]
2014-09-19 15:36     ` Daniel Vetter
2014-09-19 15:52       ` Jacek Danecki

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=541C3377.6090203@intel.com \
    --to=jacek.danecki@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rafal.a.sapala@intel.com \
    /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