From 6ef79263b68402687ccc2b7447dd908c00e35057 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 29 Mar 2003 03:38:47 +0000 Subject: Add DRMFILE definitions and supply filp for BSD in the post-drm-filp-0-1-branch world. The filp is a void * cast from the current pid. This is a temporary solution which maintains the status quo until a proper solution is implemented. What is really needed is a unique pointer per open, hopefully with a device private area. This can be done in FreeBSD for all entry points except mmap, but is difficult (sys/dev/streams/streams.c is an example). I have partially completed code for this but have not had time to debug, so this is a temporary fix. --- bsd-core/drm_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bsd-core/drm_dma.c') diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index 946e652c..fa0bd20d 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -182,7 +182,7 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf) buf->waiting = 0; buf->pending = 0; - buf->pid = 0; + buf->filp = NULL; buf->used = 0; #if __HAVE_DMA_HISTOGRAM buf->time_completed = get_cycles(); @@ -205,14 +205,14 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf) } #if !__HAVE_DMA_RECLAIM -void DRM(reclaim_buffers)(drm_device_t *dev, pid_t pid) +void DRM(reclaim_buffers)(drm_device_t *dev, DRMFILE filp) { drm_device_dma_t *dma = dev->dma; int i; if (!dma) return; for (i = 0; i < dma->buf_count; i++) { - if (dma->buflist[i]->pid == pid) { + if (dma->buflist[i]->filp == filp) { switch (dma->buflist[i]->list) { case DRM_LIST_NONE: DRM(free_buffer)(dev, dma->buflist[i]); -- cgit v1.2.3