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_READ...
details: https://anonhg.NetBSD.org/src/rev/0d71d38c9ed5
branches: riastradh-drm2
changeset: 788323:0d71d38c9ed5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:15:28 2013 +0000
description:
Add DRM_READ64 and DRM_WRITE64 to drmP.h.
diffstat:
sys/external/bsd/drm2/dist/include/drm/drmP.h | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diffs (37 lines):
diff -r 89c4f60fc88c -r 0d71d38c9ed5 sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h Wed Jul 24 03:15:12 2013 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h Wed Jul 24 03:15:28 2013 +0000
@@ -2088,6 +2088,16 @@
return *(volatile uint32_t *)((vaddr_t)map->handle + offset);
}
+static inline uint64_t
+DRM_READ64(struct drm_local_map *map, bus_size_t offset)
+{
+ if (DRM_IS_BUS_SPACE(map))
+ return bus_space_read_8(map->lm_data.bus_space.bst,
+ map->lm_data.bus_space.bsh, offset);
+ else
+ return *(volatile uint64_t *)((vaddr_t)map->handle + offset);
+}
+
static inline void
DRM_WRITE8(struct drm_local_map *map, bus_size_t offset, uint8_t value)
{
@@ -2117,6 +2127,16 @@
else
*(volatile uint32_t *)((vaddr_t)map->handle + offset) = value;
}
+
+static inline void
+DRM_WRITE64(struct drm_local_map *map, bus_size_t offset, uint64_t value)
+{
+ if (DRM_IS_BUS_SPACE(map))
+ bus_space_write_8(map->lm_data.bus_space.bst,
+ map->lm_data.bus_space.bsh, offset, value);
+ else
+ *(volatile uint64_t *)((vaddr_t)map->handle + offset) = value;
+}
#endif /* defined(__NetBSD__) */
#endif /* __KERNEL__ */
Home |
Main Index |
Thread Index |
Old Index