diff options
author | Dave Airlie <airlied@redhat.com> | 2008-09-26 15:37:21 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-09-30 14:13:49 +1000 |
commit | 972f6572652bc4a2f6c44c525e5e91f2becdb62a (patch) | |
tree | 60af3dc7e8a7c0f8bef7a3927dae161093b10dbe /bsd-core/drm_scatter.c | |
parent | 89126bb58ec82511758bed36a28e698b721fb435 (diff) | |
parent | 2db8e0c8ef8c7a66460fceda129533b364f6418c (diff) |
Merge remote branch 'origin/master' into modesetting-gem
Conflicts:
libdrm/Makefile.am
libdrm/dri_bufmgr.h
linux-core/drm_irq.c
linux-core/drm_sysfs.c
linux-core/drm_ttm.c
shared-core/i915_dma.c
shared-core/i915_irq.c
shared-core/nouveau_drv.h
shared-core/radeon_cp.c
Diffstat (limited to 'bsd-core/drm_scatter.c')
-rw-r--r-- | bsd-core/drm_scatter.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bsd-core/drm_scatter.c b/bsd-core/drm_scatter.c index 3ebd4628..550e6f88 100644 --- a/bsd-core/drm_scatter.c +++ b/bsd-core/drm_scatter.c @@ -45,27 +45,27 @@ void drm_sg_cleanup(drm_sg_mem_t *entry) free(entry, M_DRM); } -int drm_sg_alloc(struct drm_device * dev, drm_scatter_gather_t * request) +int drm_sg_alloc(struct drm_device * dev, struct drm_scatter_gather * request) { drm_sg_mem_t *entry; unsigned long pages; int i; - if ( dev->sg ) + if (dev->sg) return EINVAL; entry = malloc(sizeof(*entry), M_DRM, M_WAITOK | M_ZERO); - if ( !entry ) + if (!entry) return ENOMEM; pages = round_page(request->size) / PAGE_SIZE; - DRM_DEBUG( "sg size=%ld pages=%ld\n", request->size, pages ); + DRM_DEBUG("sg size=%ld pages=%ld\n", request->size, pages); entry->pages = pages; entry->busaddr = malloc(pages * sizeof(*entry->busaddr), M_DRM, M_WAITOK | M_ZERO); - if ( !entry->busaddr ) { + if (!entry->busaddr) { drm_sg_cleanup(entry); return ENOMEM; } @@ -81,7 +81,7 @@ int drm_sg_alloc(struct drm_device * dev, drm_scatter_gather_t * request) entry->busaddr[i] = vtophys(entry->handle + i * PAGE_SIZE); } - DRM_DEBUG( "sg alloc handle = %08lx\n", entry->handle ); + DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); entry->virtual = (void *)entry->handle; request->handle = entry->handle; @@ -101,10 +101,10 @@ int drm_sg_alloc(struct drm_device * dev, drm_scatter_gather_t * request) int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { - drm_scatter_gather_t *request = data; + struct drm_scatter_gather *request = data; int ret; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG("%s\n", __FUNCTION__); ret = drm_sg_alloc(dev, request); return ret; @@ -112,7 +112,7 @@ int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { - drm_scatter_gather_t *request = data; + struct drm_scatter_gather *request = data; drm_sg_mem_t *entry; DRM_LOCK(); @@ -120,10 +120,10 @@ int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) dev->sg = NULL; DRM_UNLOCK(); - if ( !entry || entry->handle != request->handle ) + if (!entry || entry->handle != request->handle) return EINVAL; - DRM_DEBUG( "sg free virtual = 0x%lx\n", entry->handle ); + DRM_DEBUG("sg free virtual = 0x%lx\n", entry->handle); drm_sg_cleanup(entry); |