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 Add drm_io_m...



details:   https://anonhg.NetBSD.org/src/rev/58bd75e5fb28
branches:  riastradh-drm2
changeset: 788333:58bd75e5fb28
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 03:18:05 2013 +0000

description:
Add drm_io_mapping_create_wc to drmP.h.

Linux's io_mapping_create_wc just takes a bus address and a size, but
we need to pass along extra information, namely the bus space tag,
which we shall pass via a struct drm_device.

diffstat:

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

diffs (24 lines):

diff -r d606a6062087 -r 58bd75e5fb28 sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 03:17:48 2013 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 03:18:05 2013 +0000
@@ -2139,5 +2139,20 @@
 }
 #endif /* defined(__NetBSD__) */
 
+#ifdef __NetBSD__
+
+/* XXX This is pretty kludgerific.  */
+
+#include <linux/io-mapping.h>
+
+static inline struct io_mapping *
+drm_io_mapping_create_wc(struct drm_device *dev, resource_size_t addr,
+    unsigned long size)
+{
+       return bus_space_io_mapping_create_wc(dev->bst, addr, size);
+}
+
+#endif /* defined(__NetBSD__) */
+
 #endif                         /* __KERNEL__ */
 #endif



Home | Main Index | Thread Index | Old Index