diff options
author | Eric Anholt <anholt@freebsd.org> | 2003-03-29 03:38:47 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2003-03-29 03:38:47 +0000 |
commit | 6ef79263b68402687ccc2b7447dd908c00e35057 (patch) | |
tree | 896bc499ce2a2eef74a07302e27661220458f38e /bsd-core/drm_dma.c | |
parent | e27d2f8c7cacf1e9994e9030c7ebb15dc4f4efff (diff) |
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.
Diffstat (limited to 'bsd-core/drm_dma.c')
-rw-r--r-- | bsd-core/drm_dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
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]); |