aboutsummaryrefslogtreecommitdiff
path: root/shared/radeon_state.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-27 19:51:38 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-27 19:51:38 +0000
commitfa6b1d129e7bf8acf41e66c9c665ae9f9c1d5b0d (patch)
treec0b8605f134c4fe96a78f5b30644d25ac5ebcdf9 /shared/radeon_state.c
parent77fa7b9548bf7a5bf5e49515f1a478c27ede07a7 (diff)
First check in for DRM that splits core from personality modules
Diffstat (limited to 'shared/radeon_state.c')
-rw-r--r--shared/radeon_state.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/shared/radeon_state.c b/shared/radeon_state.c
index 9675da92..35fb16e9 100644
--- a/shared/radeon_state.c
+++ b/shared/radeon_state.c
@@ -27,7 +27,6 @@
* Kevin E. Martin <martin@valinux.com>
*/
-#include "radeon.h"
#include "drmP.h"
#include "drm.h"
#include "drm_sarea.h"
@@ -1598,7 +1597,7 @@ static int radeon_do_init_pageflip( drm_device_t *dev )
return 0;
}
-/* Called whenever a client dies, from DRM(release).
+/* Called whenever a client dies, from drm_release.
* NOTE: Lock isn't necessarily held when this is called!
*/
int radeon_do_cleanup_pageflip( drm_device_t *dev )
@@ -2560,7 +2559,7 @@ int radeon_cp_setparam( DRM_IOCTL_ARGS ) {
*
* DRM infrastructure takes care of reclaiming dma buffers.
*/
-static void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp)
+void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp)
{
if ( dev->dev_private ) {
drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -2572,17 +2571,17 @@ static void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp)
}
}
-static void radeon_driver_pretakedown(drm_device_t *dev)
+void radeon_driver_pretakedown(drm_device_t *dev)
{
radeon_do_release(dev);
}
-static int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv)
+int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv)
{
drm_radeon_private_t *dev_priv = dev->dev_private;
struct drm_radeon_driver_file_fields *radeon_priv;
- radeon_priv = (struct drm_radeon_driver_file_fields *)DRM(alloc)(sizeof(*radeon_priv), DRM_MEM_FILES);
+ radeon_priv = (struct drm_radeon_driver_file_fields *)drm_alloc(sizeof(*radeon_priv), DRM_MEM_FILES);
if (!radeon_priv)
return -ENOMEM;
@@ -2596,27 +2595,10 @@ static int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv)
return 0;
}
-static void radeon_driver_free_filp_priv(drm_device_t *dev, drm_file_t *filp_priv)
+void radeon_driver_free_filp_priv(drm_device_t *dev, drm_file_t *filp_priv)
{
struct drm_radeon_driver_file_fields *radeon_priv = filp_priv->driver_priv;
- DRM(free)(radeon_priv, sizeof(*radeon_priv), DRM_MEM_FILES);
+ drm_free(radeon_priv, sizeof(*radeon_priv), DRM_MEM_FILES);
}
-void radeon_driver_register_fns(struct drm_device *dev)
-{
- dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL;
- dev->dev_priv_size = sizeof(drm_radeon_buf_priv_t);
- dev->fn_tbl.preinit = radeon_preinit;
- dev->fn_tbl.postinit = radeon_postinit;
- dev->fn_tbl.postcleanup = radeon_postcleanup;
- dev->fn_tbl.prerelease = radeon_driver_prerelease;
- dev->fn_tbl.pretakedown = radeon_driver_pretakedown;
- dev->fn_tbl.open_helper = radeon_driver_open_helper;
- dev->fn_tbl.vblank_wait = radeon_driver_vblank_wait;
- dev->fn_tbl.irq_preinstall = radeon_driver_irq_preinstall;
- dev->fn_tbl.irq_postinstall = radeon_driver_irq_postinstall;
- dev->fn_tbl.irq_uninstall = radeon_driver_irq_uninstall;
- dev->fn_tbl.irq_handler = radeon_driver_irq_handler;
- dev->fn_tbl.free_filp_priv = radeon_driver_free_filp_priv;
-}