Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/riastradh-drm2]: src/sys/external/bsd/drm2/dist/include/drm Replace extr...



details:   https://anonhg.NetBSD.org/src/rev/6d0b790e6b81
branches:  riastradh-drm2
changeset: 788220:6d0b790e6b81
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 02:46:49 2013 +0000

description:
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.

diffstat:

 sys/external/bsd/drm2/dist/include/drm/drmP.h |  26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 9acc63a79b7f -r 6d0b790e6b81 sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 02:46:33 2013 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 02:46:49 2013 +0000
@@ -664,8 +664,30 @@
        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
 };
 



Home | Main Index | Thread Index | Old Index