On Son, 2002-09-22 at 19:18, Keith Whitwell wrote:
> Michel Dänzer wrote:
> > 
> > I currently get an oops on client shutdown when radeon_mem_release() is
> > called on the agp_heap, which isn't initialized. Probably is in your local
> > tree? :)

Ah, the RADEON_INIT_HEAP ioctl needs to be called for it to be
initialized. Does the attached patch look reasonable to avoid the oops,
or should the DRM rather initialize the heap on its own?


> > I'd still appreciate feedback on the vbl IRQ patch... I'll work on
> > adding a new flip ioctl which flips on the next vertical blank to
> > hopefully get rid of tearing for good.
> 
> Sorry Michel, been caught up in my own stuff.
> 
> The first qn I remember is that there seemed to be a fair bit more code in the 
> irq tophalf -- is it possible to postpone this processing til the bh runs?

Is that really a problem? There are only a couple vertical blank
interrupts per second, so it shouldn't be much more than before.

On the other hand, I've been wondering if writing to
RADEON_GEN_INT_STATUS from the IRQ service routine is safe. If that
register goes through the FIFO (how to find out?), it should be written
through the CP or we'd have to wait for it to go idle or at least check
the number of free FIFO slots. Both of which would belong into the
bottom half I guess.


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast
Index: radeon_mem.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/Attic/radeon_mem.c,v
retrieving revision 1.1.2.6
diff -p -u -r1.1.2.6 radeon_mem.c
--- radeon_mem.c	17 Sep 2002 13:16:46 -0000	1.1.2.6
+++ radeon_mem.c	22 Sep 2002 22:03:22 -0000
@@ -174,6 +174,9 @@ void radeon_mem_release( struct mem_bloc
 	int pid = DRM_CURRENTPID;
 	struct mem_block *p;
 
+	if (!heap)
+	    return;
+
 	for (p = heap->next ; p != heap ; p = p->next) {
 		if (p->pid == pid) 
 			p->pid = 0;

Reply via email to