summaryrefslogtreecommitdiff
path: root/shared/radeon.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-01-03 11:22:23 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-01-03 11:22:23 +0000
commit320802ebc145c0b821979dc587cd7e90b10b2d55 (patch)
tree816c9edec75fad1f35d7ee7c1ebf3bf191846df0 /shared/radeon.h
parent7419aa6e3f639ee47879824f387117d28b4de013 (diff)
more cleanups, free mem heap data on last client exit
Diffstat (limited to 'shared/radeon.h')
-rw-r--r--shared/radeon.h35
1 files changed, 12 insertions, 23 deletions
diff --git a/shared/radeon.h b/shared/radeon.h
index d46b6d9c..2b5131a9 100644
--- a/shared/radeon.h
+++ b/shared/radeon.h
@@ -106,11 +106,6 @@
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_WAIT)] = { radeon_irq_wait, 1, 0 },
-#define USE_IRQS 1
-#if USE_IRQS
-#define __HAVE_DMA_IRQ 1
-#define __HAVE_VBL_IRQ 1
-#define __HAVE_SHARED_IRQ 1
/* When a client dies:
* - Check for and clean up flipped page state
@@ -118,41 +113,35 @@
*
* DRM infrastructure takes care of reclaiming dma buffers.
*/
-#define DRIVER_PRERELEASE() do { \
+#define DRIVER_PRERELEASE() \
+do { \
if ( dev->dev_private ) { \
drm_radeon_private_t *dev_priv = dev->dev_private; \
if ( dev_priv->page_flipping ) { \
radeon_do_cleanup_pageflip( dev ); \
} \
radeon_mem_release( dev_priv->agp_heap ); \
+ radeon_mem_release( dev_priv->fb_heap ); \
} \
} while (0)
+/* When the last client dies, shut down the CP and free dev->dev_priv.
+ */
#define __HAVE_RELEASE 1
-#define DRIVER_RELEASE() do { \
- if ( dev->open_count == 1) \
+#define DRIVER_RELEASE() \
+do { \
+ if ( dev->open_count == 1) \
radeon_do_release( dev ); \
- } while (0)
-
-/* On unloading the module:
- * - Free memory heap structure
- * - Remove mappings made at startup and free dev_private.
- */
-#define DRIVER_PRETAKEDOWN() do { \
- if ( dev->dev_private ) { \
- drm_radeon_private_t *dev_priv = dev->dev_private; \
- radeon_mem_takedown( &(dev_priv->agp_heap) ); \
- radeon_do_cleanup_cp( dev ); \
- } \
} while (0)
-#else
-#define __HAVE_DMA_IRQ 0
-#endif
+
/* DMA customization:
*/
#define __HAVE_DMA 1
+#define __HAVE_DMA_IRQ 1
+#define __HAVE_VBL_IRQ 1
+#define __HAVE_SHARED_IRQ 1
/* Buffer customization: