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 Add drm_bind_agp, drm_unbind_...



details:   https://anonhg.NetBSD.org/src/rev/d1e22c022474
branches:  riastradh-drm2
changeset: 788214:d1e22c022474
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 02:45:06 2013 +0000

description:
Add drm_bind_agp, drm_unbind_agp, & drm_free_agp to drm_agp_netbsd.h.

These have an extra argument for the agp bridge descriptor, as
NetBSD's AGP KPI requires.

Omit declarations of drm_bind_agp, drm_unbind_agp, and drm_free_agp
from drmP.h, now that these are all declared (and defined) in
drm_agp_netbsd.h instead.

diffstat:

 sys/external/bsd/drm2/dist/include/drm/drmP.h      |   4 ++--
 sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h |  21 ++++++++++++++++++++-
 2 files changed, 22 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r 558ec1ff9d66 -r d1e22c022474 sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 02:44:48 2013 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 02:45:06 2013 +0000
@@ -1475,16 +1475,16 @@
 
                                /* Memory management support (drm_memory.h) */
 #include <drm/drm_memory.h>
+#ifndef __NetBSD__
 extern void drm_free_agp(DRM_AGP_MEM * handle, int pages);
 extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
-#ifndef __NetBSD__
 extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev,
                                       struct page **pages,
                                       unsigned long num_pages,
                                       uint32_t gtt_offset,
                                       uint32_t type);
+extern int drm_unbind_agp(DRM_AGP_MEM * handle);
 #endif
-extern int drm_unbind_agp(DRM_AGP_MEM * handle);
 #ifdef __NetBSD__
 extern void *drm_ioremap(struct drm_device *dev, struct drm_local_map *map);
 extern void drm_iounmap(struct drm_device *dev, struct drm_local_map *map);
diff -r 558ec1ff9d66 -r d1e22c022474 sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h
--- a/sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h        Wed Jul 24 02:44:48 2013 +0000
+++ b/sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h        Wed Jul 24 02:45:06 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_agp_netbsd.h,v 1.1.2.3 2013/07/24 02:44:48 riastradh Exp $ */
+/*     $NetBSD: drm_agp_netbsd.h,v 1.1.2.4 2013/07/24 02:45:06 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -155,4 +155,23 @@
        agp_get_info(bridge, info);
 }
 
+static inline int
+drm_bind_agp(struct agp_bridge_data *bridge, DRM_AGP_MEM *mem, size_t page)
+{
+       return agp_bind_memory(&bridge->abd_sc, mem, (page << AGP_PAGE_SHIFT));
+}
+
+static inline int
+drm_unbind_agp(struct agp_bridge_data *bridge, DRM_AGP_MEM *mem)
+{
+       return agp_unbind_memory(&bridge->abd_sc, mem);
+}
+
+static inline void
+drm_free_agp(struct agp_bridge_data *bridge, DRM_AGP_MEM *mem,
+    size_t npages __unused)
+{
+       agp_free_memory(&bridge->abd_sc, mem);
+}
+
 #endif  /* _DRM_DRM_AGP_NETBSD_H_ */



Home | Main Index | Thread Index | Old Index