linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michdaen@iiic.ethz.ch>
To: "Timothy A. Seufert" <tas@mindspring.com>
Cc: Gareth Hughes <gareth@valinux.com>, linuxppc-dev@lists.linuxppc.org
Subject: Re: r128 DRI driver now fully functional on PPC
Date: Tue, 27 Feb 2001 22:43:52 +0100	[thread overview]
Message-ID: <3A9C1F98.C61A48E4@iiic.ethz.ch> (raw)
In-Reply-To: 3A9B91EA.7DCFFEF3@valinux.com

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

Gareth Hughes wrote:
>
> "Timothy A. Seufert" wrote:
> >
> > I still have the problem with keyboard/mouse input being ignored once
> > a GL app starts.  A friend suggested disabling DGA, but that didn't
> > help.  I do notice this message popping in the system logs, repeated
> > numerous times:
> >
> > [drm:drm_lock_take] *ERROR* 1 holds heavyweight lock
>
> This happens when the lock ioctl occurs when the lock is already held.
> '1' is the X server, so the X server is grabbing the lock when it
> already has it.

Which might be fixed by the attached patch which Gareth posted to dri-devel
lately.

But don't expect this to solve your input problems as I never had them.


--
Earthling Michel Dänzer (MrCooper)    \   Debian GNU/Linux (powerpc) developer
CS student, Free Software enthusiast   \        XFree86 and DRI project member

[-- Attachment #2: r128-4.0.2-patch --]
[-- Type: text/plain, Size: 3645 bytes --]

diff -ur xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_cce.c xc.gh/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_cce.c
--- xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_cce.c	Wed Dec 13 11:02:12 2000
+++ xc.gh/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_cce.c	Tue Feb 20 18:10:16 2001
@@ -36,9 +36,8 @@
 #include <linux/interrupt.h>	/* For task queue support */
 #include <linux/delay.h>

+#define R128_FIFO_DEBUG		0

-/* FIXME: Temporary CCE packet buffer */
-u32 r128_cce_buffer[(1 << 14)] __attribute__ ((aligned (32)));

 /* CCE microcode (from ATI) */
 static u32 r128_cce_microcode[] = {
@@ -114,7 +113,7 @@
 	return R128_READ(R128_CLOCK_CNTL_DATA);
 }

-#if 0
+#if R128_FIFO_DEBUG
 static void r128_status( drm_r128_private_t *dev_priv )
 {
 	printk( "GUI_STAT           = 0x%08x\n",
@@ -152,7 +151,9 @@
 		udelay( 1 );
 	}

+#if R128_FIFO_DEBUG
 	DRM_ERROR( "%s failed!\n", __FUNCTION__ );
+#endif
 	return -EBUSY;
 }

@@ -166,7 +167,9 @@
 		udelay( 1 );
 	}

+#if R128_FIFO_DEBUG
 	DRM_ERROR( "%s failed!\n", __FUNCTION__ );
+#endif
 	return -EBUSY;
 }

@@ -175,7 +178,7 @@
 	int i, ret;

 	ret = r128_do_wait_for_fifo( dev_priv, 64 );
-	if ( !ret ) return ret;
+	if ( ret < 0 ) return ret;

 	for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) {
 		if ( !(R128_READ( R128_GUI_STAT ) & R128_GUI_ACTIVE) ) {
@@ -185,7 +188,9 @@
 		udelay( 1 );
 	}

+#if R128_FIFO_DEBUG
 	DRM_ERROR( "%s failed!\n", __FUNCTION__ );
+#endif
 	return -EBUSY;
 }

@@ -241,7 +246,7 @@
 		udelay( 1 );
 	}

-#if 0
+#if R128_FIFO_DEBUG
 	DRM_ERROR( "failed!\n" );
 	r128_status( dev_priv );
 #endif
diff -ur xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h xc.gh/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h
--- xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h	Tue Dec  5 11:57:26 2000
+++ xc.gh/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h	Tue Feb 20 18:04:17 2001
@@ -388,11 +388,11 @@
 #define R128_BASE(reg)		((u32)(dev_priv->mmio->handle))
 #define R128_ADDR(reg)		(R128_BASE(reg) + reg)

-#define R128_DEREF(reg)		*(__volatile__ int *)R128_ADDR(reg)
+#define R128_DEREF(reg)		*(volatile u32 *)R128_ADDR(reg)
 #define R128_READ(reg)		R128_DEREF(reg)
 #define R128_WRITE(reg,val)	do { R128_DEREF(reg) = val; } while (0)

-#define R128_DEREF8(reg)	*(__volatile__ char *)R128_ADDR(reg)
+#define R128_DEREF8(reg)	*(volatile u8 *)R128_ADDR(reg)
 #define R128_READ8(reg)		R128_DEREF8(reg)
 #define R128_WRITE8(reg,val)	do { R128_DEREF8(reg) = val; } while (0)

diff -ur xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmR128.c xc.gh/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmR128.c
--- xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmR128.c	Wed Dec 13 11:02:11 2000
+++ xc.gh/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmR128.c	Tue Feb 20 23:44:14 2001
@@ -78,7 +78,7 @@
 #include "drm.h"

 #define R128_BUFFER_RETRY	32
-#define R128_IDLE_RETRY		16
+#define R128_IDLE_RETRY		32


 int drmR128InitCCE( int fd, drmR128Init *info )
@@ -154,8 +154,11 @@

    ret = ioctl( fd, DRM_IOCTL_R128_CCE_STOP, &stop );

-   if ( ret && errno != EBUSY )
+   if ( ret == 0 ) {
+      return 0;
+   } else if ( errno != EBUSY ) {
       return -errno;
+   }

    stop.flush = 0;

@@ -163,8 +166,11 @@
       ret = ioctl( fd, DRM_IOCTL_R128_CCE_STOP, &stop );
    } while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY );

-   if ( ret && errno != EBUSY )
+   if ( ret == 0 ) {
+      return 0;
+   } else if ( errno != EBUSY ) {
       return -errno;
+   }

    stop.idle = 0;


  reply	other threads:[~2001-02-27 21:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-30  8:08 r128 DRI driver now fully functional on PPC Gareth Hughes
2001-01-31 11:49 ` Benjamin Herrenschmidt
2001-01-31 14:54   ` [linux-fbdev] " Andreas Hundt
2001-01-31 18:32     ` Michel Dänzer
2001-01-31 18:43       ` Geert Uytterhoeven
2001-01-31 18:53         ` Michel Dänzer
2001-01-31 19:14         ` Andreas Hundt
2001-01-31 16:49   ` Kostas Gewrgiou
2001-01-31 18:26   ` Michel Dänzer
2001-02-23  7:07 ` Timothy A. Seufert
2001-02-23 10:02   ` Gareth Hughes
2001-02-25  8:32     ` Timothy A. Seufert
2001-02-26  9:39       ` Michel Dänzer
2001-02-26 10:06         ` Gareth Hughes
2001-02-26 10:21           ` Michel Dänzer
2001-02-26 10:28             ` Gareth Hughes
2001-02-27 10:03               ` Timothy A. Seufert
2001-02-27 11:39                 ` Gareth Hughes
2001-02-27 21:43                   ` Michel Dänzer [this message]
2001-02-23 12:19   ` Michel Dänzer
2001-02-23 12:23     ` Gareth Hughes
2001-02-23 12:33       ` Michel Dänzer

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=3A9C1F98.C61A48E4@iiic.ethz.ch \
    --to=michdaen@iiic.ethz.ch \
    --cc=gareth@valinux.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=tas@mindspring.com \
    /path/to/YOUR_REPLY

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

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