From 8e3e79cf7467b48337c6496f70ff6c0cbd8332ff Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Fri, 27 Mar 2009 19:36:56 +0000 Subject: Push the per-driver dma hook a little further down. All for all the drivers using the dma-bufs interface, their per-driver ioctl hooks all started out the same way, followed by a call to another function to actually select the buffer. Save some space by moving that selection logic into the main dma_ioctl call, and make the second function the hook. --- sys/dev/pci/drm/drmP.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev/pci/drm/drmP.h') diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 9ef2b8aa426..79871e8a014 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -202,7 +202,8 @@ DRM_SPINUNLOCK(&dev->irq_lock) #define DRM_ERROR(fmt, arg...) \ printf("error: [" DRM_NAME ":pid%d:%s] *ERROR* " fmt, \ - DRM_CURRENTPID, __func__ , ## arg) + curproc->p_pid, __func__ , ## arg) + #define DRM_INFO(fmt, arg...) printf("%s: " fmt, dev_priv->dev.dv_xname, ## arg) @@ -210,7 +211,7 @@ DRM_SPINUNLOCK(&dev->irq_lock) #undef DRM_DEBUG #define DRM_DEBUG(fmt, arg...) do { \ if (drm_debug_flag) \ - printf("[" DRM_NAME ":pid%d:%s] " fmt, DRM_CURRENTPID, \ + printf("[" DRM_NAME ":pid%d:%s] " fmt, curproc->p_pid, \ __func__ , ## arg); \ } while (0) #else @@ -390,7 +391,8 @@ struct drm_driver_info { void (*lastclose)(struct drm_device *); void (*reclaim_buffers_locked)(struct drm_device *, struct drm_file *); - int (*dma_ioctl)(struct drm_device *, void *, struct drm_file *); + int (*dma_ioctl)(struct drm_device *, struct drm_dma *, + struct drm_file *); int (*dma_quiescent)(struct drm_device *); int (*context_ctor)(struct drm_device *, int); int (*context_dtor)(struct drm_device *, int); @@ -470,7 +472,7 @@ struct drm_device { struct timeout vblank_disable_timer; /* timer for disable */ struct drm_vblank *vblank; /* One per ctrc */ - pid_t buf_pgid; + pid_t buf_pgid; struct drm_agp_head *agp; struct drm_sg_mem *sg; /* Scatter gather memory */ -- cgit v1.2.3