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/drm Add agp bridge data ...
details: https://anonhg.NetBSD.org/src/rev/24d1e9513e2f
branches: riastradh-drm2
changeset: 788215:24d1e9513e2f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:45:21 2013 +0000
description:
Add agp bridge data argument to drm_*_agp in drm_agpsupport.c.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_agpsupport.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diffs (49 lines):
diff -r d1e22c022474 -r 24d1e9513e2f sys/external/bsd/drm2/dist/drm/drm_agpsupport.c
--- a/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c Wed Jul 24 02:45:06 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c Wed Jul 24 02:45:21 2013 +0000
@@ -309,7 +309,11 @@
return -EINVAL;
if (!entry->bound)
return -EINVAL;
+#ifdef __NetBSD__
+ ret = drm_unbind_agp(dev->agp->bridge, entry->memory);
+#else
ret = drm_unbind_agp(entry->memory);
+#endif
if (ret == 0)
entry->bound = 0;
return ret;
@@ -351,8 +355,13 @@
if (entry->bound)
return -EINVAL;
page = (request->offset + PAGE_SIZE - 1) / PAGE_SIZE;
+#ifdef __NetBSD__
+ if ((retcode = drm_bind_agp(dev->agp->bridge, entry->memory, page)))
+ return retcode;
+#else
if ((retcode = drm_bind_agp(entry->memory, page)))
return retcode;
+#endif
entry->bound = dev->agp->base + (page << PAGE_SHIFT);
DRM_DEBUG("base = 0x%lx entry->bound = 0x%lx\n",
dev->agp->base, entry->bound);
@@ -392,11 +401,19 @@
if (!(entry = drm_agp_lookup_entry(dev, request->handle)))
return -EINVAL;
if (entry->bound)
+#ifdef __NetBSD__
+ drm_unbind_agp(dev->agp->bridge, entry->memory);
+#else
drm_unbind_agp(entry->memory);
+#endif
list_del(&entry->head);
+#ifdef __NetBSD__
+ drm_free_agp(dev->agp->bridge, entry->memory, entry->pages);
+#else
drm_free_agp(entry->memory, entry->pages);
+#endif
kfree(entry);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index