Module Name:    src
Committed By:   riastradh
Date:           Wed Jul 24 02:46:49 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]: drmP.h

Log Message:
Replace extra data in struct drm_local_map by a union.

This is a tagged union; only certain variants, specified by the map's
type, need a bus space handle and a drm bus map.  They will also need
a bus space tag later.  Other variants use other data, with more to
be added in the future, probably.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.36 -r1.1.1.1.2.37 \
    src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.36 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.37
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.36	Wed Jul 24 02:45:06 2013
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Wed Jul 24 02:46:49 2013
@@ -664,8 +664,30 @@ struct drm_local_map {
 	int mtrr;		 /**< MTRR slot used */
 
 #ifdef __NetBSD__
-	bus_space_handle_t bsh;
-	struct drm_bus_map *bus_map;
+	union {
+		/* _DRM_FRAME_BUFFER, _DRM_AGP, _DRM_REGISTERS */
+		/* XXX mtrr should be moved into this case too.  */
+		struct {
+			/*
+			 * XXX bst seems like a waste of space, but not
+			 * all accessors have the drm_device handy.
+			 */
+			bus_space_tag_t bst;
+			bus_space_handle_t bsh;
+			struct drm_bus_map *bus_map;
+		} bus_space;
+
+		/* _DRM_CONSISTENT */
+		struct drm_dma_handle *dmah;
+
+		/* _DRM_SCATTER_GATHER */
+#if 0				/* XXX stored in dev->sg instead */
+		struct drm_sg_mem *sg;
+#endif
+
+		/* _DRM_SHM */
+		/* XXX Anything?  uvm object?  */
+	} lm_data;
 #endif
 };
 

Reply via email to