Re: Improved DRM support for cant_use_aperture platforms

From: David Mosberger (davidm@napali.hpl.hp.com)
Date: Thu May 15 2003 - 10:59:16 EST


Hi Michel,

In regards to the Alpha platform: Jeff Wiedemeier was able to get things
to work after applying the attached small patch. He says:

  What was happening is that the offset was a system-relative
  representation of the address and the (agpmem->bound) was
  bus-relative, so it couldn't find the right agpmem.

  This patch makes the offset bus-relative before the scan (and with
  this patch, DRI/DRM is working on a Marvel...)

If it looks OK to you, can you add it?

Thanks,

        --david

diff -Nuar pre/drivers/char/drm/drm_memory.h post/drivers/char/drm/drm_memory.h
--- pre/drivers/char/drm/drm_memory.h Wed May 14 20:04:17 2003
+++ post/drivers/char/drm/drm_memory.h Wed May 14 20:05:31 2003
@@ -75,6 +75,10 @@
 
         size = PAGE_ALIGN(size);
 
+#ifdef __alpha__
+ offset -= dev->hose->mem_space->start;
+#endif
+
         for (agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next)
                 if (agpmem->bound <= offset
                     && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >= (offset + size))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:57 EST