<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.video.dri.devel">
    <title>gmane.comp.video.dri.devel</title>
    <link>http://blog.gmane.org/gmane.comp.video.dri.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69674"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69658"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69638"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69634"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69631"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69623"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69618"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69617"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69610"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69594"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69585"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69567"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69565"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69547"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69520"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69502"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69491"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69480"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69433"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.dri.devel/69418"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69674">
    <title>[PATCH] radeon: make radeon_cs_update_pages static.</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69674</link>
    <description>&lt;pre&gt;From: Dave Airlie &amp;lt;airlied&amp;lt; at &amp;gt;redhat.com&amp;gt;

Just move its only caller into the same file as it and make it static.

Signed-off-by: Dave Airlie &amp;lt;airlied&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 drivers/gpu/drm/radeon/radeon.h      |    1 -
 drivers/gpu/drm/radeon/radeon_cs.c   |   27 ++++++++++++++++++++++++++-
 drivers/gpu/drm/radeon/radeon_ring.c |   25 -------------------------
 3 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 1dc3a4a..492654f 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -848,7 +848,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct radeon_cs_parser {
 s32priority;
 };
 
-extern int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx);
 extern int radeon_cs_finish_pages(struct radeon_cs_parser *p);
 extern u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx);
 
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index c7d64a7..0137689 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -580,7 +580,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int radeon_cs_finish_pages(struct radeon_cs_parser *p)
 return 0;
 }
 
-int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx)
+static int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx)
 {
 int new_page;
 struct radeon_cs_chunk *ibc = &amp;amp;p-&amp;gt;chunks[p-&amp;gt;chunk_ib_idx];
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -623,3 +623,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx)
 
 return new_page;
 }
+
+u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx)
+{
+struct radeon_cs_chunk *ibc = &amp;amp;p-&amp;gt;chunks[p-&amp;gt;chunk_ib_idx];
+u32 pg_idx, pg_offset;
+u32 idx_value = 0;
+int new_page;
+
+pg_idx = (idx * 4) / PAGE_SIZE;
+pg_offset = (idx * 4) % PAGE_SIZE;
+
+if (ibc-&amp;gt;kpage_idx[0] == pg_idx)
+return ibc-&amp;gt;kpage[0][pg_offset/4];
+if (ibc-&amp;gt;kpage_idx[1] == pg_idx)
+return ibc-&amp;gt;kpage[1][pg_offset/4];
+
+new_page = radeon_cs_update_pages(p, pg_idx);
+if (new_page &amp;lt; 0) {
+p-&amp;gt;parser_error = new_page;
+return 0;
+}
+
+idx_value = ibc-&amp;gt;kpage[new_page][pg_offset/4];
+return idx_value;
+}
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 493a7be..983658c 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -39,31 +39,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  */
 int radeon_debugfs_sa_init(struct radeon_device *rdev);
 
-u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx)
-{
-struct radeon_cs_chunk *ibc = &amp;amp;p-&amp;gt;chunks[p-&amp;gt;chunk_ib_idx];
-u32 pg_idx, pg_offset;
-u32 idx_value = 0;
-int new_page;
-
-pg_idx = (idx * 4) / PAGE_SIZE;
-pg_offset = (idx * 4) % PAGE_SIZE;
-
-if (ibc-&amp;gt;kpage_idx[0] == pg_idx)
-return ibc-&amp;gt;kpage[0][pg_offset/4];
-if (ibc-&amp;gt;kpage_idx[1] == pg_idx)
-return ibc-&amp;gt;kpage[1][pg_offset/4];
-
-new_page = radeon_cs_update_pages(p, pg_idx);
-if (new_page &amp;lt; 0) {
-p-&amp;gt;parser_error = new_page;
-return 0;
-}
-
-idx_value = ibc-&amp;gt;kpage[new_page][pg_offset/4];
-return idx_value;
-}
-
 int radeon_ib_get(struct radeon_device *rdev, int ring,
   struct radeon_ib *ib, unsigned size)
 {
&lt;/pre&gt;</description>
    <dc:creator>Dave Airlie</dc:creator>
    <dc:date>2012-05-26T16:42:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69658">
    <title>[Bug 50360] New: flightgear has absymal performance with the llvmshader compiler</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69658</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50360

             Bug #: 50360
           Summary: flightgear has absymal performance with the llvm
                    shader compiler
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r600
        AssignedTo: dri-devel&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: aaalmosss&amp;lt; at &amp;gt;gmail.com


I get ~3 fps with the LLVM compiler, while I get ~20 fps with `R600_LLVM=0
fgfs`. The only setting on the 'rendering options' dialog that affects
framerate is 'material shaders', when it's off, I get ~50 fps with both
compilers.

Other games perform around the same with the two compilers.

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-25T18:08:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69638">
    <title>[RFC] Synchronizing access to buffers shared with dma-buf betweendrivers/devices</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69638</link>
    <description>&lt;pre&gt;Hi All,

I realise it's been a while since this was last discussed, however I'd like
to bring up kernel-side synchronization again. By kernel-side
synchronization, I mean allowing multiple drivers/devices wanting to access
the same buffer to do so without bouncing up to userspace to resolve
dependencies such as "the display controller can't start scanning out a
buffer until the GPU has finished rendering into it". As such, this is
really just an optimization which reduces latency between E.g. The GPU
finishing a rendering job and that buffer being scanned out. I appreciate
this particular example is already solved on desktop graphics cards as the
display controller and 3D core are both controlled by the same driver, so no
"generic" mechanism is needed. However on ARM SoCs, the 3D core (like an ARM
Mali) and display controller tend to be driven by separate drivers, so some
mechanism is needed to allow both drivers to synchronize their access to
buffers.

There are multiple ways synchronization can be achieved, fences/sync objects
is one common approach, however we're presenting a different approach.
Personally, I quite like fence sync objects, however we believe it requires
a lot of userspace interfaces to be changed to pass around sync object
handles. Our hope is that the kds approach will require less effort to make
use of as no existing userspace interfaces need to be changed. E.g. To use
explicit fences, the struct drm_mode_crtc_page_flip would need a new members
to pass in the handle(s) of sync object(s) which the flip depends on (I.e.
don't flip until these fences fire). The additional benefit of our approach
is that it prevents userspace specifying dependency loops which can cause a
deadlock (see kds.txt for an explanation of what I mean here).

I have waited until now to bring this up again because I am now able to
share the code I was trying (and failing I think) to explain previously. The
code has now been released under the GPLv2 from ARM Mali's developer portal,
however I've attempted to turn that into a patch to allow it to be discussed
on this list. Please find the patch inline below.

While KDS defines a very generic mechanism, I am proposing that this code or
at least the concepts be merged with the existing dma_buf code, so a the
struct kds_resource members get moved to struct dma_buf, kds_* functions get
renamed to dma_buf_* functions, etc. So I guess what I'm saying is please
don't review the actual code just yet, only the concepts the code describes,
where kds_resource == dma_duf.


Cheers,

Tom



Author: Tom Cooksey &amp;lt;tom.cooksey&amp;lt; at &amp;gt;arm.com&amp;gt;
Date:   Fri May 25 10:45:27 2012 +0100

    Add new system to allow synchronizing access to resources
    
    See Documentation/kds.txt for details, however the general
    idea is that this kds framework synchronizes multiple drivers
    ("clients") wanting to access the same resources, where a
    resource is typically a 2D image buffer being shared around
    using dma-buf.
    
    Note: This patch is created by extracting the sources from the
    tarball on &amp;lt;http://www.malideveloper.com/open-source-mali-gpus-lin
    ux-kernel-device-drivers---dev-releases.php&amp;gt; and putting them in
    roughly the right places.

diff --git a/Documentation/kds.txt b/Documentation/kds.txt
new file mode 100644
index 0000000..a96db21
--- /dev/null
+++ b/Documentation/kds.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,113 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#
+# (C) COPYRIGHT 2012 ARM Limited. All rights reserved.
+#
+# This program is free software and is provided to you under the terms of
the GNU General Public License version 2
+# as published by the Free Software Foundation, and any use by you of this
program is subject to the terms of such GNU licence.
+#
+# A copy of the licence is included with the program, and can also be
obtained from Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. 
+#
+#
+
+
+==============================
+kds - Kernel Dependency System
+==============================
+
+Introduction
+------------
+kds provides a mechanism for clients to atomically lock down multiple
abstract resources.
+This can be done either synchronously or asynchronously.
+Abstract resources is used to allow a set of clients to use kds to control
access to any
+resource, an example is structured memory buffers.
+
+kds supports that buffer is locked for exclusive access and sharing of
buffers.
+
+kds can be built as either a integrated feature of the kernel or as a
module.
+It supports being compiled as a module both in-tree and out-of-tree.
+
+
+Concepts
+--------
+A core concept in kds is abstract resources.
+A kds resource is just an abstraction for some client object, kds doesn't
care what it is.
+Typically EGL will consider UMP buffers as being a resource, thus each UMP
buffer has 
+a kds resource for synchronization to the buffer.
+
+kds allows a client to create and destroy the abstract resource objects.
+A new resource object is made available asap (it is just a simple malloc
with some initializations),
+while destroy it requires some external synchronization.
+
+The other core concept in kds is consumer of resources.
+kds is requested to allow a client to consume a set of resources and the
client will be notified when it can consume the resources.
+
+Exclusive access allows only one client to consume a resource.
+Shared access permits multiple consumers to acceess a resource
concurrently.
+
+
+APIs
+----
+kds provides simple resource allocate and destroy functions.
+Clients use this to instantiate and control the lifetime of the resources
kds manages.
+
+kds provides two ways to wait for resources:
+- Asynchronous wait: the client specifies a function pointer to be called
when wait is over
+- Synchronous wait: Function blocks until access is gained.
+
+The synchronous API has a timeout for the wait.
+The call can early out if a signal is delivered.
+
+After a client is done consuming the resource kds must be notified to
release the resources and let some other client take ownership.
+This is done via resource set release call.
+
+A Windows comparison:
+kds implements WaitForMultipleObjectsEx(..., bWaitAll = TRUE, ...) but also
has an asynchronous version in addition.
+kds resources can be seen as being the same as NT object manager resources.
+
+Internals
+---------
+kds guarantees atomicity when a set of resources is operated on.
+This is implemented via a global resource lock which is taken by kds when
it updates resource objects.
+
+Internally a resource in kds is a linked list head with some flags.
+
+When a consumer requests access to a set of resources it is queued on each
of the resources.
+The link from the consumer to the resources can be triggered. Once all
links are triggered 
+the registered callback is called or the blocking function returns.
+A link is considered triggered if it is the first on the list of consumers
of a resource, 
+or if all the links ahead of it is marked as shared and itself is of the
type shared.
+
+When the client is done consuming the consumer object is removed from the
linked lists of 
+the resources and a potential new consumer becomes the head of the
resources.
+As we add and remove consumers atomically across all resources we can
guarantee that 
+we never introduces a A-&amp;gt;B + B-&amp;gt;A type of loops/deadlocks.
+
+
+kbase/base implementation
+-------------------------
+A HW job needs access to a set of shared resources.
+EGL tracks this and encodes the set along with the atom in the ringbuffer.
+EGL allocates a (k)base dep object to represent the dependency to the set
of resources and encodes that along with the list of resources.
+This dep object is use to create a dependency from a job chain(atom) to the
resources it needs to run.
+When kbase decodes the atom in the ringbuffer it finds the set of resources
and calls kds to request all the needed resources.
+As EGL needs to know when the kds request is delivered a new base event
object is needed: atom enqueued. This event is only delivered for atoms
which uses kds.
+The callback kbase registers trigger the dependency object described which
would trigger the existing JD system to release the job chain.
+When the atom is done kds resource set release is call to release the
resources.
+
+EGL will typically use exclusive access to the render target, while all
buffers used as input can be marked as shared.
+
+
+Buffer publish/vsync
+--------------------
+EGL will use a separate ioctl or DRM flip to request the flip.
+If the LCD driver is integrated with kds EGL can do these operations early.
+The LCD driver must then implement the ioctl or DRM flip to be asynchronous
with kds async call.
+The LCD driver binds a kds resource to each virtual buffer (2 buffers in
case of double-buffering).
+EGL will make a dependency to the target kds resource in the kbase atom.
+After EGL receives a atom enqueued event it can ask the LCD driver to pan
to the target kds resource.
+When the atom is completed it'll release the resource and the LCD driver
will get its callback.
+In the callback it'll load the target buffer into the DMA unit of the LCD
hardware.
+The LCD driver will be the consumer of both buffers for a short period.
+The LCD driver will call kds resource set release on the previous on-screen
buffer when the next vsync/dma read end is handled.
+
+
diff --git a/drivers/misc/kds.c b/drivers/misc/kds.c
new file mode 100644
index 0000000..8d7d55e
--- /dev/null
+++ b/drivers/misc/kds.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,461 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ *
+ * (C) COPYRIGHT 2012 ARM Limited. All rights reserved.
+ *
+ * This program is free software and is provided to you under the terms of
the GNU General Public License version 2
+ * as published by the Free Software Foundation, and any use by you of this
program is subject to the terms of such GNU licence.
+ *
+ * A copy of the licence is included with the program, and can also be
obtained from Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
+ *
+ */
+
+
+
+#include &amp;lt;linux/slab.h&amp;gt;
+#include &amp;lt;linux/list.h&amp;gt;
+#include &amp;lt;linux/mutex.h&amp;gt;
+#include &amp;lt;linux/wait.h&amp;gt;
+#include &amp;lt;linux/sched.h&amp;gt;
+#include &amp;lt;linux/err.h&amp;gt;
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/workqueue.h&amp;gt;
+#include &amp;lt;linux/kds.h&amp;gt;
+
+
+#define KDS_LINK_TRIGGERED (1u &amp;lt;&amp;lt; 0)
+#define KDS_LINK_EXCLUSIVE (1u &amp;lt;&amp;lt; 1)
+
+#define KDS_IGNORED NULL
+#define KDS_INVALID (void*)-2
+#define KDS_RESOURCE (void*)-1
+
+struct kds_resource_set
+{
+unsigned long         num_resources;
+unsigned long         pending;
+unsigned long         locked_resources;
+struct kds_callback * cb;
+void *                callback_parameter;
+void *                callback_extra_parameter;
+struct list_head      callback_link;
+struct work_struct    callback_work;
+struct kds_link       resources[0];
+};
+
+static DEFINE_MUTEX(kds_lock);
+
+int kds_callback_init(struct kds_callback * cb, int direct, kds_callback_fn
user_cb)
+{
+int ret = 0;
+
+cb-&amp;gt;direct = direct;
+cb-&amp;gt;user_cb = user_cb;
+
+if (!direct)
+{
+cb-&amp;gt;wq = alloc_workqueue("kds", WQ_UNBOUND | WQ_HIGHPRI,
WQ_UNBOUND_MAX_ACTIVE);
+if (!cb-&amp;gt;wq)
+ret = -ENOMEM;
+}
+else
+{
+cb-&amp;gt;wq = NULL;
+}
+
+return ret;
+}
+EXPORT_SYMBOL(kds_callback_init);
+
+void kds_callback_term(struct kds_callback * cb)
+{
+if (!cb-&amp;gt;direct)
+{
+BUG_ON(!cb-&amp;gt;wq);
+destroy_workqueue(cb-&amp;gt;wq);
+}
+else
+{
+BUG_ON(cb-&amp;gt;wq);
+}
+}
+
+EXPORT_SYMBOL(kds_callback_term);
+
+static void kds_do_user_callback(struct kds_resource_set * rset)
+{
+rset-&amp;gt;cb-&amp;gt;user_cb(rset-&amp;gt;callback_parameter,
rset-&amp;gt;callback_extra_parameter);
+}
+
+static void kds_queued_callback(struct work_struct * work)
+{
+struct kds_resource_set * rset;
+rset = container_of( work, struct kds_resource_set, callback_work);
+
+kds_do_user_callback(rset);
+}
+
+static void kds_callback_perform(struct kds_resource_set * rset)
+{
+if (rset-&amp;gt;cb-&amp;gt;direct)
+kds_do_user_callback(rset);
+else
+{
+int result;
+result = queue_work(rset-&amp;gt;cb-&amp;gt;wq, &amp;amp;rset-&amp;gt;callback_work);
+/* if we got a 0 return it means we've triggered the same
rset twice! */
+BUG_ON(!result);
+}
+}
+
+void kds_resource_init(struct kds_resource * res)
+{
+BUG_ON(!res);
+INIT_LIST_HEAD(&amp;amp;res-&amp;gt;waiters.link);
+res-&amp;gt;waiters.parent = KDS_RESOURCE;
+}
+EXPORT_SYMBOL(kds_resource_init);
+
+void kds_resource_term(struct kds_resource * res)
+{
+BUG_ON(!res);
+BUG_ON(!list_empty(&amp;amp;res-&amp;gt;waiters.link));
+res-&amp;gt;waiters.parent = KDS_INVALID;
+}
+EXPORT_SYMBOL(kds_resource_term);
+
+int kds_async_waitall(
+               struct kds_resource_set ** pprset,
+               unsigned long              flags,
+               struct kds_callback *      cb,
+               void *                     callback_parameter,
+               void *                     callback_extra_parameter,
+               int                        number_resources,
+               unsigned long *            exclusive_access_bitmap,
+               struct kds_resource **     resource_list)
+{
+struct kds_resource_set * rset = NULL;
+int i;
+int triggered;
+int err = -EFAULT;
+
+BUG_ON(!pprset);
+BUG_ON(!resource_list);
+BUG_ON(!cb);
+
+mutex_lock(&amp;amp;kds_lock);
+
+if ((flags &amp;amp; KDS_FLAG_LOCKED_ACTION) == KDS_FLAG_LOCKED_FAIL)
+{
+for (i = 0; i &amp;lt; number_resources; i++)
+{
+if (resource_list[i]-&amp;gt;lock_count)
+{
+err = -EBUSY;
+goto errout;
+}
+}
+}
+
+rset = kmalloc(sizeof(*rset) + number_resources * sizeof(struct
kds_link), GFP_KERNEL);
+if (!rset)
+{
+err = -ENOMEM;
+goto errout;
+}
+
+rset-&amp;gt;num_resources = number_resources;
+rset-&amp;gt;pending = number_resources;
+rset-&amp;gt;locked_resources = 0;
+rset-&amp;gt;cb = cb;
+rset-&amp;gt;callback_parameter = callback_parameter;
+rset-&amp;gt;callback_extra_parameter = callback_extra_parameter;
+INIT_LIST_HEAD(&amp;amp;rset-&amp;gt;callback_link);
+INIT_WORK(&amp;amp;rset-&amp;gt;callback_work, kds_queued_callback);
+
+for (i = 0; i &amp;lt; number_resources; i++)
+{
+unsigned long link_state = 0;
+
+INIT_LIST_HEAD(&amp;amp;rset-&amp;gt;resources[i].link);
+rset-&amp;gt;resources[i].parent = rset;
+
+if (test_bit(i, exclusive_access_bitmap))
+{
+link_state |= KDS_LINK_EXCLUSIVE;
+}
+
+/* no-one else waiting? */
+if (list_empty(&amp;amp;resource_list[i]-&amp;gt;waiters.link))
+{
+link_state |= KDS_LINK_TRIGGERED;
+rset-&amp;gt;pending--;
+}
+/* Adding a non-exclusive and the current tail is a
triggered non-exclusive? */
+else if (((link_state &amp;amp; KDS_LINK_EXCLUSIVE) == 0) &amp;amp;&amp;amp;
+        (((list_entry(resource_list[i]-&amp;gt;waiters.link.prev,
struct kds_link, link)-&amp;gt;state &amp;amp; (KDS_LINK_EXCLUSIVE | KDS_LINK_TRIGGERED))
== KDS_LINK_TRIGGERED)))
+{
+link_state |= KDS_LINK_TRIGGERED;
+rset-&amp;gt;pending--;
+}
+/* locked &amp;amp; ignore locked? */
+else if ((resource_list[i]-&amp;gt;lock_count) &amp;amp;&amp;amp; ((flags &amp;amp;
KDS_FLAG_LOCKED_ACTION) == KDS_FLAG_LOCKED_IGNORE) )
+{
+link_state |= KDS_LINK_TRIGGERED;
+rset-&amp;gt;pending--;
+rset-&amp;gt;resources[i].parent = KDS_IGNORED; /* to
disable decrementing the pending count when we get the ignored resource */
+}
+rset-&amp;gt;resources[i].state = link_state;
+list_add_tail(&amp;amp;rset-&amp;gt;resources[i].link,
&amp;amp;resource_list[i]-&amp;gt;waiters.link);
+}
+
+triggered = (rset-&amp;gt;pending == 0);
+
+mutex_unlock(&amp;amp;kds_lock);
+
+/* set the pointer before the callback is called so it sees it */
+*pprset = rset;
+
+if (triggered)
+{
+/* all resources obtained, trigger callback */
+kds_callback_perform(rset);
+}
+
+return 0;
+
+errout:
+mutex_unlock(&amp;amp;kds_lock);
+return err;
+}
+EXPORT_SYMBOL(kds_async_waitall);
+
+static void wake_up_sync_call(void * callback_parameter, void *
callback_extra_parameter)
+{
+wait_queue_head_t * wait = (wait_queue_head_t*)callback_parameter;
+wake_up(wait);
+}
+
+static struct kds_callback sync_cb =
+{
+wake_up_sync_call,
+1,
+NULL,
+};
+
+struct kds_resource_set * kds_waitall(
+               int                    number_resources,
+               unsigned long *        exclusive_access_bitmap,
+               struct kds_resource ** resource_list,
+               unsigned long          jiffies_timeout)
+{
+struct kds_resource_set * rset;
+int i;
+int triggered = 0;
+DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wake);
+
+rset = kmalloc(sizeof(*rset) + number_resources * sizeof(struct
kds_link), GFP_KERNEL);
+if (!rset)
+return rset;
+
+rset-&amp;gt;num_resources = number_resources;
+rset-&amp;gt;pending = number_resources;
+rset-&amp;gt;locked_resources = 1;
+INIT_LIST_HEAD(&amp;amp;rset-&amp;gt;callback_link);
+INIT_WORK(&amp;amp;rset-&amp;gt;callback_work, kds_queued_callback);
+
+mutex_lock(&amp;amp;kds_lock);
+
+for (i = 0; i &amp;lt; number_resources; i++)
+{
+unsigned long link_state = 0;
+
+if (likely(resource_list[i]-&amp;gt;lock_count &amp;lt; ULONG_MAX))
+resource_list[i]-&amp;gt;lock_count++;
+else
+break;
+
+if (test_bit(i, exclusive_access_bitmap))
+{
+link_state |= KDS_LINK_EXCLUSIVE;
+}
+
+if (list_empty(&amp;amp;resource_list[i]-&amp;gt;waiters.link))
+{
+link_state |= KDS_LINK_TRIGGERED;
+rset-&amp;gt;pending--;
+}
+/* Adding a non-exclusive and the current tail is a
triggered non-exclusive? */
+else if (((link_state &amp;amp; KDS_LINK_EXCLUSIVE) == 0) &amp;amp;&amp;amp;
+        (((list_entry(resource_list[i]-&amp;gt;waiters.link.prev,
struct kds_link, link)-&amp;gt;state &amp;amp; (KDS_LINK_EXCLUSIVE | KDS_LINK_TRIGGERED))
== KDS_LINK_TRIGGERED)))
+{
+link_state |= KDS_LINK_TRIGGERED;
+rset-&amp;gt;pending--;
+}
+
+INIT_LIST_HEAD(&amp;amp;rset-&amp;gt;resources[i].link);
+rset-&amp;gt;resources[i].parent = rset;
+rset-&amp;gt;resources[i].state = link_state;
+list_add_tail(&amp;amp;rset-&amp;gt;resources[i].link,
&amp;amp;resource_list[i]-&amp;gt;waiters.link);
+}
+
+if (i &amp;lt; number_resources)
+{
+/* an overflow was detected, roll back */
+while (i--)
+{
+list_del(&amp;amp;rset-&amp;gt;resources[i].link);
+resource_list[i]-&amp;gt;lock_count--;
+}
+mutex_unlock(&amp;amp;kds_lock);
+kfree(rset);
+return ERR_PTR(-EFAULT);
+}
+
+if (rset-&amp;gt;pending == 0)
+triggered = 1;
+else
+{
+rset-&amp;gt;cb = &amp;amp;sync_cb;
+rset-&amp;gt;callback_parameter = &amp;amp;wake;
+rset-&amp;gt;callback_extra_parameter = NULL;
+}
+
+mutex_unlock(&amp;amp;kds_lock);
+
+if (!triggered)
+{
+long wait_res;
+if ( KDS_WAIT_BLOCKING == jiffies_timeout )
+{
+wait_res = wait_event_interruptible(wake,
rset-&amp;gt;pending == 0);
+}
+else
+{
+wait_res = wait_event_interruptible_timeout(wake,
rset-&amp;gt;pending == 0, jiffies_timeout);
+}
+if ((wait_res == -ERESTARTSYS) || (wait_res == 0))
+{
+/* use \a kds_resource_set_release to roll back */
+kds_resource_set_release(&amp;amp;rset);
+return ERR_PTR(wait_res);
+}
+}
+return rset;
+}
+EXPORT_SYMBOL(kds_waitall);
+
+void kds_resource_set_release(struct kds_resource_set ** pprset)
+{
+struct list_head triggered = LIST_HEAD_INIT(triggered);
+struct kds_resource_set * rset;
+struct kds_resource_set * it;
+int i;
+
+BUG_ON(!pprset);
+
+mutex_lock(&amp;amp;kds_lock);
+
+rset = *pprset;
+if (!rset)
+{
+/* caught a race between a cancelation
+ * and a completion, nothing to do */
+mutex_unlock(&amp;amp;kds_lock);
+return;
+}
+
+/* clear user pointer so we'll be the only
+ * thread handling the release */
+*pprset = NULL;
+
+for (i = 0; i &amp;lt; rset-&amp;gt;num_resources; i++)
+{
+struct kds_resource * resource;
+struct kds_link * it = NULL;
+
+/* fetch the previous entry on the linked list */
+it = list_entry(rset-&amp;gt;resources[i].link.prev, struct
kds_link, link);
+/* unlink ourself */
+list_del(&amp;amp;rset-&amp;gt;resources[i].link);
+
+/* any waiters? */
+if (list_empty(&amp;amp;it-&amp;gt;link))
+continue;
+
+/* were we the head of the list? (head if prev is a
resource) */
+if (it-&amp;gt;parent != KDS_RESOURCE)
+continue;
+
+/* we were the head, find the kds_resource */
+resource = container_of(it, struct kds_resource, waiters);
+
+if (rset-&amp;gt;locked_resources)
+{
+resource-&amp;gt;lock_count--;
+}
+
+/* we know there is someone waiting from the any-waiters
test above */
+
+/* find the head of the waiting list */
+it = list_first_entry(&amp;amp;resource-&amp;gt;waiters.link, struct
kds_link, link);
+
+/* new exclusive owner? */
+if (it-&amp;gt;state &amp;amp; KDS_LINK_EXCLUSIVE)
+{
+/* link now triggered */
+it-&amp;gt;state |= KDS_LINK_TRIGGERED;
+/* a parent to update? */
+if (it-&amp;gt;parent != KDS_IGNORED)
+{
+if (0 == --it-&amp;gt;parent-&amp;gt;pending)
+{
+/* new owner now triggered, track
for callback later */
+list_add(&amp;amp;it-&amp;gt;parent-&amp;gt;callback_link,
&amp;amp;triggered);
+}
+}
+}
+/* exclusive releasing ? */
+else if (rset-&amp;gt;resources[i].state &amp;amp; KDS_LINK_EXCLUSIVE)
+{
+/* trigger non-exclusive until end-of-list or first
exclusive */
+list_for_each_entry(it, &amp;amp;resource-&amp;gt;waiters.link,
link)
+{
+/* exclusive found, stop triggering */
+if (it-&amp;gt;state &amp;amp; KDS_LINK_EXCLUSIVE)
+break;
+
+it-&amp;gt;state |= KDS_LINK_TRIGGERED;
+/* a parent to update? */
+if (it-&amp;gt;parent != KDS_IGNORED)
+{
+if (0 == --it-&amp;gt;parent-&amp;gt;pending)
+{
+/* new owner now triggered,
track for callback later */
+
list_add(&amp;amp;it-&amp;gt;parent-&amp;gt;callback_link, &amp;amp;triggered);
+}
+}
+}
+}
+
+}
+
+mutex_unlock(&amp;amp;kds_lock);
+
+while (!list_empty(&amp;amp;triggered))
+{
+it = list_first_entry(&amp;amp;triggered, struct kds_resource_set,
callback_link);
+list_del(&amp;amp;it-&amp;gt;callback_link);
+kds_callback_perform(it);
+}
+
+cancel_work_sync(&amp;amp;rset-&amp;gt;callback_work);
+
+/* free the resource set */
+kfree(rset);
+}
+EXPORT_SYMBOL(kds_resource_set_release);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("ARM Ltd.");
+MODULE_VERSION("1.0");
diff --git a/include/linux/kds.h b/include/linux/kds.h
new file mode 100644
index 0000000..65e5706
--- /dev/null
+++ b/include/linux/kds.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,154 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ *
+ * (C) COPYRIGHT 2012 ARM Limited. All rights reserved.
+ *
+ * This program is free software and is provided to you under the terms of
the GNU General Public License version 2
+ * as published by the Free Software Foundation, and any use by you of this
program is subject to the terms of such GNU licence.
+ * 
+ * A copy of the licence is included with the program, and can also be
obtained from Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
+ * 
+ */
+
+
+
+#ifndef _KDS_H_
+#define _KDS_H_
+
+#include &amp;lt;linux/list.h&amp;gt;
+#include &amp;lt;linux/workqueue.h&amp;gt;
+
+#define KDS_WAIT_BLOCKING (ULONG_MAX)
+
+/* what to do when waitall must wait for a synchronous locked resource: */
+#define KDS_FLAG_LOCKED_FAIL    (0u &amp;lt;&amp;lt;  0) /* fail waitall */
+#define KDS_FLAG_LOCKED_IGNORE  (1u &amp;lt;&amp;lt;  0) /* don't wait, but block other
that waits */
+#define KDS_FLAG_LOCKED_WAIT    (2u &amp;lt;&amp;lt;  0) /* wait (normal */
+#define KDS_FLAG_LOCKED_ACTION  (3u &amp;lt;&amp;lt;  0) /* mask to extract the action to
do on locked resources */
+
+struct kds_resource_set;
+
+typedef void (*kds_callback_fn) (void * callback_parameter, void *
callback_extra_parameter);
+
+struct kds_callback
+{
+kds_callback_fn  user_cb; /* real cb */
+int direct;               /* do direct or queued call? */
+struct workqueue_struct * wq;
+};
+
+struct kds_link
+{
+struct kds_resource_set * parent;
+struct list_head          link;
+unsigned long             state;
+};
+
+struct kds_resource
+{
+struct kds_link waiters;
+unsigned long lock_count;
+};
+
+/* callback API */
+
+/* Initialize a callback object.
+ *
+ * Typically created per context or per hw resource.
+ *
+ * Callbacks can be performed directly if no nested locking can
+ * happen in the client.
+ *
+ * Nested locking can occur when a lock is held during the
kds_async_waitall or
+ * kds_resource_set_release call. If the callback needs to take the same
lock
+ * nested locking will happen.
+ *
+ * If nested locking could happen non-direct callbacks can be requested.
+ * Callbacks will then be called asynchronous to the triggering call.
+ */
+int kds_callback_init(struct kds_callback * cb, int direct, kds_callback_fn
user_cb);
+
+/* Terminate the use of a callback object.
+ *
+ * If the callback object was set up as non-direct
+ * any pending callbacks will be flushed first.
+ * Note that to avoid a deadlock the lock callbacks needs
+ * can't be held when a callback object is terminated.
+ */
+void kds_callback_term(struct kds_callback * cb);
+
+
+/* resource object API */
+
+/* initialize a resource handle for a shared resource */
+void kds_resource_init(struct kds_resource * resource);
+
+/*
+ * Will assert if the resource is being used or waited on.
+ * The caller should NOT try to terminate a resource that could still have
clients.
+ * After the function returns the resource is no longer known by kds.
+ */
+void kds_resource_term(struct kds_resource * resource);
+
+/* Asynchronous wait for a set of resources.
+ * Callback will be called when all resources are available.
+ * If all the resources was available the callback will be called before
kds_async_waitall returns.
+ * So one must not hold any locks the callback code-flow can take when
calling kds_async_waitall.
+ * Caller considered to own/use the resources until \a kds_rset_release is
called.
+ * flags is one or more of the KDS_FLAG_* set.
+ * exclusive_access_bitmap is a bitmap where a high bit means exclusive
access while a low bit means shared access.
+ * Use the Linux __set_bit API, where the index of the buffer to control is
used as the bit index.
+ *
+ * Standard Linux error return value.
+ */
+int kds_async_waitall(
+               struct kds_resource_set ** pprset,
+               unsigned long              flags,
+               struct kds_callback *      cb,
+               void *                     callback_parameter,
+               void *                     callback_extra_parameter,
+               int                        number_resources,
+               unsigned long *            exclusive_access_bitmap,
+               struct kds_resource **     resource_list);
+
+/* Synchronous wait for a set of resources.
+ * Function will return when one of these have happened:
+ * - all resources have been obtained
+ * - timeout lapsed while waiting
+ * - a signal was received while waiting
+ *
+ * Caller considered to own/use the resources when the function returns.
+ * Caller must release the resources using \a kds_rset_release.
+ *
+ * Calling this function while holding already locked resources or other
locking primitives is dangerous.
+ * One must if this is needed decide on a lock order of the resources
and/or the other locking primitives
+ * and always take the resources/locking primitives in the specific order.
+ *
+ * Use the ERR_PTR framework to decode the return value.
+ * NULL = time out
+ * If IS_ERR then PTR_ERR gives:
+ *  ERESTARTSYS = signal received, retry call after signal
+ *  all other values = internal error, lock failed
+ * Other values  = successful wait, now the owner, must call
kds_resource_set_release
+ */
+struct kds_resource_set * kds_waitall(
+               int                    number_resources,
+               unsigned long *        exclusive_access_bitmap,
+               struct kds_resource ** resource_list,
+               unsigned long          jifies_timeout);
+
+/* Release resources after use.
+ * Caller must handle that other async callbacks will trigger,
+ * so must avoid holding any locks a callback will take.
+ *
+ * The function takes a pointer to your poiner to handle a race
+ * between a cancelation and a completion.
+ *
+ * If the caller can't guarantee that a race can't occur then
+ * the passed in pointer must be the same in both call paths
+ * to allow kds to manage the potential race.
+ */
+void kds_resource_set_release(struct kds_resource_set ** pprset);
+
+#endif /* _KDS_H_ */
+
&lt;/pre&gt;</description>
    <dc:creator>Tom Cooksey</dc:creator>
    <dc:date>2012-05-25T11:08:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69634">
    <title>[PATCH] dma-buf: fix disabled vmap function</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69634</link>
    <description>&lt;pre&gt;From: Dave Airlie &amp;lt;airlied&amp;lt; at &amp;gt;redhat.com&amp;gt;

include/linux/dma-buf.h: In function ‘dma_buf_vmap’:
include/linux/dma-buf.h:260:1: warning: no return statement in function returning non-void [-Wreturn-type]

Reported-by: wfg&amp;lt; at &amp;gt;linux.intel.com
Signed-off-by: Dave Airlie &amp;lt;airlied&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 include/linux/dma-buf.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index d8c2865..506bb7b 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -257,6 +257,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void dma_buf_kunmap(struct dma_buf *dmabuf,
 
 static inline void *dma_buf_vmap(struct dma_buf *dmabuf)
 {
+return NULL;
 }
 
 static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
&lt;/pre&gt;</description>
    <dc:creator>Dave Airlie</dc:creator>
    <dc:date>2012-05-25T09:04:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69631">
    <title>[RFC][PATCH 0/2] libdrm: Atomic mode setting stuff</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69631</link>
    <description>&lt;pre&gt;Here's the libdrm part of the atomic mode setting stuff.

There's a new object I christened drmModePropertySet. It's an opaque
object which is used to keep track of property changes for the user.
Internally it's just a linked list of object_id/property_id/property_value
tuples. The list is sorted based on object_id and property_id to avoid
duplicates.

The YUYV libkms patch is there just because my test app was more geared
towards YUV than RGB, and I was too lazy to make the switch to RGB.

I also stripped out a bunch of gunk from my test app and pushed the result
to gitorious [1]. What it does is move/resize the plane and flips the CRTC
fb at the same time using the new API.

The app has a rudimentary keyboard control mechanism:
't' toggles an automatic test mode
's','z','x','c' move the plane
'S','Z','X','C' change the plane size
'f' fills the plane with a pattern, the color changes each time
'b' fills the plane with color bars
'l' loads a ppm (P6) image into the plane
'o' toggles the plane on/off
'q' quits

[1] https://gitorious.org/vsyrjala/plane
&lt;/pre&gt;</description>
    <dc:creator>ville.syrjala&lt; at &gt;linux.intel.com</dc:creator>
    <dc:date>2012-05-25T08:07:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69623">
    <title>[Bug 50338] New: r600g: EE r600_shader.c:140 r600_pipe_shader_create- translation from TGSI failed !</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69623</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50338

             Bug #: 50338
           Summary: r600g: EE r600_shader.c:140 r600_pipe_shader_create -
                    translation from TGSI failed !
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r600
        AssignedTo: dri-devel&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: edwin+mesa&amp;lt; at &amp;gt;etorok.net


Created attachment 62087
  --&amp;gt; https://bugs.freedesktop.org/attachment.cgi?id=62087
R600_DUMP_SHADERS=1 output

Trying to reproduce bug #50325 on Mesa git caused this error:
EE r600_shader.c:140 r600_pipe_shader_create - translation from TGSI failed !

Bug can be reproduced by one of these:
build/glretrace lt-glyphy-demo.trace
demo/glyphy-demo

I get the translation failed error both with R600_LLVM=0, and R600_LLVM=1.
I've attached the R600_DUMP_SHADERS=1 output.


glretrace is from https://github.com/apitrace/apitrace/tree/1.0
and glyphy is from https://code.google.com/p/glyphy/source/checkout

lt-glypy-demo.trace is here:
https://bugs.freedesktop.org/attachment.cgi?id=62078

git version of Mesa:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 2.1 Mesa 8.1-devel (git-35f302d)
OpenGL shading language version string: 1.30
OpenGL extensions:

Built with (on Debian unstable):
./configure --with-dri-drivers= --with-gallium-drivers=r600,swrast
--enable-glx-tls --enable-gallium-llvm LLVM_CONFIG=/usr/bin/llvm-config-3.1

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-25T07:21:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69618">
    <title>[PATCH] drm/radeon: fix typo in trinity tiling setup</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69618</link>
    <description>&lt;pre&gt;From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

Using the wrong union.

Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
Cc: stable&amp;lt; at &amp;gt;vger.kernel.org
---
 drivers/gpu/drm/radeon/ni.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index b01c2dd..ce4e7cc 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -865,7 +865,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void cayman_gpu_init(struct radeon_device *rdev)
 
 /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */
 if (rdev-&amp;gt;flags &amp;amp; RADEON_IS_IGP)
-rdev-&amp;gt;config.evergreen.tile_config |= 1 &amp;lt;&amp;lt; 4;
+rdev-&amp;gt;config.cayman.tile_config |= 1 &amp;lt;&amp;lt; 4;
 else
 rdev-&amp;gt;config.cayman.tile_config |=
 ((mc_arb_ramcfg &amp;amp; NOOFBANK_MASK) &amp;gt;&amp;gt; NOOFBANK_SHIFT) &amp;lt;&amp;lt; 4;
&lt;/pre&gt;</description>
    <dc:creator>alexdeucher&lt; at &gt;gmail.com</dc:creator>
    <dc:date>2012-05-25T02:55:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69617">
    <title>drm/i915 3.5 merge window: gen6_sanitize_pm errors</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69617</link>
    <description>&lt;pre&gt;These guys seem to be recently introduced:

  [drm:gen6_sanitize_pm] *ERROR* Power management discrepancy:
GEN6_RP_INTERRUPT_LIMITS expected 17000000, was 12060000
  [drm:gen6_sanitize_pm] *ERROR* Power management discrepancy:
GEN6_RP_INTERRUPT_LIMITS expected 17070000, was 17000000

This is on my SNB Macbook Air.

Everything seems to *work*, which makes me think:

 - that error isn't really so big a deal that you have to *SHOUT* about it.

 - I wonder how valid the discrepancy checking code is to begin with.

Hmm?

              Linus
&lt;/pre&gt;</description>
    <dc:creator>Linus Torvalds</dc:creator>
    <dc:date>2012-05-25T02:27:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69610">
    <title>[Bug 50325] New: Glyphy bad render on r600g (software render is fine)</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69610</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50325

             Bug #: 50325
           Summary: Glyphy bad render on r600g (software render is fine)
    Classification: Unclassified
           Product: Mesa
           Version: 8.0
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r600
        AssignedTo: dri-devel&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: edwin+mesa&amp;lt; at &amp;gt;etorok.net


Created attachment 62078
  --&amp;gt; https://bugs.freedesktop.org/attachment.cgi?id=62078
apitrace (cf. https://github.com/apitrace/apitrace/tree/1.0)

I just tried Glyphy on r600g and the output is very bad.
Don't know if its Glyphy bug or Mesa bug, but if I force software rendering in
Mesa then I do see the output.

Attached screenshots of bad (r600g) and good (software render).

The bad render was obtained by:
demo/glyphy-demo

The good one:
LIBGL_ALWAYS_SOFTWARE=1 demo/glyphy-demo

I tested on:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 2.1 Mesa 8.0.2
OpenGL shading language version string: 1.20

I'll try to test on mesa git later to see if its still an issue there.

Also attached is a an apitrace, and the bad render can be reproduced with:
build/glretrace lt-glyphy-demo.trace

The good render (initialization a bit slow, but works):
LIBGL_ALWAYS_SOFTWARE=1 build/glretrace lt-glyphy-demo.trace

The source code for Glyphy can be found here:
https://code.google.com/p/glyphy/source/checkout

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-24T21:56:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69594">
    <title>[RFC] [PATCH 00/14] HPD/connector-polling rework</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69594</link>
    <description>&lt;pre&gt;Hi all,

I've got fed up with our sorry state of connector detection and rampant edid re
and rere-reading.

This patch series lays the groundwork in the drm helpers so that drivers can
avoid all this madness (at least on working hw) and properly cache the edid.

With the additional changes for drm/i915, the edid is now read _once_ per plug
event (or at boot-up/resume time). A further step would be to integrate the
hotplug handling into the driver itself and only call -&amp;gt;detect on the connectors
for which the irq handler received a hotplug event.

By adding POLL_FORCE drivers can get back the old behaviour of calling -&amp;gt;detect
every time probe_single_connector is called from userspace. I've splattered that
over all drivers where I've thought it might be required.

Note though that setting this doesn't avoid all regressions - the regular output
poll work will still ignore any connectors with POLL_HPD set. If a driver/hw
with broken hpd got away due to this, this will break stuff. But that should be
easy to fix by admitting the defeat and setting POLL_CONNECT|DISCONNECT
directly.

If other people want to convert over their drivers, the following steps are
required:
- Ensure that the connector status is unknown every time the driver could have
  missed a hpd event (e.g. after resume). drm_mode_config_reset will do that for
  you.
- Drop the POLL_FORCE flag for connectors where hdp is fully reliable.
- Implement edid caching - that's a nice way to figure out whether hpd is
  actually reliable, because if it isn't, this step will ensure that you get bug
  reports because the the edid won't ever get updated ;-)
- Optionally teach the driver some smarts about which specific connectors
  actually got a hotplug event. Mostly useful on cheap hw (like intel's) that
  can't distinguish between hdmi and dp without trying some aux channel
  transfers.

As you can guess from the patch series, I've discovered the hard way that i915
sdvo support is totally broken. Tested on most of the intel machines I have and
also quickly on my radeon hd5000.

Comments, flames, ideas and test reports highly welcome.

Cheers, Daniel

Daniel Vetter (14):
  drm: extract drm_kms_helper_hotplug_event
  drm: handle HDP and polled connectors separately
  drm: introduce DRM_CONNECTOR_POLL_FORCE
  drm/i915: set POLL_FORCE for sdvo outputs
  drm: properly init/reset connector status
  drm: kill unnecessary calls to connector-&amp;gt;detect
  drm: don't start the poll engine in probe_single_connector
  drm: don't unnecessarily enable the polling work
  drm: don't poll forced connectors
  drm/i915: cache crt edid
  drm/i915: cache dp edid
  drm/i915: cache hdmi edid
  drm/i915/sdvo: implement correct return value for -&amp;gt;get_modes
  drm/i915: s/mdelay/msleep/ in the sdvo detect function

 drivers/gpu/drm/drm_crtc.c                    |    6 ++-
 drivers/gpu/drm/drm_crtc_helper.c             |   76 ++++++++++++++++++-------
 drivers/gpu/drm/exynos/exynos_drm_connector.c |    2 +
 drivers/gpu/drm/gma500/cdv_intel_crt.c        |    2 +
 drivers/gpu/drm/gma500/cdv_intel_hdmi.c       |    2 +
 drivers/gpu/drm/gma500/mdfld_dsi_output.c     |    1 +
 drivers/gpu/drm/gma500/oaktrail_hdmi.c        |    2 +
 drivers/gpu/drm/gma500/psb_intel_sdvo.c       |    2 +
 drivers/gpu/drm/i915/intel_crt.c              |   28 +++++++--
 drivers/gpu/drm/i915/intel_dp.c               |   47 +++++++--------
 drivers/gpu/drm/i915/intel_drv.h              |    2 +
 drivers/gpu/drm/i915/intel_hdmi.c             |   48 ++++++++++------
 drivers/gpu/drm/i915/intel_modes.c            |   18 +++++-
 drivers/gpu/drm/i915/intel_sdvo.c             |   45 +++++++++------
 drivers/gpu/drm/i915/intel_tv.c               |    3 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |    1 +
 drivers/gpu/drm/radeon/radeon_connectors.c    |    5 ++
 drivers/gpu/drm/udl/udl_connector.c           |    2 +
 drivers/staging/omapdrm/omap_connector.c      |    2 +
 include/drm/drm_crtc.h                        |    5 ++
 include/drm/drm_crtc_helper.h                 |    1 +
 21 files changed, 208 insertions(+), 92 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Daniel Vetter</dc:creator>
    <dc:date>2012-05-24T19:26:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69585">
    <title>[RFC][PATCH 0/6] WIP: drm: Atomic mode setting idea</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69585</link>
    <description>&lt;pre&gt;This is some very early demo code for the atomic modesetting feature.

According to my current plan there would be just one ioctl. You simply feed
it an arbitrary list of object properties and the implementation will decice
how it can apply those (for example, whether it can complete the operation
truly atomically and/or asynchronously). So everything is a property. This
means the ioctl should be able to handle all future requirements just as
long as they can be expressed using properties that fit the current model.

In order to be able to feed connector lists, gamma tables, etc. the ioctl has
to accepts blobs. Just one blob per property for now. Not sure if that would be
enough. I also extended range propeties to support signed values.

The implementation has to provide five function pointers, and the
operation goes roughly like this:

ioctl() {
 funcs-&amp;gt;begin
 for_each_prop
 funcs-&amp;gt;set
 funcs-&amp;gt;check
 if (!check_only)
 funcs-&amp;gt;commit
 funcs-&amp;gt;end
}

The begin function allocates some kind of state object that will be used to
collect all the modified state from all the properties. The approach I used
in the demo implementation is to have the full state contained in the state
object, and then keep modifying it according to the new property values.
Finally the whole state gets checked as an atomic unit, and commited to
hardware if everything is OK.

The demo implementation I included does work, albeit not atomically and it
doesn't actually do any real state checking. It just calls the pre-existing
crtc helper and plane funcs from the commit hook.


I'm still pondering about the error reporting. One crazy idea would be to
return an error value for each modified property. That way the driver could
more accurately inform user space why the state is invalid.


Another missing thing is the completion event support. I'm thinking it
should perhaps just contain one timestamp, that being for the time when
the whole operation has completed. If the user wants accurate per-CRTC
timestamps he'd have to issue separate ioctls. The other approach would
be per-object timestamps. Or should it perhaps send out a separate event
for each modified object?

Also it would be nice if the completion event would contain a list of
framebuffer objects that became available when the operation completed.
That would be useful for triple buffering use, since you can't tell
beforehand which framebuffer gets replaced with the new one when you
issue flips faster than the refresh rate.

Some kind of event cookie could also be nice to have, to associate
each event with the ioctl request that spawned it.
&lt;/pre&gt;</description>
    <dc:creator>ville.syrjala&lt; at &gt;linux.intel.com</dc:creator>
    <dc:date>2012-05-24T20:16:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69567">
    <title>[PATCH 0/4] drm/i915: Make video sprites survive a modeset</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69567</link>
    <description>&lt;pre&gt;Currently the video sprites appear to get disabled on modeset more by
accient than by design.

With the current API that behaviour makes very little sense to me.
You first enable some plane, and then it can get disabled due to some
unrelated operation.

So these patches change the behaviour so that planes survive a modeset.
There's a new hook to make sure they get disabled when swithing
back to fbdev to show a panic oops.
&lt;/pre&gt;</description>
    <dc:creator>ville.syrjala&lt; at &gt;linux.intel.com</dc:creator>
    <dc:date>2012-05-24T18:29:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69565">
    <title>drm/nouveau: NULL pointer deref in drm_handle_vblank() on rebind</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69565</link>
    <description>&lt;pre&gt;I can easily trigger a crash in nouveau interrupt handler by unbinding
and rebinding the GPU.

The command used:
  echo $pci_device &amp;gt; nouveau/unbind &amp;amp;&amp;amp; \
sleep 5 &amp;amp;&amp;amp; \
echo $pci_device &amp;gt; nouveau/bind


Kernel is 3.4.0 with modular drm/nouveau.
GPU is NVidia nForce IGP (NV11)


Unbinding seems to work fine, display switching back to VGA text mode.
Rebinding the GPU slightly later causes the below trace:

Bruno

(analysis following below trace)

[ 1432.012832] Console: switching to colour VGA+ 80x25
[ 1432.014796] drm: unregistered panic notifier
[ 1432.014905] [drm] nouveau 0000:02:00.0: Setting dpms mode 3 on vga encoder (output 0)
[ 1432.026324] [drm] nouveau 0000:02:00.0: 0xAFD8: Parsing digital output script table
[ 1432.026611] [drm] nouveau 0000:02:00.0: Restoring VGA fonts
[ 1432.028353] [TTM] Finalizing pool allocator
[ 1432.029325] [TTM] Zone  kernel: Used memory at exit: 0 kiB
[ 1437.066950] [drm] nouveau 0000:02:00.0: Detected an NV10 generation card (0x01a000b1)
[ 1437.068909] [drm] nouveau 0000:02:00.0: Checking PRAMIN for VBIOS
[ 1437.103400] [drm] nouveau 0000:02:00.0: ... BIOS checksum invalid
[ 1437.103459] [drm] nouveau 0000:02:00.0: Checking PROM for VBIOS
[ 1437.103638] [drm] nouveau 0000:02:00.0: ... BIOS checksum invalid
[ 1437.103694] [drm] nouveau 0000:02:00.0: Checking ACPI for VBIOS
[ 1437.103859] [drm] nouveau 0000:02:00.0: ... BIOS checksum invalid
[ 1437.103915] [drm] nouveau 0000:02:00.0: Checking PCIROM for VBIOS
[ 1437.105143] [drm] nouveau 0000:02:00.0: ... appears to be valid
[ 1437.105217] [drm] nouveau 0000:02:00.0: Using VBIOS from PCIROM
[ 1437.105507] [drm] nouveau 0000:02:00.0: BMP BIOS found
[ 1437.105562] [drm] nouveau 0000:02:00.0: BMP version 5.20
[ 1437.105624] [drm] nouveau 0000:02:00.0: Bios version 03.1a.01.03
[ 1437.107663] [drm] nouveau 0000:02:00.0: MXM: no VBIOS data, nothing to do
[ 1437.109053] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 0 at offset 0xA850
[ 1437.109120] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 1 at offset 0xADC5
[ 1437.109197] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 2 at offset 0xA851
[ 1437.109268] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 3 at offset 0xADC4
[ 1437.109337] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 4 at offset 0xA875
[ 1437.109405] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 5 at offset 0xA931
[ 1437.109494] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 6 at offset 0xA876
[ 1437.109572] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 7 at offset 0xA8CC
[ 1437.109985] [TTM] Zone  kernel: Available graphics memory: 240004 kiB
[ 1437.110079] [TTM] Initializing pool allocator
[ 1437.110177] [drm] nouveau 0000:02:00.0: Detected 32MiB VRAM (unknown type)
[ 1437.110424] agpgart-nvidia 0000:00:00.0: AGP 2.0 bridge
[ 1437.110566] agpgart-nvidia 0000:00:00.0: putting AGP V2 device into 4x mode
[ 1437.110717] nouveau 0000:02:00.0: putting AGP V2 device into 4x mode
[ 1437.110783] agpgart-nvidia 0000:00:00.0: AGP 2.0 bridge
[ 1437.110865] agpgart-nvidia 0000:00:00.0: putting AGP V2 device into 4x mode
[ 1437.111010] nouveau 0000:02:00.0: putting AGP V2 device into 4x mode
[ 1437.111070] [drm] nouveau 0000:02:00.0: 32 MiB GART (aperture)
[ 1437.111233] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111298] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111363] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111427] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111489] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111551] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111613] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111676] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111737] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111800] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111862] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111924] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.111986] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112048] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112110] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112172] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112233] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112296] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112357] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112420] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[ 1437.112577] [drm] nouveau 0000:02:00.0: Saving VGA fonts
[ 1437.175978] BUG: unable to handle kernel NULL pointer dereference at   (null)
[ 1437.176134] IP: [&amp;lt;c1272dfc&amp;gt;] drm_handle_vblank+0x3c/0x1d0
[ 1437.176314] *pde = 00000000 
[ 1437.176403] Oops: 0000 [#1] 
[ 1437.176491] Modules linked in: nouveau ttm drm_kms_helper cfbcopyarea mxm_wmi wmi cfbimgblt cfbfillrect nfs lockd nfs_acl sunrpc
[ 1437.177120] 
[ 1437.177170] Pid: 1573, comm: bash Not tainted 3.4.0-jupiter-00007-g3b608b6-dirty #9 NVIDIA Corporation. nFORCE-MCP/MS-6373
[ 1437.177440] EIP: 0060:[&amp;lt;c1272dfc&amp;gt;] EFLAGS: 00010056 CPU: 0
[ 1437.177495] EIP is at drm_handle_vblank+0x3c/0x1d0
[ 1437.177549] EAX: 00000000 EBX: dbfe2cb0 ECX: 00000001 EDX: 00000000
[ 1437.177604] ESI: dbfe2cb0 EDI: feffffff EBP: dd40bf6c ESP: dd40bf18
[ 1437.177660]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
[ 1437.177714] CR0: 8005003b CR2: 00000000 CR3: 1cd25000 CR4: 000007d0
[ 1437.177770] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 1437.177825] DR6: ffff0ff0 DR7: 00000400
[ 1437.177878] Process bash (pid: 1573, ti=dd40a000 task=dcdd9090 task.ti=dcd48000)
[ 1437.177940] Stack:
[ 1437.177987]  00000000 00000051 00000003 205b0028 dbd38cf0 00000000 c1022340 dd40bf78
[ 1437.178344]  00000000 dbd38cf0 00000000 dbfe2cb0 00000000 00000002 dd40bf78 dfa00100
[ 1437.178819]  00000002 0000007b dbfe2cb0 00000018 feffffff dd40bf78 de9da248 00000000
[ 1437.179183] Call Trace:
[ 1437.179241]  [&amp;lt;c1022340&amp;gt;] ? vmalloc_sync_all+0x130/0x130
[ 1437.179356]  [&amp;lt;de9da248&amp;gt;] nv04_vblank_crtc0_isr+0x28/0x30 [nouveau]
[ 1437.179427]  [&amp;lt;de971204&amp;gt;] nouveau_irq_handler+0x64/0x100 [nouveau]
[ 1437.179490]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[ 1437.179545]  [&amp;lt;c106ff34&amp;gt;] handle_irq_event_percpu+0x54/0x1f0
[ 1437.179602]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[ 1437.179656]  [&amp;lt;c10700f8&amp;gt;] handle_irq_event+0x28/0x40
[ 1437.179711]  [&amp;lt;c107222b&amp;gt;] handle_fasteoi_irq+0x5b/0xf0
[ 1437.179763]  &amp;lt;IRQ&amp;gt; 
[ 1437.179851]  [&amp;lt;c1003f9a&amp;gt;] ? do_IRQ+0x3a/0xb0
[ 1437.179911]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[ 1437.179969]  [&amp;lt;c10c0adc&amp;gt;] ? __slab_alloc.clone.68+0x4c/0x3e0
[ 1437.180005]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[ 1437.180005]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[ 1437.180005]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[ 1437.180005]  [&amp;lt;c10c1a5d&amp;gt;] ? __kmalloc+0x15d/0x1f0
[ 1437.180005]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[ 1437.180005]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[ 1437.180005]  [&amp;lt;de98e36f&amp;gt;] ? nouveau_display_create+0x43f/0x4e0 [nouveau]
[ 1437.180005]  [&amp;lt;de96af7c&amp;gt;] ? nouveau_card_init+0x16ac/0x1a70 [nouveau]
[ 1437.180005]  [&amp;lt;de969770&amp;gt;] ? nouveau_card_channel_fini+0x20/0x20 [nouveau]
[ 1437.180005]  [&amp;lt;de96b86e&amp;gt;] ? nouveau_load+0x3fe/0x830 [nouveau]
[ 1437.180005]  [&amp;lt;c1276305&amp;gt;] ? drm_get_pci_dev+0x135/0x260
[ 1437.180005]  [&amp;lt;de9f6b79&amp;gt;] ? nouveau_pci_probe+0xd/0xf [nouveau]
[ 1437.180005]  [&amp;lt;c11f70a1&amp;gt;] ? local_pci_probe+0x41/0xb0
[ 1437.180005]  [&amp;lt;c11f7560&amp;gt;] ? pci_device_probe+0x60/0x80
[ 1437.180005]  [&amp;lt;c128ec25&amp;gt;] ? driver_probe_device+0x75/0x1d0
[ 1437.180005]  [&amp;lt;c11f6f8a&amp;gt;] ? pci_match_device+0x9a/0xa0
[ 1437.180005]  [&amp;lt;c128db87&amp;gt;] ? driver_bind+0x97/0xe0
[ 1437.180005]  [&amp;lt;c128daf0&amp;gt;] ? driver_unbind+0x90/0x90
[ 1437.180005]  [&amp;lt;c128d217&amp;gt;] ? drv_attr_store+0x27/0x30
[ 1437.180005]  [&amp;lt;c1117a59&amp;gt;] ? sysfs_write_file+0x99/0x100
[ 1437.180005]  [&amp;lt;c10c95ea&amp;gt;] ? vfs_write+0x9a/0x140
[ 1437.180005]  [&amp;lt;c10d6a90&amp;gt;] ? sys_dup3+0xf0/0x150
[ 1437.180005]  [&amp;lt;c10d6f8c&amp;gt;] ? do_fcntl+0x36c/0x4a0
[ 1437.180005]  [&amp;lt;c11179c0&amp;gt;] ? sysfs_poll+0x90/0x90
[ 1437.180005]  [&amp;lt;c10c986d&amp;gt;] ? sys_write+0x3d/0x70
[ 1437.180005]  [&amp;lt;c1404e97&amp;gt;] ? sysenter_do_call+0x12/0x26
[ 1437.180005] Code: 00 00 89 55 cc 85 c9 0f 84 4d 01 00 00 9c 8f 45 e0 fa 89 e0 25 00 e0 ff ff ff 40 14 c1 e2 02 8b 86 58 01 00 00 89 55 dc 8b 55 cc &amp;lt;8b&amp;gt; 04 90 85 c0 0f 84 31 01 00 00 8b 45 dc 03 86 48 01 00 00 


According to objdump that would match:

bool drm_handle_vblank(struct drm_device *dev, int crtc)
{
        u32 vblcount;
        s64 diff_ns;
        struct timeval tvblank;
        unsigned long irqflags;

        if (!dev-&amp;gt;num_crtcs)
                return false;

        /* Need timestamp lock to prevent concurrent execution with
         * vblank enable/disable, as this would cause inconsistent
         * or corrupted timestamps and vblank counts.
         */
        spin_lock_irqsave(&amp;amp;dev-&amp;gt;vblank_time_lock, irqflags);

        /* Vblank irq handling disabled. Nothing to do. */
        if (!dev-&amp;gt;vblank_enabled[crtc]) {
                spin_unlock_irqrestore(&amp;amp;dev-&amp;gt;vblank_time_lock, irqflags);
                return false;
        }



        /* Vblank irq handling disabled. Nothing to do. */
        if (!dev-&amp;gt;vblank_enabled[crtc]) {
    1e1d:       c1 e2 02                shl    $0x2,%edx
    1e20:       8b 86 58 01 00 00       mov    0x158(%esi),%eax
    1e26:       89 55 dc                mov    %edx,-0x24(%ebp)
    1e29:       8b 55 cc                mov    -0x34(%ebp),%edx
    1e2f:       85 c0                   test   %eax,%eax
    1e31:       0f 84 31 01 00 00       je     1f68 &amp;lt;drm_handle_vblank+0x178&amp;gt;

That means that dev-&amp;gt;vblank_enabled is not initialized yet while IRQs are
already triggering?

I check the assumption that dev-&amp;gt;vblank_enabled is NULL by first testing
it before trying to access [crtc] and firing a WARN_ON which indicates that
it happens 3 times untile probing of GPU completes:

[  149.017679] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[  149.017741] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[  149.017803] [drm] nouveau 0000:02:00.0: PMC - unhandled INTR 0x01000000
[  149.017956] [drm] nouveau 0000:02:00.0: Saving VGA fonts
[  149.082726] ------------[ cut here ]------------
[  149.082817] WARNING: at /usr/src/linux-git/drivers/gpu/drm/drm_irq.c:1302 drm_handle_vblank+0x1e2/0x1f0()
[  149.082884] Hardware name: nFORCE-MCP
[  149.082937] Modules linked in: nouveau ttm cfbcopyarea mxm_wmi wmi cfbimgblt cfbfillrect drm_kms_helper nfs lockd nfs_acl sunrpc
[  149.083669] Pid: 1564, comm: bash Not tainted 3.4.0-jupiter-00007-g3b608b6-dirty #10
[  149.083733] Call Trace:
[  149.083791]  [&amp;lt;c102a53d&amp;gt;] warn_slowpath_common+0x6d/0xa0
[  149.083849]  [&amp;lt;c1272fa2&amp;gt;] ? drm_handle_vblank+0x1e2/0x1f0
[  149.083906]  [&amp;lt;c1272fa2&amp;gt;] ? drm_handle_vblank+0x1e2/0x1f0
[  149.083963]  [&amp;lt;c102a58d&amp;gt;] warn_slowpath_null+0x1d/0x20
[  149.084018]  [&amp;lt;c1272fa2&amp;gt;] drm_handle_vblank+0x1e2/0x1f0
[  149.084078]  [&amp;lt;c1022340&amp;gt;] ? vmalloc_sync_all+0x130/0x130
[  149.084139]  [&amp;lt;c1404c29&amp;gt;] ? error_code+0x65/0x6c
[  149.084198]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[  149.084308]  [&amp;lt;de9c9248&amp;gt;] nv04_vblank_crtc0_isr+0x28/0x30 [nouveau]
[  149.084378]  [&amp;lt;de960204&amp;gt;] nouveau_irq_handler+0x64/0x100 [nouveau]
[  149.084459]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[  149.084598]  [&amp;lt;c106ff34&amp;gt;] handle_irq_event_percpu+0x54/0x1f0
[  149.084654]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[  149.084708]  [&amp;lt;c10700f8&amp;gt;] handle_irq_event+0x28/0x40
[  149.084763]  [&amp;lt;c107222b&amp;gt;] handle_fasteoi_irq+0x5b/0xf0
[  149.084815]  &amp;lt;IRQ&amp;gt;  [&amp;lt;c1003f9a&amp;gt;] ? do_IRQ+0x3a/0xb0
[  149.084912]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[  149.084968]  [&amp;lt;c10c0adc&amp;gt;] ? __slab_alloc.clone.68+0x4c/0x3e0
[  149.085024]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.085078]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.085136]  [&amp;lt;c103055c&amp;gt;] ? irq_exit+0x5c/0xa0
[  149.085189]  [&amp;lt;c1003fa3&amp;gt;] ? do_IRQ+0x43/0xb0
[  149.085242]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[  149.085296]  [&amp;lt;c10c1a5d&amp;gt;] ? __kmalloc+0x15d/0x1f0
[  149.085350]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.085405]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.085475]  [&amp;lt;de97d36f&amp;gt;] ? nouveau_display_create+0x43f/0x4e0 [nouveau]
[  149.085544]  [&amp;lt;de959f7c&amp;gt;] ? nouveau_card_init+0x16ac/0x1a70 [nouveau]
[  149.085612]  [&amp;lt;de958770&amp;gt;] ? nouveau_card_channel_fini+0x20/0x20 [nouveau]
[  149.085680]  [&amp;lt;de95a86e&amp;gt;] ? nouveau_load+0x3fe/0x830 [nouveau]
[  149.085737]  [&amp;lt;c1276325&amp;gt;] ? drm_get_pci_dev+0x135/0x260
[  149.085808]  [&amp;lt;de9e5b79&amp;gt;] ? nouveau_pci_probe+0xd/0xf [nouveau]
[  149.085869]  [&amp;lt;c11f70a1&amp;gt;] ? local_pci_probe+0x41/0xb0
[  149.085924]  [&amp;lt;c11f7560&amp;gt;] ? pci_device_probe+0x60/0x80
[  149.085992]  [&amp;lt;c128ec45&amp;gt;] ? driver_probe_device+0x75/0x1d0
[  149.086047]  [&amp;lt;c11f6f8a&amp;gt;] ? pci_match_device+0x9a/0xa0
[  149.086223]  [&amp;lt;c128dba7&amp;gt;] ? driver_bind+0x97/0xe0
[  149.086278]  [&amp;lt;c128db10&amp;gt;] ? driver_unbind+0x90/0x90
[  149.086333]  [&amp;lt;c128d237&amp;gt;] ? drv_attr_store+0x27/0x30
[  149.087347]  [&amp;lt;c1117a59&amp;gt;] ? sysfs_write_file+0x99/0x100
[  149.087404]  [&amp;lt;c10c95ea&amp;gt;] ? vfs_write+0x9a/0x140
[  149.087461]  [&amp;lt;c10d6a90&amp;gt;] ? sys_dup3+0xf0/0x150
[  149.087515]  [&amp;lt;c10d6f8c&amp;gt;] ? do_fcntl+0x36c/0x4a0
[  149.087567]  [&amp;lt;c11179c0&amp;gt;] ? sysfs_poll+0x90/0x90
[  149.087621]  [&amp;lt;c10c986d&amp;gt;] ? sys_write+0x3d/0x70
[  149.087675]  [&amp;lt;c1404e97&amp;gt;] ? sysenter_do_call+0x12/0x26
[  149.087729] ---[ end trace 5d73f7bccc0ebc64 ]---
[  149.087802] ------------[ cut here ]------------
[  149.087888] WARNING: at /usr/src/linux-git/drivers/gpu/drm/drm_irq.c:1302 drm_handle_vblank+0x1e2/0x1f0()
[  149.087953] Hardware name: nFORCE-MCP
[  149.088002] Modules linked in: nouveau ttm cfbcopyarea mxm_wmi wmi cfbimgblt cfbfillrect drm_kms_helper nfs lockd nfs_acl sunrpc
[  149.088543] Pid: 1564, comm: bash Tainted: G        W    3.4.0-jupiter-00007-g3b608b6-dirty #10
[  149.088606] Call Trace:
[  149.088656]  [&amp;lt;c102a53d&amp;gt;] warn_slowpath_common+0x6d/0xa0
[  149.088710]  [&amp;lt;c1272fa2&amp;gt;] ? drm_handle_vblank+0x1e2/0x1f0
[  149.088765]  [&amp;lt;c1272fa2&amp;gt;] ? drm_handle_vblank+0x1e2/0x1f0
[  149.088819]  [&amp;lt;c102a58d&amp;gt;] warn_slowpath_null+0x1d/0x20
[  149.088874]  [&amp;lt;c1272fa2&amp;gt;] drm_handle_vblank+0x1e2/0x1f0
[  149.088928]  [&amp;lt;c1022340&amp;gt;] ? vmalloc_sync_all+0x130/0x130
[  149.088983]  [&amp;lt;c1404c29&amp;gt;] ? error_code+0x65/0x6c
[  149.089036]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[  149.089110]  [&amp;lt;de9c9248&amp;gt;] nv04_vblank_crtc0_isr+0x28/0x30 [nouveau]
[  149.089178]  [&amp;lt;de960204&amp;gt;] nouveau_irq_handler+0x64/0x100 [nouveau]
[  149.089234]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[  149.089287]  [&amp;lt;c106ff34&amp;gt;] handle_irq_event_percpu+0x54/0x1f0
[  149.089342]  [&amp;lt;c10721d0&amp;gt;] ? unmask_irq+0x20/0x20
[  149.089395]  [&amp;lt;c10700f8&amp;gt;] handle_irq_event+0x28/0x40
[  149.089449]  [&amp;lt;c107222b&amp;gt;] handle_fasteoi_irq+0x5b/0xf0
[  149.089500]  &amp;lt;IRQ&amp;gt;  [&amp;lt;c1003f9a&amp;gt;] ? do_IRQ+0x3a/0xb0
[  149.089593]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[  149.089651]  [&amp;lt;c12d7687&amp;gt;] ? nv_napi_poll+0xe7/0x590
[  149.089705]  [&amp;lt;c103055c&amp;gt;] ? irq_exit+0x5c/0xa0
[  149.089757]  [&amp;lt;c1003fa3&amp;gt;] ? do_IRQ+0x43/0xb0
[  149.089832]  [&amp;lt;c137cf2c&amp;gt;] ? __qdisc_run+0x4c/0x110
[  149.089889]  [&amp;lt;c1368328&amp;gt;] ? net_rx_action+0xd8/0x1b0
[  149.089943]  [&amp;lt;c1030275&amp;gt;] ? __do_softirq+0x85/0x1a0
[  149.089997]  [&amp;lt;c10301f0&amp;gt;] ? local_bh_enable_ip+0x80/0x80
[  149.090010]  &amp;lt;IRQ&amp;gt;  [&amp;lt;c1030576&amp;gt;] ? irq_exit+0x76/0xa0
[  149.090010]  [&amp;lt;c1003fa3&amp;gt;] ? do_IRQ+0x43/0xb0
[  149.090010]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[  149.090010]  [&amp;lt;c10c0adc&amp;gt;] ? __slab_alloc.clone.68+0x4c/0x3e0
[  149.090010]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.090010]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.090010]  [&amp;lt;c103055c&amp;gt;] ? irq_exit+0x5c/0xa0
[  149.090010]  [&amp;lt;c1003fa3&amp;gt;] ? do_IRQ+0x43/0xb0
[  149.090010]  [&amp;lt;c14053b0&amp;gt;] ? common_interrupt+0x30/0x38
[  149.090010]  [&amp;lt;c10c1a5d&amp;gt;] ? __kmalloc+0x15d/0x1f0
[  149.090010]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.090010]  [&amp;lt;c1271e83&amp;gt;] ? drm_vblank_init+0x43/0x1d0
[  149.090010]  [&amp;lt;de97d36f&amp;gt;] ? nouveau_display_create+0x43f/0x4e0 [nouveau]
[  149.090010]  [&amp;lt;de959f7c&amp;gt;] ? nouveau_card_init+0x16ac/0x1a70 [nouveau]
[  149.090010]  [&amp;lt;de958770&amp;gt;] ? nouveau_card_channel_fini+0x20/0x20 [nouveau]
[  149.090010]  [&amp;lt;de95a86e&amp;gt;] ? nouveau_load+0x3fe/0x830 [nouveau]
[  149.090010]  [&amp;lt;c1276325&amp;gt;] ? drm_get_pci_dev+0x135/0x260
[  149.090010]  [&amp;lt;de9e5b79&amp;gt;] ? nouveau_pci_probe+0xd/0xf [nouveau]
[  149.090010]  [&amp;lt;c11f70a1&amp;gt;] ? local_pci_probe+0x41/0xb0
[  149.090010]  [&amp;lt;c11f7560&amp;gt;] ? pci_device_probe+0x60/0x80
[  149.090010]  [&amp;lt;c128ec45&amp;gt;] ? driver_probe_device+0x75/0x1d0
[  149.090010]  [&amp;lt;c11f6f8a&amp;gt;] ? pci_match_device+0x9a/0xa0
[  149.090010]  [&amp;lt;c128dba7&amp;gt;] ? driver_bind+0x97/0xe0
[  149.090010]  [&amp;lt;c128db10&amp;gt;] ? driver_unbind+0x90/0x90
[  149.090010]  [&amp;lt;c128d237&amp;gt;] ? drv_attr_store+0x27/0x30
[  149.090010]  [&amp;lt;c1117a59&amp;gt;] ? sysfs_write_file+0x99/0x100
[  149.090010]  [&amp;lt;c10c95ea&amp;gt;] ? vfs_write+0x9a/0x140
[  149.090010]  [&amp;lt;c10d6a90&amp;gt;] ? sys_dup3+0xf0/0x150
[  149.090010]  [&amp;lt;c10d6f8c&amp;gt;] ? do_fcntl+0x36c/0x4a0
[  149.090010]  [&amp;lt;c11179c0&amp;gt;] ? sysfs_poll+0x90/0x90
[  149.090010]  [&amp;lt;c10c986d&amp;gt;] ? sys_write+0x3d/0x70
[  149.090010]  [&amp;lt;c1404e97&amp;gt;] ? sysenter_do_call+0x12/0x26
[  149.090010] ---[ end trace 5d73f7bccc0ebc65 ]---
[  149.097648] ------------[ cut here ]------------
[  149.097726] WARNING: at /usr/src/linux-git/drivers/gpu/drm/drm_irq.c:1302 drm_handle_vblank+0x1e2/0x1f0()
[  149.097793] Hardware name: nFORCE-MCP
[  149.097842] Modules linked in: nouveau ttm cfbcopyarea mxm_wmi wmi cfbimgblt cfbfillrect drm_kms_helper nfs lockd nfs_acl sunrpc
[  149.098398] Pid: 1835, comm: syslog-ng Tainted: G        W    3.4.0-jupiter-00007-g3b608b6-dirty #10
[  149.098463] Call Trace:
[  149.098519]  [&amp;lt;c102a53d&amp;gt;] warn_slowpath_common+0x6d/0xa0
[  149.098575]  [&amp;lt;c1272fa2&amp;gt;] ? drm_handle_vblank+0x1e2/0x1f0
[  149.098632]  [&amp;lt;c1272fa2&amp;gt;] ? drm_handle_vblank+0x1e2/0x1f0
[  149.098686]  [&amp;lt;c102a58d&amp;gt;] warn_slowpath_null+0x1d/0x20
[  149.098741]  [&amp;lt;c1272fa2&amp;gt;] drm_handle_vblank+0x1e2/0x1f0
[  149.098800]  [&amp;lt;c1022340&amp;gt;] ? vmalloc_sync_all+0x130/0x130
[  149.098860]  [&amp;lt;c1404c29&amp;gt;] ? error_code+0x65/0x6c
[  149.098973]  [&amp;lt;de9c9248&amp;gt;] nv04_vblank_crtc0_isr+0x28/0x30 [nouveau]
[  149.099042]  [&amp;lt;de960204&amp;gt;] nouveau_irq_handler+0x64/0x100 [nouveau]
[  149.099103]  [&amp;lt;c106ff34&amp;gt;] handle_irq_event_percpu+0x54/0x1f0
[  149.099158]  [&amp;lt;c10700f8&amp;gt;] handle_irq_event+0x28/0x40
[  149.099214]  [&amp;lt;c107222b&amp;gt;] handle_fasteoi_irq+0x5b/0xf0
[  149.099271]  [&amp;lt;c1004176&amp;gt;] handle_irq+0x56/0xe0
[  149.099323]  [&amp;lt;c1003f9a&amp;gt;] do_IRQ+0x3a/0xb0
[  149.099380]  [&amp;lt;c10c986d&amp;gt;] ? sys_write+0x3d/0x70
[  149.099435]  [&amp;lt;c14053b0&amp;gt;] common_interrupt+0x30/0x38
[  149.099488] ---[ end trace 5d73f7bccc0ebc66 ]---
[  149.100069] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[  149.100130] [drm] No driver support for vblank timestamp query.
[  149.100224] [drm] nouveau 0000:02:00.0: 0 available performance level(s)
[  149.100284] [drm] nouveau 0000:02:00.0: c: core 174MHz memory 0MHz
[  149.102004] [drm] nouveau 0000:02:00.0: 0xAFD8: Parsing digital output script table
[  149.102299] [drm] nouveau 0000:02:00.0: Setting dpms mode 3 on vga encoder (output 0)
[  149.102365] [drm] nouveau 0000:02:00.0: Setting dpms mode 3 on tmds encoder (output 1)
[  149.297232] [drm] nouveau 0000:02:00.0: Load detected on head A
[  149.305870] [drm] Got external EDID base block and 0 extensions from "edid/iiyama-ProLite_E431.bin" for connector "DVI-I-2"
[  149.307904] [drm] nouveau 0000:02:00.0: allocated 1280x1024 fb: 0x45000, bo dcea6000
[  149.308177] fbcon: New framebuffer notification for fb0
[  149.308233] fbcon: nouveaufb (fb0) is primary device
[  149.308294] fbcon: info_fb unset...
[  149.319739] [drm] nouveau 0000:02:00.0: Setting dpms mode 0 on vga encoder (output 0)
[  149.319746] [drm] nouveau 0000:02:00.0: Output DVI-I-2 is running on CRTC 0 using output A
[  149.325136] Console: switching to colour frame buffer device 160x64
[  149.327824] fbcon: info_fb set, takeover = 0...
[  149.327851] fbcon: info is dcd3b4d0, info_fb is dcd3b4d0, con2fb_map[0] = dcd3b4d0, con2fb_map_boot[0] = 0
[  149.327901] fb0: nouveaufb frame buffer device
[  149.327930] drm: registered panic notifier
[  149.327967] [drm] Initialized nouveau 1.0.0 20120316 for 0000:02:00.0 on minor 0
&lt;/pre&gt;</description>
    <dc:creator>Bruno Prémont</dc:creator>
    <dc:date>2012-05-24T18:09:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69547">
    <title>[PATCH 0/3] drm: A few misc patches</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69547</link>
    <description>&lt;pre&gt;Just a few small items caught in my net while trawling the code.
&lt;/pre&gt;</description>
    <dc:creator>ville.syrjala&lt; at &gt;linux.intel.com</dc:creator>
    <dc:date>2012-05-24T17:53:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69520">
    <title>[PATCH RESEND] drm: fix case where panic notifier isn't unregistered</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69520</link>
    <description>&lt;pre&gt;The framebuffer helper panic notifier is unregistered, in drm_fb_helper_fini(), when kernel_fb_helper_list goes from being non-empty to empty. However, in drm_fb_helper_single_fb_probe(), it's possible for the panic notifier to be registered without an element being added to this list if a driver's probe function returns 0. Make sure that an attempt to add the panic notifier is made only when adding an element to kernel_fb_helper_list.

Signed-off-by: Frank Binns &amp;lt;frank.binns&amp;lt; at &amp;gt;imgtec.com&amp;gt;
---
This should hopefully have none of the whitespace damage introduced by my email client last time.

 drivers/gpu/drm/drm_fb_helper.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index a0d6e89..d3764b3 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -807,21 +807,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 printk(KERN_INFO "fb%d: %s frame buffer device\n", info-&amp;gt;node,
        info-&amp;gt;fix.id);
 
+/* Switch back to kernel console on panic */
+/* multi card linked list maybe */
+if (list_empty(&amp;amp;kernel_fb_helper_list)) {
+printk(KERN_INFO "drm: registered panic notifier\n");
+atomic_notifier_chain_register(&amp;amp;panic_notifier_list,
+       &amp;amp;paniced);
+register_sysrq_key('v', &amp;amp;sysrq_drm_fb_helper_restore_op);
+}
+
+list_add(&amp;amp;fb_helper-&amp;gt;kernel_fb_list, &amp;amp;kernel_fb_helper_list);
 } else {
 drm_fb_helper_set_par(info);
 }
 
-/* Switch back to kernel console on panic */
-/* multi card linked list maybe */
-if (list_empty(&amp;amp;kernel_fb_helper_list)) {
-printk(KERN_INFO "drm: registered panic notifier\n");
-atomic_notifier_chain_register(&amp;amp;panic_notifier_list,
-       &amp;amp;paniced);
-register_sysrq_key('v', &amp;amp;sysrq_drm_fb_helper_restore_op);
-}
-if (new_fb)
-list_add(&amp;amp;fb_helper-&amp;gt;kernel_fb_list, &amp;amp;kernel_fb_helper_list);
-
 return 0;
 }
 EXPORT_SYMBOL(drm_fb_helper_single_fb_probe);
&lt;/pre&gt;</description>
    <dc:creator>Frank Binns</dc:creator>
    <dc:date>2012-05-24T13:37:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69502">
    <title>[PATCH 01/10] drm/radeon: remove radeon_fence_create</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69502</link>
    <description>&lt;pre&gt;It is completely unnecessary to create fences
before they are emitted, so remove it and a bunch
of checks if fences are emitted or not.

Signed-off-by: Christian König &amp;lt;deathsimple&amp;lt; at &amp;gt;vodafone.de&amp;gt;
---
 drivers/gpu/drm/radeon/evergreen.c        |    2 +-
 drivers/gpu/drm/radeon/ni.c               |    2 +-
 drivers/gpu/drm/radeon/r100.c             |    4 +-
 drivers/gpu/drm/radeon/r200.c             |    4 +-
 drivers/gpu/drm/radeon/r600.c             |    4 +-
 drivers/gpu/drm/radeon/r600_blit_kms.c    |    6 +--
 drivers/gpu/drm/radeon/radeon.h           |   11 +++--
 drivers/gpu/drm/radeon/radeon_asic.h      |    8 ++--
 drivers/gpu/drm/radeon/radeon_benchmark.c |   10 +----
 drivers/gpu/drm/radeon/radeon_fence.c     |   42 ++++++------------
 drivers/gpu/drm/radeon/radeon_ring.c      |   19 +++++----
 drivers/gpu/drm/radeon/radeon_sa.c        |    2 +-
 drivers/gpu/drm/radeon/radeon_test.c      |   66 ++++++++++++-----------------
 drivers/gpu/drm/radeon/radeon_ttm.c       |   30 +++++--------
 drivers/gpu/drm/radeon/si.c               |    6 +--
 15 files changed, 86 insertions(+), 130 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 58991af..dd3cea4 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1366,7 +1366,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void evergreen_mc_program(struct radeon_device *rdev)
  */
 void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
 {
-struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;fence-&amp;gt;ring];
+struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;ring];
 
 /* set to DX10/11 mode */
 radeon_ring_write(ring, PACKET3(PACKET3_MODE_CONTROL, 0));
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index b01c2dd..9d9f5ac 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1127,7 +1127,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void cayman_fence_ring_emit(struct radeon_device *rdev,
 
 void cayman_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
 {
-struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;fence-&amp;gt;ring];
+struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;ring];
 
 /* set to DX10/11 mode */
 radeon_ring_write(ring, PACKET3(PACKET3_MODE_CONTROL, 0));
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index fb44e7e..415b7d8 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -883,7 +883,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r100_copy_blit(struct radeon_device *rdev,
    uint64_t src_offset,
    uint64_t dst_offset,
    unsigned num_gpu_pages,
-   struct radeon_fence *fence)
+   struct radeon_fence **fence)
 {
 struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[RADEON_RING_TYPE_GFX_INDEX];
 uint32_t cur_pages;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -947,7 +947,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r100_copy_blit(struct radeon_device *rdev,
   RADEON_WAIT_HOST_IDLECLEAN |
   RADEON_WAIT_DMA_GUI_IDLE);
 if (fence) {
-r = radeon_fence_emit(rdev, fence);
+r = radeon_fence_emit(rdev, fence, RADEON_RING_TYPE_GFX_INDEX);
 }
 radeon_ring_unlock_commit(rdev, ring);
 return r;
diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c
index a26144d..f088925 100644
--- a/drivers/gpu/drm/radeon/r200.c
+++ b/drivers/gpu/drm/radeon/r200.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -85,7 +85,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r200_copy_dma(struct radeon_device *rdev,
   uint64_t src_offset,
   uint64_t dst_offset,
   unsigned num_gpu_pages,
-  struct radeon_fence *fence)
+  struct radeon_fence **fence)
 {
 struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[RADEON_RING_TYPE_GFX_INDEX];
 uint32_t size;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -120,7 +120,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r200_copy_dma(struct radeon_device *rdev,
 radeon_ring_write(ring, PACKET0(RADEON_WAIT_UNTIL, 0));
 radeon_ring_write(ring, RADEON_WAIT_DMA_GUI_IDLE);
 if (fence) {
-r = radeon_fence_emit(rdev, fence);
+r = radeon_fence_emit(rdev, fence, RADEON_RING_TYPE_GFX_INDEX);
 }
 radeon_ring_unlock_commit(rdev, ring);
 return r;
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index f388a1d..e5279f9 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2369,7 +2369,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r600_copy_blit(struct radeon_device *rdev,
    uint64_t src_offset,
    uint64_t dst_offset,
    unsigned num_gpu_pages,
-   struct radeon_fence *fence)
+   struct radeon_fence **fence)
 {
 struct radeon_sa_bo *vb = NULL;
 int r;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2670,7 +2670,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void r600_fini(struct radeon_device *rdev)
  */
 void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
 {
-struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;fence-&amp;gt;ring];
+struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;ring];
 
 /* FIXME: implement */
 radeon_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c b/drivers/gpu/drm/radeon/r600_blit_kms.c
index 03b6e0d..02f4eeb 100644
--- a/drivers/gpu/drm/radeon/r600_blit_kms.c
+++ b/drivers/gpu/drm/radeon/r600_blit_kms.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -703,20 +703,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_gpu_pages,
 return 0;
 }
 
-void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence,
+void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence **fence,
  struct radeon_sa_bo *vb)
 {
 struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[RADEON_RING_TYPE_GFX_INDEX];
 int r;
 
-r = radeon_fence_emit(rdev, fence);
+r = radeon_fence_emit(rdev, fence, RADEON_RING_TYPE_GFX_INDEX);
 if (r) {
 radeon_ring_unlock_undo(rdev, ring);
 return;
 }
 
 radeon_ring_unlock_commit(rdev, ring);
-radeon_sa_bo_free(rdev, &amp;amp;vb, fence);
+radeon_sa_bo_free(rdev, &amp;amp;vb, *fence);
 }
 
 void r600_kms_blit_copy(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 1dc3a4a..5e259b4 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,7 +113,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern int radeon_lockup_timeout;
 
 /* fence seq are set to this number when signaled */
 #define RADEON_FENCE_SIGNALED_SEQ0LL
-#define RADEON_FENCE_NOTEMITED_SEQ(~0LL)
 
 /* internal ring indices */
 /* r1xx+ has gfx CP ring */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -277,8 +276,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct radeon_fence {
 int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
 int radeon_fence_driver_init(struct radeon_device *rdev);
 void radeon_fence_driver_fini(struct radeon_device *rdev);
-int radeon_fence_create(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
-int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence);
+int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
 void radeon_fence_process(struct radeon_device *rdev, int ring);
 bool radeon_fence_signaled(struct radeon_fence *fence);
 int radeon_fence_wait(struct radeon_fence *fence, bool interruptible);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -627,6 +625,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct radeon_ib {
 uint32_tlength_dw;
 uint64_tgpu_addr;
 uint32_t*ptr;
+intring;
 struct radeon_fence*fence;
 unsignedvm_id;
 boolis_const_ib;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1190,20 +1189,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct radeon_asic {
     uint64_t src_offset,
     uint64_t dst_offset,
     unsigned num_gpu_pages,
-    struct radeon_fence *fence);
+    struct radeon_fence **fence);
 u32 blit_ring_index;
 int (*dma)(struct radeon_device *rdev,
    uint64_t src_offset,
    uint64_t dst_offset,
    unsigned num_gpu_pages,
-   struct radeon_fence *fence);
+   struct radeon_fence **fence);
 u32 dma_ring_index;
 /* method used for bo copy */
 int (*copy)(struct radeon_device *rdev,
     uint64_t src_offset,
     uint64_t dst_offset,
     unsigned num_gpu_pages,
-    struct radeon_fence *fence);
+    struct radeon_fence **fence);
 /* ring used for bo copies */
 u32 copy_ring_index;
 } copy;
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index e76a941..8cdf075 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -79,7 +79,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int r100_copy_blit(struct radeon_device *rdev,
    uint64_t src_offset,
    uint64_t dst_offset,
    unsigned num_gpu_pages,
-   struct radeon_fence *fence);
+   struct radeon_fence **fence);
 int r100_set_surface_reg(struct radeon_device *rdev, int reg,
  uint32_t tiling_flags, uint32_t pitch,
  uint32_t offset, uint32_t obj_size);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -144,7 +144,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern int r200_copy_dma(struct radeon_device *rdev,
  uint64_t src_offset,
  uint64_t dst_offset,
  unsigned num_gpu_pages,
- struct radeon_fence *fence);
+ struct radeon_fence **fence);
 void r200_set_safe_registers(struct radeon_device *rdev);
 
 /*
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -318,7 +318,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
 int r600_ring_test(struct radeon_device *rdev, struct radeon_ring *cp);
 int r600_copy_blit(struct radeon_device *rdev,
    uint64_t src_offset, uint64_t dst_offset,
-   unsigned num_gpu_pages, struct radeon_fence *fence);
+   unsigned num_gpu_pages, struct radeon_fence **fence);
 void r600_hpd_init(struct radeon_device *rdev);
 void r600_hpd_fini(struct radeon_device *rdev);
 bool r600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -364,7 +364,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void r600_hdmi_update_audio_settings(struct drm_encoder *encoder);
 /* r600 blit */
 int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_gpu_pages,
    struct radeon_sa_bo **vb);
-void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence *fence,
+void r600_blit_done_copy(struct radeon_device *rdev, struct radeon_fence **fence,
  struct radeon_sa_bo *vb);
 void r600_kms_blit_copy(struct radeon_device *rdev,
 u64 src_gpu_addr, u64 dst_gpu_addr,
diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c b/drivers/gpu/drm/radeon/radeon_benchmark.c
index 364f5b1..bedda9c 100644
--- a/drivers/gpu/drm/radeon/radeon_benchmark.c
+++ b/drivers/gpu/drm/radeon/radeon_benchmark.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,20 +45,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size,
 for (i = 0; i &amp;lt; n; i++) {
 switch (flag) {
 case RADEON_BENCHMARK_COPY_DMA:
-r = radeon_fence_create(rdev, &amp;amp;fence, radeon_copy_dma_ring_index(rdev));
-if (r)
-return r;
 r = radeon_copy_dma(rdev, saddr, daddr,
     size / RADEON_GPU_PAGE_SIZE,
-    fence);
+    &amp;amp;fence);
 break;
 case RADEON_BENCHMARK_COPY_BLIT:
-r = radeon_fence_create(rdev, &amp;amp;fence, radeon_copy_blit_ring_index(rdev));
-if (r)
-return r;
 r = radeon_copy_blit(rdev, saddr, daddr,
      size / RADEON_GPU_PAGE_SIZE,
-     fence);
+     &amp;amp;fence);
 break;
 default:
 DRM_ERROR("Unknown copy method\n");
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 11f5f40..401d346 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -61,15 +61,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static u32 radeon_fence_read(struct radeon_device *rdev, int ring)
 return seq;
 }
 
-int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
+int radeon_fence_emit(struct radeon_device *rdev,
+      struct radeon_fence **fence,
+      int ring)
 {
 /* we are protected by the ring emission mutex */
-if (fence-&amp;gt;seq &amp;amp;&amp;amp; fence-&amp;gt;seq &amp;lt; RADEON_FENCE_NOTEMITED_SEQ) {
-return 0;
+*fence = kmalloc(sizeof(struct radeon_fence), GFP_KERNEL);
+if ((*fence) == NULL) {
+return -ENOMEM;
 }
-fence-&amp;gt;seq = ++rdev-&amp;gt;fence_drv[fence-&amp;gt;ring].seq;
-radeon_fence_ring_emit(rdev, fence-&amp;gt;ring, fence);
-trace_radeon_fence_emit(rdev-&amp;gt;ddev, fence-&amp;gt;seq);
+kref_init(&amp;amp;((*fence)-&amp;gt;kref));
+(*fence)-&amp;gt;rdev = rdev;
+(*fence)-&amp;gt;seq = ++rdev-&amp;gt;fence_drv[ring].seq;
+(*fence)-&amp;gt;ring = ring;
+radeon_fence_ring_emit(rdev, ring, *fence);
+trace_radeon_fence_emit(rdev-&amp;gt;ddev, (*fence)-&amp;gt;seq);
 return 0;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -138,25 +144,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void radeon_fence_destroy(struct kref *kref)
 struct radeon_fence *fence;
 
 fence = container_of(kref, struct radeon_fence, kref);
-fence-&amp;gt;seq = RADEON_FENCE_NOTEMITED_SEQ;
 kfree(fence);
 }
 
-int radeon_fence_create(struct radeon_device *rdev,
-struct radeon_fence **fence,
-int ring)
-{
-*fence = kmalloc(sizeof(struct radeon_fence), GFP_KERNEL);
-if ((*fence) == NULL) {
-return -ENOMEM;
-}
-kref_init(&amp;amp;((*fence)-&amp;gt;kref));
-(*fence)-&amp;gt;rdev = rdev;
-(*fence)-&amp;gt;seq = RADEON_FENCE_NOTEMITED_SEQ;
-(*fence)-&amp;gt;ring = ring;
-return 0;
-}
-
 static bool radeon_fence_seq_signaled(struct radeon_device *rdev,
       u64 seq, unsigned ring)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -176,10 +166,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bool radeon_fence_signaled(struct radeon_fence *fence)
 if (!fence) {
 return true;
 }
-if (fence-&amp;gt;seq == RADEON_FENCE_NOTEMITED_SEQ) {
-WARN(1, "Querying an unemitted fence : %p !\n", fence);
-return true;
-}
 if (fence-&amp;gt;seq == RADEON_FENCE_SIGNALED_SEQ) {
 return true;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -444,9 +430,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int radeon_fence_wait_any(struct radeon_device *rdev,
 return 0;
 }
 
-if (fences[i]-&amp;gt;seq &amp;lt; RADEON_FENCE_NOTEMITED_SEQ) {
-seq[i] = fences[i]-&amp;gt;seq;
-}
+seq[i] = fences[i]-&amp;gt;seq;
 }
 
 r = radeon_fence_wait_any_seq(rdev, seq, intr);
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 493a7be..a0b9970 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -74,13 +74,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int radeon_ib_get(struct radeon_device *rdev, int ring,
 dev_err(rdev-&amp;gt;dev, "failed to get a new IB (%d)\n", r);
 return r;
 }
-r = radeon_fence_create(rdev, &amp;amp;ib-&amp;gt;fence, ring);
-if (r) {
-dev_err(rdev-&amp;gt;dev, "failed to create fence for new IB (%d)\n", r);
-radeon_sa_bo_free(rdev, &amp;amp;ib-&amp;gt;sa_bo, NULL);
-return r;
-}
 
+ib-&amp;gt;ring = ring;
+ib-&amp;gt;fence = NULL;
 ib-&amp;gt;ptr = radeon_sa_bo_cpu_addr(ib-&amp;gt;sa_bo);
 ib-&amp;gt;gpu_addr = radeon_sa_bo_gpu_addr(ib-&amp;gt;sa_bo);
 ib-&amp;gt;vm_id = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -99,7 +95,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib *ib)
 
 int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib)
 {
-struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;fence-&amp;gt;ring];
+struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;ring];
 int r = 0;
 
 if (!ib-&amp;gt;length_dw || !ring-&amp;gt;ready) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -114,8 +110,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib)
 dev_err(rdev-&amp;gt;dev, "scheduling IB failed (%d).\n", r);
 return r;
 }
-radeon_ring_ib_execute(rdev, ib-&amp;gt;fence-&amp;gt;ring, ib);
-radeon_fence_emit(rdev, ib-&amp;gt;fence);
+radeon_ring_ib_execute(rdev, ib-&amp;gt;ring, ib);
+r = radeon_fence_emit(rdev, &amp;amp;ib-&amp;gt;fence, ib-&amp;gt;ring);
+if (r) {
+dev_err(rdev-&amp;gt;dev, "failed to emit fence for new IB (%d)\n", r);
+radeon_ring_unlock_undo(rdev, ring);
+return r;
+}
 radeon_ring_unlock_commit(rdev, ring);
 return 0;
 }
diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c
index 32059b7..81dbb5b 100644
--- a/drivers/gpu/drm/radeon/radeon_sa.c
+++ b/drivers/gpu/drm/radeon/radeon_sa.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -349,7 +349,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_sa_bo_free(struct radeon_device *rdev, struct radeon_sa_bo **sa_bo,
 
 sa_manager = (*sa_bo)-&amp;gt;manager;
 spin_lock(&amp;amp;sa_manager-&amp;gt;lock);
-if (fence &amp;amp;&amp;amp; fence-&amp;gt;seq &amp;amp;&amp;amp; fence-&amp;gt;seq &amp;lt; RADEON_FENCE_NOTEMITED_SEQ) {
+if (fence &amp;amp;&amp;amp; !radeon_fence_signaled(fence)) {
 (*sa_bo)-&amp;gt;fence = radeon_fence_ref(fence);
 list_add_tail(&amp;amp;(*sa_bo)-&amp;gt;flist,
       &amp;amp;sa_manager-&amp;gt;flist[fence-&amp;gt;ring]);
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
index efff929..47e1535 100644
--- a/drivers/gpu/drm/radeon/radeon_test.c
+++ b/drivers/gpu/drm/radeon/radeon_test.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -106,13 +106,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_moves(struct radeon_device *rdev)
 
 radeon_bo_kunmap(gtt_obj[i]);
 
-r = radeon_fence_create(rdev, &amp;amp;fence, RADEON_RING_TYPE_GFX_INDEX);
-if (r) {
-DRM_ERROR("Failed to create GTT-&amp;gt;VRAM fence %d\n", i);
-goto out_cleanup;
-}
-
-r = radeon_copy(rdev, gtt_addr, vram_addr, size / RADEON_GPU_PAGE_SIZE, fence);
+r = radeon_copy(rdev, gtt_addr, vram_addr, size / RADEON_GPU_PAGE_SIZE, &amp;amp;fence);
 if (r) {
 DRM_ERROR("Failed GTT-&amp;gt;VRAM copy %d\n", i);
 goto out_cleanup;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -155,13 +149,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_moves(struct radeon_device *rdev)
 
 radeon_bo_kunmap(vram_obj);
 
-r = radeon_fence_create(rdev, &amp;amp;fence, RADEON_RING_TYPE_GFX_INDEX);
-if (r) {
-DRM_ERROR("Failed to create VRAM-&amp;gt;GTT fence %d\n", i);
-goto out_cleanup;
-}
-
-r = radeon_copy(rdev, vram_addr, gtt_addr, size / RADEON_GPU_PAGE_SIZE, fence);
+r = radeon_copy(rdev, vram_addr, gtt_addr, size / RADEON_GPU_PAGE_SIZE, &amp;amp;fence);
 if (r) {
 DRM_ERROR("Failed VRAM-&amp;gt;GTT copy %d\n", i);
 goto out_cleanup;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -245,17 +233,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_ring_sync(struct radeon_device *rdev,
 int ridxB = radeon_ring_index(rdev, ringB);
 int r;
 
-r = radeon_fence_create(rdev, &amp;amp;fence1, ridxA);
-if (r) {
-DRM_ERROR("Failed to create sync fence 1\n");
-goto out_cleanup;
-}
-r = radeon_fence_create(rdev, &amp;amp;fence2, ridxA);
-if (r) {
-DRM_ERROR("Failed to create sync fence 2\n");
-goto out_cleanup;
-}
-
 r = radeon_semaphore_create(rdev, &amp;amp;semaphore);
 if (r) {
 DRM_ERROR("Failed to create semaphore\n");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -268,9 +245,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_ring_sync(struct radeon_device *rdev,
 goto out_cleanup;
 }
 radeon_semaphore_emit_wait(rdev, ridxA, semaphore);
-radeon_fence_emit(rdev, fence1);
+r = radeon_fence_emit(rdev, &amp;amp;fence1, ridxA);
+if (r) {
+DRM_ERROR("Failed to emit fence 1\n");
+radeon_ring_unlock_undo(rdev, ringA);
+goto out_cleanup;
+}
 radeon_semaphore_emit_wait(rdev, ridxA, semaphore);
-radeon_fence_emit(rdev, fence2);
+r = radeon_fence_emit(rdev, &amp;amp;fence2, ridxA);
+if (r) {
+DRM_ERROR("Failed to emit fence 2\n");
+radeon_ring_unlock_undo(rdev, ringA);
+goto out_cleanup;
+}
 radeon_ring_unlock_commit(rdev, ringA);
 
 mdelay(1000);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -342,17 +329,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_ring_sync2(struct radeon_device *rdev,
 bool sigA, sigB;
 int i, r;
 
-r = radeon_fence_create(rdev, &amp;amp;fenceA, ridxA);
-if (r) {
-DRM_ERROR("Failed to create sync fence 1\n");
-goto out_cleanup;
-}
-r = radeon_fence_create(rdev, &amp;amp;fenceB, ridxB);
-if (r) {
-DRM_ERROR("Failed to create sync fence 2\n");
-goto out_cleanup;
-}
-
 r = radeon_semaphore_create(rdev, &amp;amp;semaphore);
 if (r) {
 DRM_ERROR("Failed to create semaphore\n");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -365,7 +341,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_ring_sync2(struct radeon_device *rdev,
 goto out_cleanup;
 }
 radeon_semaphore_emit_wait(rdev, ridxA, semaphore);
-radeon_fence_emit(rdev, fenceA);
+r = radeon_fence_emit(rdev, &amp;amp;fenceA, ridxA);
+if (r) {
+DRM_ERROR("Failed to emit sync fence 1\n");
+radeon_ring_unlock_undo(rdev, ringA);
+goto out_cleanup;
+}
 radeon_ring_unlock_commit(rdev, ringA);
 
 r = radeon_ring_lock(rdev, ringB, 64);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -374,7 +355,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void radeon_test_ring_sync2(struct radeon_device *rdev,
 goto out_cleanup;
 }
 radeon_semaphore_emit_wait(rdev, ridxB, semaphore);
-radeon_fence_emit(rdev, fenceB);
+r = radeon_fence_emit(rdev, &amp;amp;fenceB, ridxB);
+if (r) {
+DRM_ERROR("Failed to create sync fence 2\n");
+radeon_ring_unlock_undo(rdev, ringB);
+goto out_cleanup;
+}
 radeon_ring_unlock_commit(rdev, ringB);
 
 mdelay(1000);
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index c94a225..2d36bdd 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -222,15 +222,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_move_blit(struct ttm_buffer_object *bo,
 {
 struct radeon_device *rdev;
 uint64_t old_start, new_start;
-struct radeon_fence *fence, *old_fence;
+struct radeon_fence *fence;
 struct radeon_semaphore *sem = NULL;
-int r;
+int r, ridx;
 
 rdev = radeon_get_rdev(bo-&amp;gt;bdev);
-r = radeon_fence_create(rdev, &amp;amp;fence, radeon_copy_ring_index(rdev));
-if (unlikely(r)) {
-return r;
-}
+ridx = radeon_copy_ring_index(rdev);
 old_start = old_mem-&amp;gt;start &amp;lt;&amp;lt; PAGE_SHIFT;
 new_start = new_mem-&amp;gt;start &amp;lt;&amp;lt; PAGE_SHIFT;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -243,7 +240,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_move_blit(struct ttm_buffer_object *bo,
 break;
 default:
 DRM_ERROR("Unknown placement %d\n", old_mem-&amp;gt;mem_type);
-radeon_fence_unref(&amp;amp;fence);
 return -EINVAL;
 }
 switch (new_mem-&amp;gt;mem_type) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -255,42 +251,38 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int radeon_move_blit(struct ttm_buffer_object *bo,
 break;
 default:
 DRM_ERROR("Unknown placement %d\n", old_mem-&amp;gt;mem_type);
-radeon_fence_unref(&amp;amp;fence);
 return -EINVAL;
 }
-if (!rdev-&amp;gt;ring[radeon_copy_ring_index(rdev)].ready) {
+if (!rdev-&amp;gt;ring[ridx].ready) {
 DRM_ERROR("Trying to move memory with ring turned off.\n");
-radeon_fence_unref(&amp;amp;fence);
 return -EINVAL;
 }
 
 BUILD_BUG_ON((PAGE_SIZE % RADEON_GPU_PAGE_SIZE) != 0);
 
 /* sync other rings */
-old_fence = bo-&amp;gt;sync_obj;
-if (old_fence &amp;amp;&amp;amp; old_fence-&amp;gt;ring != fence-&amp;gt;ring
-    &amp;amp;&amp;amp; !radeon_fence_signaled(old_fence)) {
+fence = bo-&amp;gt;sync_obj;
+if (fence &amp;amp;&amp;amp; fence-&amp;gt;ring != ridx
+    &amp;amp;&amp;amp; !radeon_fence_signaled(fence)) {
 bool sync_to_ring[RADEON_NUM_RINGS] = { };
-sync_to_ring[old_fence-&amp;gt;ring] = true;
+sync_to_ring[fence-&amp;gt;ring] = true;
 
 r = radeon_semaphore_create(rdev, &amp;amp;sem);
 if (r) {
-radeon_fence_unref(&amp;amp;fence);
 return r;
 }
 
-r = radeon_semaphore_sync_rings(rdev, sem,
-sync_to_ring, fence-&amp;gt;ring);
+r = radeon_semaphore_sync_rings(rdev, sem, sync_to_ring, ridx);
 if (r) {
 radeon_semaphore_free(rdev, sem, NULL);
-radeon_fence_unref(&amp;amp;fence);
 return r;
 }
 }
 
+fence = NULL;
 r = radeon_copy(rdev, old_start, new_start,
 new_mem-&amp;gt;num_pages * (PAGE_SIZE / RADEON_GPU_PAGE_SIZE), /* GPU pages */
-fence);
+&amp;amp;fence);
 /* FIXME: handle copy error */
 r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL,
       evict, no_wait_reserve, no_wait_gpu, new_mem);
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 549732e..5ca8ef5 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1915,7 +1915,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void si_fence_ring_emit(struct radeon_device *rdev,
  */
 void si_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
 {
-struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;fence-&amp;gt;ring];
+struct radeon_ring *ring = &amp;amp;rdev-&amp;gt;ring[ib-&amp;gt;ring];
 u32 header;
 
 if (ib-&amp;gt;is_const_ib)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2855,7 +2855,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int si_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib)
 if (ib-&amp;gt;is_const_ib)
 ret = si_vm_packet3_ce_check(rdev, ib-&amp;gt;ptr, &amp;amp;pkt);
 else {
-switch (ib-&amp;gt;fence-&amp;gt;ring) {
+switch (ib-&amp;gt;ring) {
 case RADEON_RING_TYPE_GFX_INDEX:
 ret = si_vm_packet3_gfx_check(rdev, ib-&amp;gt;ptr, &amp;amp;pkt);
 break;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2864,7 +2864,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int si_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib)
 ret = si_vm_packet3_compute_check(rdev, ib-&amp;gt;ptr, &amp;amp;pkt);
 break;
 default:
-dev_err(rdev-&amp;gt;dev, "Non-PM4 ring %d !\n", ib-&amp;gt;fence-&amp;gt;ring);
+dev_err(rdev-&amp;gt;dev, "Non-PM4 ring %d !\n", ib-&amp;gt;ring);
 ret = -EINVAL;
 break;
 }
&lt;/pre&gt;</description>
    <dc:creator>Christian König</dc:creator>
    <dc:date>2012-05-24T07:49:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69491">
    <title>[PATCH] drm/edid/quirks: ViewSonic VA2026w</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69491</link>
    <description>&lt;pre&gt;Entirely new class of fail for this one.  The detailed timings are for
normal CVT but the monitor really wanted CVT-R.

Bugzilla: http://bugzilla.redhat/com/516471
Signed-off-by: Adam Jackson &amp;lt;ajax&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 drivers/gpu/drm/drm_edid.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5a18b0d..a9b14a1 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -66,6 +66,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define EDID_QUIRK_FIRST_DETAILED_PREFERRED(1 &amp;lt;&amp;lt; 5)
 /* use +hsync +vsync for detailed mode */
 #define EDID_QUIRK_DETAILED_SYNC_PP(1 &amp;lt;&amp;lt; 6)
+/* Force reduced-blanking timings for detailed modes */
+#define EDID_QUIRK_FORCE_REDUCED_BLANKING(1 &amp;lt;&amp;lt; 7)
 
 struct detailed_mode_closure {
 struct drm_connector *connector;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -120,6 +122,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct edid_quirk {
 /* Samsung SyncMaster 22[5-6]BW */
 { "SAM", 596, EDID_QUIRK_PREFER_LARGE_60 },
 { "SAM", 638, EDID_QUIRK_PREFER_LARGE_60 },
+
+/* ViewSonic VA2026w */
+{ "VSC", 5020, EDID_QUIRK_FORCE_REDUCED_BLANKING },
 };
 
 /*** DDC fetch and block validation ***/
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -852,12 +857,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 "Wrong Hsync/Vsync pulse width\n");
 return NULL;
 }
+
+if (quirks &amp;amp; EDID_QUIRK_FORCE_REDUCED_BLANKING) {
+mode = drm_cvt_mode(dev, hactive, vactive, 60, true, false, false);
+if (!mode)
+return NULL;
+
+goto set_size;
+}
+
 mode = drm_mode_create(dev);
 if (!mode)
 return NULL;
 
-mode-&amp;gt;type = DRM_MODE_TYPE_DRIVER;
-
 if (quirks &amp;amp; EDID_QUIRK_135_CLOCK_TOO_HIGH)
 timing-&amp;gt;pixel_clock = cpu_to_le16(1088);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -881,8 +893,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 
 drm_mode_do_interlace_quirk(mode, pt);
 
-drm_mode_set_name(mode);
-
 if (quirks &amp;amp; EDID_QUIRK_DETAILED_SYNC_PP) {
 pt-&amp;gt;misc |= DRM_EDID_PT_HSYNC_POSITIVE | DRM_EDID_PT_VSYNC_POSITIVE;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -892,6 +902,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 mode-&amp;gt;flags |= (pt-&amp;gt;misc &amp;amp; DRM_EDID_PT_VSYNC_POSITIVE) ?
 DRM_MODE_FLAG_PVSYNC : DRM_MODE_FLAG_NVSYNC;
 
+set_size:
 mode-&amp;gt;width_mm = pt-&amp;gt;width_mm_lo | (pt-&amp;gt;width_height_mm_hi &amp;amp; 0xf0) &amp;lt;&amp;lt; 4;
 mode-&amp;gt;height_mm = pt-&amp;gt;height_mm_lo | (pt-&amp;gt;width_height_mm_hi &amp;amp; 0xf) &amp;lt;&amp;lt; 8;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -905,6 +916,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 mode-&amp;gt;height_mm = edid-&amp;gt;height_cm * 10;
 }
 
+mode-&amp;gt;type = DRM_MODE_TYPE_DRIVER;
+drm_mode_set_name(mode);
+
 return mode;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Adam Jackson</dc:creator>
    <dc:date>2012-05-23T20:26:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69480">
    <title>[PATCH] drm/radeon: fix XFX quirk</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69480</link>
    <description>&lt;pre&gt;From: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;

Only override the ddc bus if the connector doesn't have
a valid one.  The existing code overrode the ddc bus for
all connectors even if it had ddc bus.

Fixes ddc on another XFX card with the same pci ids that
was broken by the quirk overwriting the correct ddc bus.

Reported-by: Mehdi Aqadjani Memar &amp;lt;m.aqadjanimemar&amp;lt; at &amp;gt;student.ru.nl&amp;gt;
Signed-off-by: Alex Deucher &amp;lt;alexander.deucher&amp;lt; at &amp;gt;amd.com&amp;gt;
---
 drivers/gpu/drm/radeon/radeon_atombios.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index f21cb08..3f57c42 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -440,7 +440,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static bool radeon_atom_apply_quirks(struct drm_device *dev,
  */
 if ((dev-&amp;gt;pdev-&amp;gt;device == 0x9498) &amp;amp;&amp;amp;
     (dev-&amp;gt;pdev-&amp;gt;subsystem_vendor == 0x1682) &amp;amp;&amp;amp;
-    (dev-&amp;gt;pdev-&amp;gt;subsystem_device == 0x2452)) {
+    (dev-&amp;gt;pdev-&amp;gt;subsystem_device == 0x2452) &amp;amp;&amp;amp;
+    (i2c_bus-&amp;gt;valid == false) &amp;amp;&amp;amp;
+    !(supported_device &amp;amp; (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) {
 struct radeon_device *rdev = dev-&amp;gt;dev_private;
 *i2c_bus = radeon_lookup_i2c_gpio(rdev, 0x93);
 }
&lt;/pre&gt;</description>
    <dc:creator>alexdeucher&lt; at &gt;gmail.com</dc:creator>
    <dc:date>2012-05-23T15:48:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69433">
    <title>[PATCH] drm/i915: no lvds quirk for HP t5740e Thin Client</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69433</link>
    <description>&lt;pre&gt;Hi!

This box has DisplayPort and VGA, but no LVDS. Product specs are at
http://h10010.www1.hp.com/wwpc/us/en/sm/WF25a/12454-12454-321959-338927-3640406-4282707.html?dnr=1
and dmidecode output can be found at http://www.getslash.de/bug_attachments/dmidecode-t5740e.txt

Signed-off-by: Jan-Benedict Glaw &amp;lt;jbglaw&amp;lt; at &amp;gt;getslash.de&amp;gt;
---
 drivers/gpu/drm/i915/intel_lvds.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 9c71183..9fadd64 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -747,6 +747,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct dmi_system_id intel_no_lvds[] = {
 },
 {
 .callback = intel_no_lvds_dmi_callback,
+.ident = "Hewlett-Packard HP t5740e Thin Client",
+.matches = {
+DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+DMI_MATCH(DMI_PRODUCT_NAME, "HP t5740e Thin Client"),
+},
+},
+{
+.callback = intel_no_lvds_dmi_callback,
 .ident = "Hewlett-Packard t5745",
 .matches = {
 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
&lt;/pre&gt;</description>
    <dc:creator>Jan-Benedict Glaw</dc:creator>
    <dc:date>2012-05-22T13:21:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69418">
    <title>[Bug 50232] New: screen redraw is wrong in sauerbraten with the llvmcompiler</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69418</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50232

             Bug #: 50232
           Summary: screen redraw is wrong in sauerbraten with the llvm
                    compiler
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r600
        AssignedTo: dri-devel&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: aaalmosss&amp;lt; at &amp;gt;gmail.com


Ghost images of the previous frames stay on the screen. This seems to be
independent of the quality settings in the game.

This is printed to the console:
Warning: R600 LLVM backend does not support indirect adressing.  Falling back
to TGSI backend.

Tested with sauerbraten 0.0.20100728.dfsg+repack-3 (debian unstable) and mesa
7a75e7d6e85d27e102ff7e15583c33b1ce282fe4

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-22T20:00:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.dri.devel/69417">
    <title>[Bug 50230] New: offset mapping in nexuiz results in bad texturingwith the llvm compiler</title>
    <link>http://comments.gmane.org/gmane.comp.video.dri.devel/69417</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50230

             Bug #: 50230
           Summary: offset mapping in nexuiz results in bad texturing with
                    the llvm compiler
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r600
        AssignedTo: dri-devel&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: aaalmosss&amp;lt; at &amp;gt;gmail.com


tested with nexuiz 2.5.2 and mesa 7a75e7d6e85d27e102ff7e15583c33b1ce282fe4

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-22T12:48:06</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.video.dri.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.video.dri.devel</link>
  </textinput>
</rdf:RDF>

