On 2002.04.19 09:02 moto kawasaki wrote:
> 
> Thank you very much for your quick reply.
> 
> I've just sent the other mail to xpert ml that contains my quick
> hack.
> I am using the X with that patch for 10 minutes, and it seems working.
> 

You must make sure you exercise that code. The only way to do that is to 
use an demanding OpenGL application (e.g. a 3D game) since plain 2D 
doesn't do it.

> Unfortunately I am not an expert on this area, but I can test on the
> real i830MG if someone send me a patch.
> 

I'm not an expert in kernel programming, but your patch seemed a little 
dubious due to the type cast (I'm copying it here again to be on dri-devel 
as well):

# diff -u i830_dma.c.orig i830_dma.c
--- i830_dma.c.orig     Fri Apr 19 16:44:04 2002
+++ i830_dma.c  Fri Apr 19 16:43:48 2002
@@ -317,7 +317,7 @@
          atomic_dec(&virt_to_page(page)->count);
         clear_bit(PG_locked, &virt_to_page(page)->flags);
-       wake_up(&virt_to_page(page)->wait);
+       wake_up((wait_queue_head_t *)virt_to_page(page));
         free_page(page);
         return;
  }

so after Googling for the keywords "wake_up virt_to_page kernel" I found 
several patches for the problem:

--- linux-2.4.17-virgin/drivers/char/drm/i810_dma.c     Wed Aug  8 
09:42:15 2001
+++ linux-2.4.17-waitqueue/drivers/char/drm/i810_dma.c  Mon Jan  7 
03:12:05 2002
@@ -299,7 +299,7 @@
        atomic_dec(&virt_to_page(page)->count);
        clear_bit(PG_locked, &virt_to_page(page)->flags);
-       wake_up(&virt_to_page(page)->wait);
+       wake_up(page_waitqueue(virt_to_page(page)));
        free_page(page);
        return;
  }

or

diff -uNr -Xdontdiff 
../master/linux-2.5.3-pre5/drivers/char/drm/i810_dma.c 
linux/drivers/char/drm/i810_dma.c
--- ../master/linux-2.5.3-pre5/drivers/char/drm/i810_dma.c      Mon Jan 28 
13:52:28 2002
+++ linux/drivers/char/drm/i810_dma.c   Tue Jan 29 11:09:47 2002
@@ -294,14 +294,14 @@
   static void i810_free_page(drm_device_t *dev, unsigned long page)
  {
-       if(page == 0UL)
-               return;
+       if (page) {
+               struct page *p = virt_to_page(page);
  -     atomic_dec(&virt_to_page(page)->count);
-       clear_bit(PG_locked, &virt_to_page(page)->flags);
-       wake_up(&virt_to_page(page)->wait);
-       free_page(page);
-       return;
+               atomic_dec(&p->count);
+               clear_bit(PG_locked, &p->flags);
+               wake_up_page(p);
+               free_page(p);
+       }
  }

So it seems that the kernel maintainers are making the necessary changes 
in the various kernel versions. So you should download your distribution 
kernel source, look at drivers/char/drm-4.0/i810_dma.c and apply the same 
changes that you see there, since the solution may differ.

> I am also seeking the solution for XFree86 on FreeBSD4.5.
> The situation is much worse than Linux, because FreeBSD does
> not support agpgart on i830MG.
> On this issue, I have a web page as below, which is very poor in terms
> of quality of contents. If you don't mind, please take a look at:
> 
>     http://snowwind.kawasaki3.org/

I really don't know much about BSD, but Alan Hourihane might help, as he 
has been supporting the BSD DRM. These are subjects more specific to DRI, 
so please subscribe to dri-devel 
(https://lists.sourceforge.net/lists/listinfo/dri-devel) to workout a 
solution.

> 
> Thank you very much.
> 

José Fonseca

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to