diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-27 19:36:56 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-27 19:36:56 +0000 |
commit | 8e3e79cf7467b48337c6496f70ff6c0cbd8332ff (patch) | |
tree | 984476e02176575e4a4588967caeb95982f9fd35 /sys/dev/pci/drm/drmP.h | |
parent | 7eab1c3354287ce572c4e83fa13c6714c57cd03c (diff) |
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.
Diffstat (limited to 'sys/dev/pci/drm/drmP.h')
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 10 |
1 files changed, 6 insertions, 4 deletions
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 */ |