Remove DRM() macros from core ffb driver. DaveA says he'll make it compile

someday.
This commit is contained in:
Jon Smirl 2004-09-30 21:27:59 +00:00
parent 9f9a8f1382
commit a36a6a291d
3 changed files with 12 additions and 14 deletions

View file

@ -13,7 +13,7 @@
#include "drmP.h" #include "drmP.h"
#include "ffb_drv.h" #include "ffb_drv.h"
static int DRM(alloc_queue) (drm_device_t * dev, int is_2d_only) { static int ffb_alloc_queue(drm_device_t * dev, int is_2d_only) {
ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private; ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private;
int i; int i;
@ -351,7 +351,7 @@ static void FFBWait(ffb_fbcPtr ffb)
} while (--limit); } while (--limit);
} }
int DRM(context_switch) (drm_device_t * dev, int old, int new) { int ffb_context_switch(drm_device_t * dev, int old, int new) {
ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private; ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private;
#if DRM_DMA_HISTOGRAM #if DRM_DMA_HISTOGRAM
@ -375,7 +375,7 @@ int DRM(context_switch) (drm_device_t * dev, int old, int new) {
return 0; return 0;
} }
int DRM(resctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_resctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_ctx_res_t res; drm_ctx_res_t res;
drm_ctx_t ctx; drm_ctx_t ctx;
@ -398,7 +398,7 @@ int DRM(resctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0; return 0;
} }
int DRM(addctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_addctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_file_t *priv = filp->private_data; drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
@ -407,7 +407,7 @@ int DRM(addctx) (struct inode * inode, struct file * filp, unsigned int cmd,
if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx))) if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx)))
return -EFAULT; return -EFAULT;
idx = DRM(alloc_queue) (dev, (ctx.flags & _DRM_CONTEXT_2DONLY)); idx = ffb_alloc_queue(dev, (ctx.flags & _DRM_CONTEXT_2DONLY));
if (idx < 0) if (idx < 0)
return -ENFILE; return -ENFILE;
@ -418,7 +418,7 @@ int DRM(addctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0; return 0;
} }
int DRM(modctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_modctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_file_t *priv = filp->private_data; drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
@ -446,7 +446,7 @@ int DRM(modctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0; return 0;
} }
int DRM(getctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_getctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_file_t *priv = filp->private_data; drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
@ -477,7 +477,7 @@ int DRM(getctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0; return 0;
} }
int DRM(switchctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_switchctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_file_t *priv = filp->private_data; drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev; drm_device_t *dev = priv->dev;
@ -486,10 +486,10 @@ int DRM(switchctx) (struct inode * inode, struct file * filp, unsigned int cmd,
if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx))) if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx)))
return -EFAULT; return -EFAULT;
DRM_DEBUG("%d\n", ctx.handle); DRM_DEBUG("%d\n", ctx.handle);
return DRM(context_switch) (dev, dev->last_context, ctx.handle); return ffb_context_switch(dev, dev->last_context, ctx.handle);
} }
int DRM(newctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_newctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_ctx_t ctx; drm_ctx_t ctx;
@ -500,7 +500,7 @@ int DRM(newctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0; return 0;
} }
int DRM(rmctx) (struct inode * inode, struct file * filp, unsigned int cmd, int ffb_rmctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) { unsigned long arg) {
drm_ctx_t ctx; drm_ctx_t ctx;
drm_file_t *priv = filp->private_data; drm_file_t *priv = filp->private_data;

View file

@ -276,8 +276,6 @@ int ffb_presetup(drm_device_t *dev)
static int postinit( struct drm_device *dev, unsigned long flags ) static int postinit( struct drm_device *dev, unsigned long flags )
{ {
DRM(fops).get_unmapped_area = ffb_get_unmapped_area;
DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n", DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
DRIVER_NAME, DRIVER_NAME,
DRIVER_MAJOR, DRIVER_MAJOR,
@ -326,6 +324,7 @@ static struct drm_driver_fn ffb_driver_fn = {
.ioctl = drm_ioctl, .ioctl = drm_ioctl,
.mmap = drm_mmap, .mmap = drm_mmap,
.fasync = drm_fasync, .fasync = drm_fasync,
.get_unmapped_area = ffb_get_unmapped_area,
}, },
}; };

View file

@ -275,7 +275,6 @@ typedef struct ffb_dev_priv {
struct ffb_hw_context *hw_state[FFB_MAX_CTXS]; struct ffb_hw_context *hw_state[FFB_MAX_CTXS];
} ffb_dev_priv_t; } ffb_dev_priv_t;
extern struct file_operations DRM(fops);
extern unsigned long ffb_get_unmapped_area(struct file *filp, extern unsigned long ffb_get_unmapped_area(struct file *filp,
unsigned long hint, unsigned long hint,
unsigned long len, unsigned long len,