diff options
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_bufs.c | 47 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_dma.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/mach64_drv.c | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/mga_drv.h | 7 | ||||
-rw-r--r-- | sys/dev/pci/drm/mga_state.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/drm/r128_cce.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/r128_drv.h | 11 | ||||
-rw-r--r-- | sys/dev/pci/drm/r128_state.c | 14 | ||||
-rw-r--r-- | sys/dev/pci/drm/r300_cmdbuf.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon_cp.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon_drv.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon_state.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/savage_bci.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/drm/savage_drv.h | 8 | ||||
-rw-r--r-- | sys/dev/pci/drm/sis_drv.c | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/tdfx_drv.c | 2 |
18 files changed, 88 insertions, 56 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index c0c71d6c449..7f4fe148735 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -288,6 +288,7 @@ typedef struct drm_buf { unsigned long bus_address; /* Bus address of buffer */ __volatile__ int pending; /* On hardware DMA queue */ struct drm_file *file_priv; /* Unique identifier of holding process */ + void *dev_private; /* Per-buffer private storage */ } drm_buf_t; typedef struct drm_dma_handle { diff --git a/sys/dev/pci/drm/drm_bufs.c b/sys/dev/pci/drm/drm_bufs.c index 720e7541583..d46943c5b32 100644 --- a/sys/dev/pci/drm/drm_bufs.c +++ b/sys/dev/pci/drm/drm_bufs.c @@ -417,10 +417,7 @@ drm_do_addbufs_agp(struct drm_device *dev, struct drm_buf_desc *request) entry = &dma->bufs[order]; - if (dev->driver->buf_priv_size == 0) - return (ENOMEM); - - entry->buflist = drm_calloc(count, dev->driver->buf_priv_size, + entry->buflist = drm_calloc(count, sizeof(*entry->buflist), DRM_MEM_BUFS); if (entry->buflist == NULL) return ENOMEM; @@ -441,6 +438,15 @@ drm_do_addbufs_agp(struct drm_device *dev, struct drm_buf_desc *request) buf->pending = 0; buf->file_priv = NULL; + buf->dev_private = drm_calloc(1, dev->driver->buf_priv_size, + DRM_MEM_BUFS); + if (buf->dev_private == NULL) { + /* Set count correctly so we free the proper amount. */ + entry->buf_count = count; + drm_cleanup_buf(dev, entry); + return ENOMEM; + } + offset += alignment; entry->buf_count++; byte_count += PAGE_SIZE << page_order; @@ -509,10 +515,7 @@ drm_do_addbufs_pci(struct drm_device *dev, struct drm_buf_desc *request) entry = &dma->bufs[order]; - if (dev->driver->buf_priv_size == 0) - return (EINVAL); - - entry->buflist = drm_calloc(count, dev->driver->buf_priv_size, + entry->buflist = drm_calloc(count, sizeof(*entry->buflist), DRM_MEM_BUFS); entry->seglist = drm_calloc(count, sizeof(*entry->seglist), DRM_MEM_BUFS); @@ -580,6 +583,20 @@ drm_do_addbufs_pci(struct drm_device *dev, struct drm_buf_desc *request) buf->pending = 0; buf->file_priv = NULL; + buf->dev_private = drm_calloc(1, + dev->driver->buf_priv_size, DRM_MEM_BUFS); + if (buf->dev_private == NULL) { + /* Set count so we free the proper amount. */ + entry->buf_count = count; + entry->seg_count = count; + drm_cleanup_buf(dev, entry); + drm_free(temp_pagelist, (dma->page_count + + (count << page_order)) * + sizeof(*dma->pagelist), + DRM_MEM_BUFS); + return ENOMEM; + } + DRM_DEBUG("buffer %d\n", entry->buf_count); } @@ -661,10 +678,7 @@ drm_do_addbufs_sg(struct drm_device *dev, struct drm_buf_desc *request) entry = &dma->bufs[order]; - if (dev->driver->buf_priv_size == 0) - return (ENOMEM); - - entry->buflist = drm_calloc(count, dev->driver->buf_priv_size, + entry->buflist = drm_calloc(count, sizeof(*entry->buflist), DRM_MEM_BUFS); if (entry->buflist == NULL) return ENOMEM; @@ -685,6 +699,15 @@ drm_do_addbufs_sg(struct drm_device *dev, struct drm_buf_desc *request) buf->pending = 0; buf->file_priv = NULL; + buf->dev_private = drm_calloc(1, dev->driver->buf_priv_size, + DRM_MEM_BUFS); + if (buf->dev_private == NULL) { + /* Set count correctly so we free the proper amount. */ + entry->buf_count = count; + drm_cleanup_buf(dev, entry); + return ENOMEM; + } + DRM_DEBUG("buffer %d\n", entry->buf_count); offset += alignment; diff --git a/sys/dev/pci/drm/drm_dma.c b/sys/dev/pci/drm/drm_dma.c index 6b3ec78fc34..88334924a6f 100644 --- a/sys/dev/pci/drm/drm_dma.c +++ b/sys/dev/pci/drm/drm_dma.c @@ -68,8 +68,12 @@ drm_cleanup_buf(struct drm_device *dev, drm_buf_entry_t *entry) } if (entry->buf_count) { + for (i = 0; i < entry->buf_count; i++) { + drm_free(entry->buflist[i].dev_private, + dev->driver->buf_priv_size, DRM_MEM_BUFS); + } drm_free(entry->buflist, entry->buf_count * - dev->driver->buf_priv_size, DRM_MEM_BUFS); + sizeof(*entry->buflist), DRM_MEM_BUFS); entry->buf_count = 0; } diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index ec82d8f28ec..6eb0bb2a1f4 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -90,6 +90,7 @@ static drm_pci_id_list_t inteldrm_pciidlist[] = { }; static const struct drm_driver_info inteldrm_driver = { + .buf_priv_size = 1, /* No dev_priv */ .ioctl = inteldrm_ioctl, .close = i915_driver_close, .lastclose = i915_driver_lastclose, diff --git a/sys/dev/pci/drm/mach64_drv.c b/sys/dev/pci/drm/mach64_drv.c index 00e0737f69f..f1d6271ef08 100644 --- a/sys/dev/pci/drm/mach64_drv.c +++ b/sys/dev/pci/drm/mach64_drv.c @@ -68,6 +68,7 @@ static drm_pci_id_list_t mach64_pciidlist[] = { }; static const struct drm_driver_info machdrm_driver = { + .buf_priv_size = 1, /* No dev_priv */ .ioctl = machdrm_ioctl, .lastclose = mach64_driver_lastclose, .vblank_pipes = 1, diff --git a/sys/dev/pci/drm/mga_drv.h b/sys/dev/pci/drm/mga_drv.h index cba4d6945b3..a46858aa549 100644 --- a/sys/dev/pci/drm/mga_drv.h +++ b/sys/dev/pci/drm/mga_drv.h @@ -69,10 +69,9 @@ typedef struct drm_mga_freelist { } drm_mga_freelist_t; typedef struct { - struct drm_buf buf; - drm_mga_freelist_t *list_entry; - int discard; - int dispatched; + drm_mga_freelist_t *list_entry; + int discard; + int dispatched; } drm_mga_buf_priv_t; typedef struct drm_mga_private { diff --git a/sys/dev/pci/drm/mga_state.c b/sys/dev/pci/drm/mga_state.c index 1dae29e6ae4..f13c60fcdaa 100644 --- a/sys/dev/pci/drm/mga_state.c +++ b/sys/dev/pci/drm/mga_state.c @@ -650,7 +650,7 @@ static void mga_dma_dispatch_swap(struct drm_device * dev) static void mga_dma_dispatch_vertex(struct drm_device * dev, struct drm_buf * buf) { drm_mga_private_t *dev_priv = dev->dev_private; - drm_mga_buf_priv_t *buf_priv = (drm_mga_buf_priv_t *)buf; + drm_mga_buf_priv_t *buf_priv = buf->dev_private; drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; u32 address = (u32) buf->bus_address; u32 length = (u32) buf->used; @@ -698,7 +698,7 @@ static void mga_dma_dispatch_indices(struct drm_device * dev, struct drm_buf * b unsigned int start, unsigned int end) { drm_mga_private_t *dev_priv = dev->dev_private; - drm_mga_buf_priv_t *buf_priv = (drm_mga_buf_priv_t *)buf; + drm_mga_buf_priv_t *buf_priv = buf->dev_private; drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; u32 address = (u32) buf->bus_address; int i = 0; @@ -747,7 +747,7 @@ static void mga_dma_dispatch_iload(struct drm_device * dev, struct drm_buf * buf unsigned int dstorg, unsigned int length) { drm_mga_private_t *dev_priv = dev->dev_private; - drm_mga_buf_priv_t *buf_priv = (drm_mga_buf_priv_t *)buf; + drm_mga_buf_priv_t *buf_priv = buf->dev_private; drm_mga_context_regs_t *ctx = &dev_priv->sarea_priv->context_state; u32 srcorg = buf->bus_address | dev_priv->dma_access | MGA_SRCMAP_SYSMEM; u32 y2; @@ -917,7 +917,7 @@ int mga_dma_vertex(struct drm_device *dev, void *data, struct drm_file *file_pri if (vertex->idx < 0 || vertex->idx > dma->buf_count) return EINVAL; buf = dma->buflist[vertex->idx]; - buf_priv = (drm_mga_buf_priv_t *)buf; + buf_priv = buf->dev_private; buf->used = vertex->used; buf_priv->discard = vertex->discard; @@ -953,7 +953,7 @@ int mga_dma_indices(struct drm_device *dev, void *data, struct drm_file *file_pr return EINVAL; buf = dma->buflist[indices->idx]; - buf_priv = (drm_mga_buf_priv_t *)buf; + buf_priv = buf->dev_private; buf_priv->discard = indices->discard; @@ -996,7 +996,7 @@ int mga_dma_iload(struct drm_device *dev, void *data, struct drm_file *file_priv return EINVAL; buf = dma->buflist[iload->idx]; - buf_priv = (drm_mga_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (mga_verify_iload(dev_priv, iload->dstorg, iload->length)) { mga_freelist_put(dev, buf); diff --git a/sys/dev/pci/drm/r128_cce.c b/sys/dev/pci/drm/r128_cce.c index 53e2e2ee132..2f3f8bd05ac 100644 --- a/sys/dev/pci/drm/r128_cce.c +++ b/sys/dev/pci/drm/r128_cce.c @@ -784,7 +784,7 @@ static struct drm_buf *r128_freelist_get(struct drm_device * dev) for (i = 0; i < dma->buf_count; i++) { buf = dma->buflist[i]; - buf_priv = (drm_r128_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->file_priv == 0) return buf; } @@ -794,7 +794,7 @@ static struct drm_buf *r128_freelist_get(struct drm_device * dev) for (i = 0; i < dma->buf_count; i++) { buf = dma->buflist[i]; - buf_priv = (drm_r128_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->pending && buf_priv->age <= done_age) { /* The buffer has been processed, so it * can now be used. @@ -817,7 +817,7 @@ void r128_freelist_reset(struct drm_device * dev) for (i = 0; i < dma->buf_count; i++) { struct drm_buf *buf = dma->buflist[i]; - drm_r128_buf_priv_t *buf_priv = (drm_r128_buf_priv_t *)buf; + drm_r128_buf_priv_t *buf_priv = buf->dev_private; buf_priv->age = 0; } } diff --git a/sys/dev/pci/drm/r128_drv.h b/sys/dev/pci/drm/r128_drv.h index 69bd9be3c6d..2ae4b002a2f 100644 --- a/sys/dev/pci/drm/r128_drv.h +++ b/sys/dev/pci/drm/r128_drv.h @@ -131,12 +131,11 @@ typedef struct drm_r128_private { } drm_r128_private_t; typedef struct drm_r128_buf_priv { - struct drm_buf buf; - drm_r128_freelist_t *list_entry; - u_int32_t age; - int prim; - int discard; - int dispatched; + u32 age; + int prim; + int discard; + int dispatched; + drm_r128_freelist_t *list_entry; } drm_r128_buf_priv_t; /* r128_cce.c */ diff --git a/sys/dev/pci/drm/r128_state.c b/sys/dev/pci/drm/r128_state.c index d65165b7e11..c6e8e26b7ec 100644 --- a/sys/dev/pci/drm/r128_state.c +++ b/sys/dev/pci/drm/r128_state.c @@ -570,7 +570,7 @@ static void r128_cce_dispatch_flip(struct drm_device * dev) static void r128_cce_dispatch_vertex(struct drm_device * dev, struct drm_buf * buf) { drm_r128_private_t *dev_priv = dev->dev_private; - drm_r128_buf_priv_t *buf_priv = (drm_r128_buf_priv_t *)buf; + drm_r128_buf_priv_t *buf_priv = buf->dev_private; drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; int format = sarea_priv->vc_format; int offset = buf->bus_address; @@ -642,7 +642,7 @@ static void r128_cce_dispatch_indirect(struct drm_device * dev, struct drm_buf * buf, int start, int end) { drm_r128_private_t *dev_priv = dev->dev_private; - drm_r128_buf_priv_t *buf_priv = (drm_r128_buf_priv_t *)buf; + drm_r128_buf_priv_t *buf_priv = buf->dev_private; RING_LOCALS; DRM_DEBUG("indirect: buf=%d s=0x%x e=0x%x\n", buf->idx, start, end); @@ -698,7 +698,7 @@ static void r128_cce_dispatch_indices(struct drm_device * dev, int start, int end, int count) { drm_r128_private_t *dev_priv = dev->dev_private; - drm_r128_buf_priv_t *buf_priv = (drm_r128_buf_priv_t *)buf; + drm_r128_buf_priv_t *buf_priv = buf->dev_private; drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; int format = sarea_priv->vc_format; int offset = dev->agp_buffer_map->offset - dev_priv->cce_buffers_offset; @@ -830,7 +830,7 @@ static int r128_cce_dispatch_blit(struct drm_device * dev, /* Dispatch the indirect buffer. */ buf = dma->buflist[blit->idx]; - buf_priv = (drm_r128_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->file_priv != file_priv) { DRM_ERROR("process %d using buffer owned by %p\n", @@ -1380,7 +1380,7 @@ int r128_cce_vertex(struct drm_device *dev, void *data, struct drm_file *file_pr VB_AGE_TEST_WITH_RETURN(dev_priv); buf = dma->buflist[vertex->idx]; - buf_priv = (drm_r128_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->file_priv != file_priv) { DRM_ERROR("process %d using buffer owned by %p\n", @@ -1436,7 +1436,7 @@ int r128_cce_indices(struct drm_device *dev, void *data, struct drm_file *file_p VB_AGE_TEST_WITH_RETURN(dev_priv); buf = dma->buflist[elts->idx]; - buf_priv = (drm_r128_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->file_priv != file_priv) { DRM_ERROR("process %d using buffer owned by %p\n", @@ -1574,7 +1574,7 @@ int r128_cce_indirect(struct drm_device *dev, void *data, struct drm_file *file_ } buf = dma->buflist[indirect->idx]; - buf_priv = (drm_r128_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->file_priv != file_priv) { DRM_ERROR("process %d using buffer owned by %p\n", diff --git a/sys/dev/pci/drm/r300_cmdbuf.c b/sys/dev/pci/drm/r300_cmdbuf.c index c77ade2baf0..f1f49fcf6fa 100644 --- a/sys/dev/pci/drm/r300_cmdbuf.c +++ b/sys/dev/pci/drm/r300_cmdbuf.c @@ -864,7 +864,7 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv) static void r300_discard_buffer(struct drm_device * dev, struct drm_buf * buf) { drm_radeon_private_t *dev_priv = dev->dev_private; - drm_radeon_buf_priv_t *buf_priv = (drm_radeon_buf_priv_t *)buf; + drm_radeon_buf_priv_t *buf_priv = buf->dev_private; buf_priv->age = ++dev_priv->sarea_priv->last_dispatch; buf->pending = 1; diff --git a/sys/dev/pci/drm/radeon_cp.c b/sys/dev/pci/drm/radeon_cp.c index 7c38809cb45..b22a2ad9336 100644 --- a/sys/dev/pci/drm/radeon_cp.c +++ b/sys/dev/pci/drm/radeon_cp.c @@ -1544,7 +1544,7 @@ struct drm_buf *radeon_freelist_get(struct drm_device * dev) DRM_DEBUG("done_age = %d\n", done_age); for (i = start; i < dma->buf_count; i++) { buf = dma->buflist[i]; - buf_priv = (drm_radeon_buf_priv_t *)buf; + buf_priv = buf->dev_private; if (buf->file_priv == NULL || (buf->pending && buf_priv->age <= done_age)) { @@ -1610,7 +1610,7 @@ void radeon_freelist_reset(struct drm_device * dev) dev_priv->last_buf = 0; for (i = 0; i < dma->buf_count; i++) { struct drm_buf *buf = dma->buflist[i]; - drm_radeon_buf_priv_t *buf_priv = (drm_radeon_buf_priv_t *)buf; + drm_radeon_buf_priv_t *buf_priv = buf->dev_private; buf_priv->age = 0; } } diff --git a/sys/dev/pci/drm/radeon_drv.h b/sys/dev/pci/drm/radeon_drv.h index e6d8acfa53e..8f5d4de314d 100644 --- a/sys/dev/pci/drm/radeon_drv.h +++ b/sys/dev/pci/drm/radeon_drv.h @@ -325,8 +325,7 @@ typedef struct drm_radeon_private { } drm_radeon_private_t; typedef struct drm_radeon_buf_priv { - struct drm_buf buf; - u_int32_t age; + u32 age; } drm_radeon_buf_priv_t; typedef struct drm_radeon_kcmd_buffer { diff --git a/sys/dev/pci/drm/radeon_state.c b/sys/dev/pci/drm/radeon_state.c index 7005224fe7f..d5df6daf571 100644 --- a/sys/dev/pci/drm/radeon_state.c +++ b/sys/dev/pci/drm/radeon_state.c @@ -1548,7 +1548,7 @@ static void radeon_cp_dispatch_vertex(struct drm_device * dev, static void radeon_cp_discard_buffer(struct drm_device * dev, struct drm_buf * buf) { drm_radeon_private_t *dev_priv = dev->dev_private; - drm_radeon_buf_priv_t *buf_priv = (drm_radeon_buf_priv_t *)buf; + drm_radeon_buf_priv_t *buf_priv = buf->dev_private; RING_LOCALS; buf_priv->age = ++dev_priv->sarea_priv->last_dispatch; diff --git a/sys/dev/pci/drm/savage_bci.c b/sys/dev/pci/drm/savage_bci.c index df848f0d810..58c9b07a377 100644 --- a/sys/dev/pci/drm/savage_bci.c +++ b/sys/dev/pci/drm/savage_bci.c @@ -214,15 +214,18 @@ static int savage_freelist_init(struct drm_device *dev) dev_priv->head.next = &dev_priv->tail; dev_priv->head.prev = NULL; + dev_priv->head.buf = NULL; dev_priv->tail.next = NULL; dev_priv->tail.prev = &dev_priv->head; + dev_priv->tail.buf = NULL; for (i = 0; i < dma->buf_count; i++) { buf = dma->buflist[i]; - entry = (drm_savage_buf_priv_t *)buf; + entry = buf->dev_private; SET_AGE(&entry->age, 0, 0); + entry->buf = buf; entry->next = dev_priv->head.next; entry->prev = &dev_priv->head; @@ -253,13 +256,13 @@ static struct drm_buf *savage_freelist_get(struct drm_device *dev) DRM_DEBUG(" tail=0x%04x %d\n", tail->age.event, tail->age.wrap); DRM_DEBUG(" head=0x%04x %d\n", event, wrap); - if ((TEST_AGE(&tail->age, event, wrap) || event == 0)) { + if (tail->buf && (TEST_AGE(&tail->age, event, wrap) || event == 0)) { drm_savage_buf_priv_t *next = tail->next; drm_savage_buf_priv_t *prev = tail->prev; prev->next = next; next->prev = prev; tail->next = tail->prev = NULL; - return &tail->buf; + return tail->buf; } DRM_DEBUG("returning NULL, tail->buf=%p!\n", tail->buf); @@ -268,9 +271,8 @@ static struct drm_buf *savage_freelist_get(struct drm_device *dev) void savage_freelist_put(struct drm_device *dev, struct drm_buf *buf) { - drm_savage_private_t *dev_priv = dev->dev_private; - drm_savage_buf_priv_t *entry = (drm_savage_buf_priv_t *)buf; - drm_savage_buf_priv_t *prev, *next; + drm_savage_private_t *dev_priv = dev->dev_private; + drm_savage_buf_priv_t *entry = buf->dev_private, *prev, *next; DRM_DEBUG("age=0x%04x wrap=%d\n", entry->age.event, entry->age.wrap); @@ -998,7 +1000,7 @@ void savage_reclaim_buffers(struct drm_device *dev, struct drm_file *file_priv) for (i = 0; i < dma->buf_count; i++) { struct drm_buf *buf = dma->buflist[i]; - drm_savage_buf_priv_t *buf_priv = (drm_savage_buf_priv_t *)buf; + drm_savage_buf_priv_t *buf_priv = buf->dev_private; if (buf->file_priv == file_priv && buf_priv && buf_priv->next == NULL && buf_priv->prev == NULL) { diff --git a/sys/dev/pci/drm/savage_drv.h b/sys/dev/pci/drm/savage_drv.h index c0082e4cb55..8176ebb8c32 100644 --- a/sys/dev/pci/drm/savage_drv.h +++ b/sys/dev/pci/drm/savage_drv.h @@ -55,10 +55,10 @@ typedef struct drm_savage_age { } drm_savage_age_t; typedef struct drm_savage_buf_priv { - struct drm_buf buf; - struct drm_savage_buf_priv *next; - struct drm_savage_buf_priv *prev; - drm_savage_age_t age; + struct drm_savage_buf_priv *next; + struct drm_savage_buf_priv *prev; + drm_savage_age_t age; + struct drm_buf *buf; } drm_savage_buf_priv_t; typedef struct drm_savage_dma_page { diff --git a/sys/dev/pci/drm/sis_drv.c b/sys/dev/pci/drm/sis_drv.c index 1500824e764..cdda6c78718 100644 --- a/sys/dev/pci/drm/sis_drv.c +++ b/sys/dev/pci/drm/sis_drv.c @@ -47,6 +47,7 @@ static drm_pci_id_list_t sis_pciidlist[] = { }; static const struct drm_driver_info sis_driver = { + .buf_priv_size = 1, /* No dev_priv */ .ioctl = sisdrm_ioctl, .context_ctor = sis_init_context, .context_dtor = sis_final_context, diff --git a/sys/dev/pci/drm/tdfx_drv.c b/sys/dev/pci/drm/tdfx_drv.c index 861d3bb871b..647a70f3b38 100644 --- a/sys/dev/pci/drm/tdfx_drv.c +++ b/sys/dev/pci/drm/tdfx_drv.c @@ -54,6 +54,8 @@ static drm_pci_id_list_t tdfxdrm_pciidlist[] = { }; static const struct drm_driver_info tdfxdrm_driver = { + .buf_priv_size = 1, /* No dev_priv */ + .name = DRIVER_NAME, .desc = DRIVER_DESC, .date = DRIVER_DATE, |