mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@linux.intel.com>
To: Dave Airlie <airlied@linux.ie>
Cc: dri-devel@lists.sf.net, linux-kernel@vger.kernel.org
Subject: Re: [git pull] drm
Date: Sat, 10 Jan 2009 01:13:31 +0000	[thread overview]
Message-ID: <1231550011.5317.72.camel@dax.rpnet.com> (raw)
In-Reply-To: <1231524232.5317.43.camel@dax.rpnet.com>

On Fri, 2009-01-09 at 18:03 +0000, Richard Purdie wrote:
> On Fri, 2009-01-09 at 15:07 +0000, Richard Purdie wrote:
> > I just updated to the latest kernel from git to test some other patches
> > and after logging into GDM the X server hangs before launching the
> > desktop (it appears to be trying to run glxinfo) on my Thinkpad T61
> > (i915 graphics). Bisection shows this happens after applying this
> > commit:
> > 
> > On Mon, 2008-12-29 at 08:32 +0000, Dave Airlie wrote:
> > > commit 7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a
> > > Author: Dave Airlie <airlied@redhat.com>
> > > Date:   Fri Nov 28 14:22:24 2008 +1000

The patch below gets my system working again with the latest kernels.
Was dropping the drm_addmap() call for i915 intentional or not?


drm: Fix userspace X lockups introduced in 7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a

Add back the drm_addmap() call that was dropped as part of commit
7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a for the i915 driver, fixing X
userspace lockups.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 62a4bf7..db61d89 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -29,6 +29,7 @@
 #include "drmP.h"
 #include "drm.h"
 #include "drm_crtc_helper.h"
+#include "drm_sarea.h"
 #include "intel_drv.h"
 #include "i915_drm.h"
 #include "i915_drv.h"
@@ -1007,11 +1008,24 @@ out:
 int i915_master_create(struct drm_device *dev, struct drm_master *master)
 {
 	struct drm_i915_master_private *master_priv;
+	unsigned long sareapage;
+	int ret;
 
 	master_priv = drm_calloc(1, sizeof(*master_priv), DRM_MEM_DRIVER);
 	if (!master_priv)
 		return -ENOMEM;
 
+	/* prebuild the SAREA */
+	sareapage = max(SAREA_MAX, PAGE_SIZE);
+	ret = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK|_DRM_DRIVER,
+			 &master_priv->sarea);
+	if (ret) {
+		DRM_ERROR("SAREA setup failed\n");
+		return ret;
+	}
+
+	master_priv->sarea_priv = master_priv->sarea->handle + sizeof(struct drm_sarea);
+
 	master->driver_priv = master_priv;
 	return 0;
 }
@@ -1023,6 +1037,9 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master)
 	if (!master_priv)
 		return;
 
+	if (master_priv->sarea)
+		drm_rmmap(dev, master_priv->sarea);
+
 	drm_free(master_priv, sizeof(*master_priv), DRM_MEM_DRIVER);
 
 	master->driver_priv = NULL;



  reply	other threads:[~2009-01-10  1:13 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29  8:32 Dave Airlie
2009-01-04 19:19 ` Gabriel C
2009-01-10  2:03   ` Dave Airlie
2009-01-10 21:41     ` [PATCH] i915: document DRM_I915_KMS option Jesse Barnes
2009-01-09 15:07 ` [git pull] drm Richard Purdie
2009-01-09 18:03   ` Richard Purdie
2009-01-10  1:13     ` Richard Purdie [this message]
2009-01-10  2:04       ` Dave Airlie
2009-01-10  9:58         ` Richard Purdie
2009-01-10 23:04           ` Dave Airlie
2009-01-10 23:51             ` Richard Purdie
2009-01-16  6:53               ` Brice Goglin
2009-01-11  9:29   ` Graham Murray
2009-01-11  9:56     ` Dave Airlie
2009-01-07  1:59 Dave Airlie
2009-02-09  8:30 Dave Airlie
2009-09-29  3:52 Dave Airlie
2009-09-29  4:26 ` [git pull] drm Dave Airlie
2009-12-10  6:17 Dave Airlie
2009-12-10 15:17 ` Linus Torvalds
2009-12-10 15:40   ` Xavier Bestel
2009-12-10 16:24     ` Linus Torvalds
2009-12-10 17:40       ` Maarten Maathuis
2009-12-10 18:42         ` Linus Torvalds
2009-12-10 19:13           ` Pekka Enberg
2009-12-10 19:13           ` Robert Noland
2009-12-10 19:28           ` Alan Cox
2009-12-10 19:36           ` Jesse Barnes
2009-12-10 19:37           ` Dave Airlie
2009-12-10 19:45             ` Roland Dreier
2009-12-10 19:49           ` Pekka Paalanen
2009-12-10 20:35             ` Will Dyson
2009-12-10 21:12               ` Pekka Paalanen
2009-12-10 19:53           ` Stephane Marchesin
2009-12-10 23:37             ` Linus Torvalds
2009-12-10 23:50               ` Dave Airlie
2009-12-10 23:58               ` Alan Cox
2009-12-11  0:09                 ` Linus Torvalds
2009-12-11  0:20                   ` "C. Bergström"
2009-12-11  0:32                     ` Linus Torvalds
2009-12-11  0:47                       ` Dave Airlie
2009-12-11  1:34                       ` Kyle McMartin
2009-12-11  0:21                   ` Dave Airlie
2009-12-11  0:45                     ` Linus Torvalds
2009-12-11  9:18                   ` Alan Cox
2009-12-11  9:34                     ` David Miller
2009-12-11 10:15                       ` Andy Walls
2009-12-11 10:20                       ` Dave Airlie
2009-12-11 12:45                         ` tytso
2009-12-11 12:50                           ` Alan Cox
2009-12-11 10:28                     ` Jeff Garzik
2009-12-11 10:46                       ` Dave Airlie
2009-12-11 15:28                       ` Linus Torvalds
2009-12-11 17:49                         ` Jeff Garzik
2009-12-11 10:02                 ` Stephane Marchesin
2009-12-11 10:24                   ` Andy Walls
2009-12-10 16:47     ` Alan Cox
2009-12-10 21:49       ` Ingo Molnar
2010-01-11  4:52 Dave Airlie
2010-02-11  4:20 Dave Airlie
2010-02-15  9:53 ` Christian Borntraeger
2010-02-15 20:12   ` Marcin Slusarz
2010-02-15 20:39     ` Maarten Maathuis
2010-02-15 22:13       ` Marcin Slusarz
2010-02-15 22:55   ` Christian Borntraeger
2010-02-16  1:19     ` Ben Skeggs
2010-02-16 11:39       ` Christian Borntraeger
2011-02-04  5:11 Dave Airlie

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=1231550011.5317.72.camel@dax.rpnet.com \
    --to=rpurdie@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.sf.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

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

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

Powered by JetHome