All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: Pauli Nieminen <suokkos@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.sourceforge.net
Subject: Re: [PATCH 2/2] libdrm_radeon: Optimize cs_gem_reloc to do less looping.
Date: Thu, 11 Mar 2010 16:40:43 +0100	[thread overview]
Message-ID: <1268322043.7444.680.camel@thor.local> (raw)
In-Reply-To: <1268246540-16212-2-git-send-email-suokkos@gmail.com>

On Wed, 2010-03-10 at 20:42 +0200, Pauli Nieminen wrote: 
> bo->referenced_in_cs is checked if bo is already in cs. Adding and removing
> reference in bo is done with atomic operations to allow parallel access to a
> bo from multiple contexts.
> 
> cs->id generation code quarentees there is not duplicated ids which limits
> number of cs->ids to 32. If there is more cs objects rest will get id 0.
> 
> This optimization decreases cs_write_reloc share of torcs profiling from 4.3%
> to 2.6%.
> 
> Signed-off-by: Pauli Nieminen <suokkos@gmail.com>

This also needs something like the below for configure to verify that
atomic ops are available.

diff --git a/configure.ac b/configure.ac
index fe00176..e419dd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,7 +173,7 @@ if test "x$HAVE_LIBUDEV" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
 
-if test "x$INTEL" != "xno"; then
+if test "x$INTEL" != "xno" || test "x$RADEON" != "xno"; then
     # Check for atomic intrinsics
     AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives,
     [
@@ -206,13 +206,23 @@ if test "x$INTEL" != "xno"; then
     fi
 
     if test "x$drm_cv_atomic_primitives" = "xnone"; then
-	    if test "x$INTEL" != "xauto"; then
+	    if test "x$INTEL" = "xyes"; then
 		    AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for Intel GPUs by passing --disable-intel to ./configure])
 	   else
 		    INTEL=no
 	   fi
+	    if test "x$RADEON" = "xyes"; then
+		    AC_MSG_ERROR([libdrm_radeon depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for Radeon GPUs by passing --disable-radeon to ./configure])
+	   else
+		    RADEON=no
+	   fi
     else
-	   INTEL=yes
+	    if test "x$INTEL" != "xno"; then
+		INTEL=yes
+	    fi
+	    if test "x$RADEON" != "xno"; then
+		RADEON=yes
+	    fi
     fi
 fi
 



-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

      reply	other threads:[~2010-03-11 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 18:42 [PATCH 1/2] libdrm: Move intel_atomic.h to libdrm core for sharing. (V2) Pauli Nieminen
2010-03-10 18:42 ` [PATCH 2/2] libdrm_radeon: Optimize cs_gem_reloc to do less looping Pauli Nieminen
2010-03-11 15:40   ` Michel Dänzer [this message]

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=1268322043.7444.680.camel@thor.local \
    --to=michel@daenzer.net \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=suokkos@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.