In the savage driver I'm going to use permanent maps from the start. So
there is no need for the Xserver to pass the permanent maps back to the
kernel driver in the init ioctl. Instead I want to find the maps by
index in the init ioctl. Therefore I added a drm_core_getmap inline
function similar to drm_core_findmap. Jon, if you like this please apply
to drm/linux-core.

Thanks,
  Felix

-- 
| Felix K�hling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |
--- ./drmP.h.~1.133.~	2004-10-13 23:01:50.000000000 +0200
+++ ./drmP.h	2004-10-14 16:29:05.000000000 +0200
@@ -997,6 +997,20 @@
 	return NULL;
 }
 
+static __inline__ struct drm_map *drm_core_getmap(struct drm_device *dev,
+						  unsigned int idx)
+{
+	struct list_head *_list;
+	int i = 0;
+	list_for_each(_list, &dev->maplist->head) {
+		if (i == idx) {
+			return list_entry(_list, drm_map_list_t, head)->map;
+		}
+		i++;
+	}
+	return NULL;
+}
+
 static __inline__ void drm_core_dropmap(struct drm_map *map)
 {
 }

Reply via email to