Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm make a drm_agp_destroy() func...
details: https://anonhg.NetBSD.org/src/rev/251ee00aaf7a
branches: trunk
changeset: 333614:251ee00aaf7a
user: christos <christos%NetBSD.org@localhost>
date: Tue Nov 11 02:33:28 2014 +0000
description:
make a drm_agp_destroy() function to resolve the circular dependency between
drmkms and drmkms_pci
diffstat:
sys/external/bsd/drm2/dist/drm/drm_agpsupport.c | 10 ++++++++++
sys/external/bsd/drm2/dist/drm/drm_pci.c | 7 +------
sys/external/bsd/drm2/dist/drm/drm_stub.c | 2 +-
3 files changed, 12 insertions(+), 7 deletions(-)
diffs (49 lines):
diff -r 42e153979435 -r 251ee00aaf7a sys/external/bsd/drm2/dist/drm/drm_agpsupport.c
--- a/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c Tue Nov 11 02:31:55 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c Tue Nov 11 02:33:28 2014 +0000
@@ -518,6 +518,16 @@
dev->agp->enabled = 0;
}
+void drm_agp_destroy(struct drm_device *dev)
+{
+ if (dev->agp) {
+ arch_phys_wc_del(dev->agp->agp_mtrr);
+ drm_agp_clear(dev);
+ kfree(dev->agp);
+ dev->agp = NULL;
+ }
+}
+
#ifndef __NetBSD__ /* XXX Dead code that doesn't make sense... */
/**
* Binds a collection of pages into AGP memory at the given offset, returning
diff -r 42e153979435 -r 251ee00aaf7a sys/external/bsd/drm2/dist/drm/drm_pci.c
--- a/sys/external/bsd/drm2/dist/drm/drm_pci.c Tue Nov 11 02:31:55 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_pci.c Tue Nov 11 02:33:28 2014 +0000
@@ -277,12 +277,7 @@
void drm_pci_agp_destroy(struct drm_device *dev)
{
- if (dev->agp) {
- arch_phys_wc_del(dev->agp->agp_mtrr);
- drm_agp_clear(dev);
- kfree(dev->agp);
- dev->agp = NULL;
- }
+ drm_agp_destroy(dev);
}
static struct drm_bus drm_pci_bus = {
diff -r 42e153979435 -r 251ee00aaf7a sys/external/bsd/drm2/dist/drm/drm_stub.c
--- a/sys/external/bsd/drm2/dist/drm/drm_stub.c Tue Nov 11 02:31:55 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_stub.c Tue Nov 11 02:33:28 2014 +0000
@@ -849,7 +849,7 @@
dev->driver->unload(dev);
if (dev->agp)
- drm_pci_agp_destroy(dev);
+ drm_agp_destroy(dev);
drm_vblank_cleanup(dev);
Home |
Main Index |
Thread Index |
Old Index