linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: davidm@hpl.hp.com, Dave Jones <davej@codemonkey.org.uk>,
	linux-kernel@vger.kernel.org, dri-devel@lists.sourceforge.net
Subject: Re: [Dri-devel] Re: Improved DRM support for cant_use_aperture platforms
Date: Mon, 12 May 2003 13:40:30 -0700	[thread overview]
Message-ID: <16064.1726.440360.935187@napali.hpl.hp.com> (raw)
In-Reply-To: <1052768911.10752.268.camel@thor>

OK, could you try with this patch applied on top of my previous patch?
Checking against KERNEL_VERSION(2,5,68) ensures that we have the new
(4-wargument) vmap() call and the "#ifndef PAGE_AGP" part ensures that
things will compile fine until the kernel's asm/agp.h gets updated.

	--david

===== drivers/char/drm/drm_memory.h 1.16 vs edited =====
--- 1.16/drivers/char/drm/drm_memory.h	Sat May 10 01:32:08 2003
+++ edited/drivers/char/drm/drm_memory.h	Mon May 12 13:37:57 2003
@@ -42,7 +42,12 @@
  */
 #define DEBUG_MEMORY 0
 
-#if __REALLY_HAVE_AGP
+/* Need at least kernel v2.5.68 to get the 4-argument version of vmap().  */
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
+
+#ifndef PAGE_AGP
+# define PAGE_AGP	PAGE_KERNEL_NOCACHE
+#endif
 
 /*
  * Find the drm_map that covers the range [offset, offset+size).
@@ -127,7 +132,7 @@
 {
 	int remap_aperture = 0;
 
-#if __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
 	if (dev->agp->cant_use_aperture) {
 		drm_map_t *map = drm_lookup_map(offset, size, dev);
 
@@ -146,7 +151,7 @@
 {
 	int remap_aperture = 0;
 
-#if __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
 	if (dev->agp->cant_use_aperture) {
 		drm_map_t *map = drm_lookup_map(offset, size, dev);
 
@@ -163,7 +168,7 @@
 static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *dev)
 {
 	int unmap_aperture = 0;
-#if __REALLY_HAVE_AGP
+#if __REALLY_HAVE_AGP && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,68))
 	/*
 	 * This is a bit ugly.  It would be much cleaner if the DRM API would use separate
 	 * routines for handling mappings in the AGP space.  Hopefully this can be done in


      parent reply	other threads:[~2003-05-12 20:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-10 10:09 Improved DRM support for cant_use_aperture platforms David Mosberger
2003-05-10 13:12 ` Dave Jones
2003-05-11 11:43 ` Michel Dänzer
2003-05-11 18:09   ` David Mosberger
2003-05-11 19:55     ` Dave Jones
2003-05-11 21:55       ` Michel Dänzer
2003-05-12 18:53         ` David Mosberger
2003-05-12 19:48           ` [Dri-devel] " Michel Dänzer
2003-05-12 20:19             ` David Mosberger
2003-05-12 21:21               ` Michel Dänzer
2003-05-12 21:51                 ` David Mosberger
2003-05-12 21:57                   ` Christoph Hellwig
2003-05-12 22:08                     ` Andrew Morton
2003-05-12 22:20                       ` Christoph Hellwig
2003-05-13  0:34                   ` Michel Dänzer
2003-05-13  1:09                     ` David Mosberger
2003-05-13 13:33                       ` Ivan Kokshaysky
2003-05-13 16:20                         ` David Mosberger
2003-05-14  9:41                           ` Ivan Kokshaysky
2003-05-14 10:27                             ` Michel Dänzer
2003-05-14 17:09                             ` David Mosberger
2003-05-13  7:43                     ` David Mosberger
2003-05-14 14:08                       ` Michel Dänzer
2003-05-15 15:59                         ` David Mosberger
2003-05-15 22:37                           ` Michel Dänzer
2003-05-16 23:50                             ` [Dri-devel] " Michel Dänzer
2003-05-12 20:40             ` David Mosberger [this message]

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=16064.1726.440360.935187@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=davej@codemonkey.org.uk \
    --cc=davidm@hpl.hp.com \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel@daenzer.net \
    /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).