diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-29 19:12:57 +0000 |
---|---|---|
committer | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-03-29 19:12:57 +0000 |
commit | a12c38ae9a9d37dc3864ad7dfa772e40a958ddf7 (patch) | |
tree | 26700a8dedb852dbf420b17d96644bb33266d750 | |
parent | b5e6a6ef50c14eb81b6b1a2a93729fa286fdea8e (diff) |
Indentation and version updates.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libdrm/xf86mm.c | 12 | ||||
-rw-r--r-- | linux-core/drm_ttm.c | 31 | ||||
-rw-r--r-- | linux-core/drm_ttm.h | 22 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 5 |
5 files changed, 36 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac index 3c5da6f4..06412dee 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libdrm], 2.0, [dri-devel@lists.sourceforge.net], libdrm) +AC_INIT([libdrm], 3.0.0TG, [dri-devel@lists.sourceforge.net], libdrm) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) diff --git a/libdrm/xf86mm.c b/libdrm/xf86mm.c index 76a0a82a..f0369ea5 100644 --- a/libdrm/xf86mm.c +++ b/libdrm/xf86mm.c @@ -265,7 +265,7 @@ drmWaitFence(int drmFD, drmFence fence) * arbitration scheme. We need a scheduler!!. */ -#if 1 +#if 0 sched_yield(); if ((drmMMKI.sarea->retired[fence.fenceType & DRM_FENCE_MASK] - @@ -588,7 +588,7 @@ drmMMFreeLRU(int drmFD, drmMMPool * pool, int mode) if (ret) return ret; if (!retired) { - return 0; + return 0; } DRMLISTDEL(list); block->fenced = 0; @@ -636,6 +636,10 @@ drmMMAllocPoolBuffer(int drmFD, unsigned size, list = pool->freeStack.next; while (list == &pool->freeStack) { + if (pool->lruList.next == &pool->lruList) { + drmMsg("Lost all batchbuffers. You've encountered a bug.\n"); + return -1; + } ret = drmMMFreeLRU(drmFD, pool, 1); if (ret) return ret; @@ -756,7 +760,7 @@ drmMMFreeBuffer(int drmFD, drmMMBuf * buf) } } } else if (buf->pool) { - drmMMFreePoolBuffer(buf); + drmMMFreePoolBuffer(buf); } return 0; } @@ -784,7 +788,7 @@ drmCheckValidation(unsigned flags, drmMMBuf * buf) return -1; if (buf->flags & DRM_MM_SHARED) return -1; - if (buf->flags & DRM_MM_NEW) + if (buf->flags & DRM_MM_NEW) return 1; if (!FLAGS_COMPATIBLE(buf->flags, flags)) return 1; diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c index 561a9a4c..090dd784 100644 --- a/linux-core/drm_ttm.c +++ b/linux-core/drm_ttm.c @@ -621,8 +621,8 @@ static int remove_ttm_region(drm_ttm_backend_list_t * entry, int ret_if_busy) DRM_DEBUG("Nope, buf busy.\n"); return ret; } - } - entry->mm_node = NULL; + } + entry->mm_node = NULL; mm_node->private = NULL; spin_lock(&mm->mm.mm_lock); list_del(&mm_priv->lru); @@ -632,7 +632,6 @@ static int remove_ttm_region(drm_ttm_backend_list_t * entry, int ret_if_busy) return 0; } - /* * Unbind a ttm region from the aperture and take it out of the * aperture manager. @@ -1095,8 +1094,7 @@ int drm_add_ttm(drm_device_t * dev, unsigned size, drm_map_list_t ** maplist) return 0; } - -static int drm_ttm_evict_aged(drm_ttm_mm_t *mm) +static int drm_ttm_evict_aged(drm_ttm_mm_t * mm) { struct list_head *list; spinlock_t *mm_lock = &mm->mm.mm_lock; @@ -1110,20 +1108,20 @@ static int drm_ttm_evict_aged(drm_ttm_mm_t *mm) do { list = mm->lru_head.next; - - if (list == &mm->lru_head) + + if (list == &mm->lru_head) break; - + evict_priv = list_entry(list, drm_ttm_mm_priv_t, lru); - if (!evict_priv->fence_valid) + if (!evict_priv->fence_valid) break; evict_fence = evict_priv->fence; if (!dev->mm_driver-> test_fence(dev, evict_priv->region->fence_type, - evict_fence)) + evict_fence)) break; - + if (!dev->mm_driver-> fence_aged(dev, evict_priv->region->fence_type, evict_fence)) @@ -1142,8 +1140,6 @@ static int drm_ttm_evict_aged(drm_ttm_mm_t *mm) return evicted; } - - /* * Fence all unfenced regions in the global lru list. * FIXME: This is exported until we have a scheduler built in. @@ -1188,12 +1184,12 @@ void drm_ttm_fence_regions(drm_device_t * dev) spin_unlock(&mm->mm.mm_lock); if (!(check_aged++ & 0x0F) && drm_ttm_evict_aged(mm)) { - dev->mm_driver->mm_sarea->evict_tt_seq = - dev->mm_driver->mm_sarea->validation_seq + 1; - } + dev->mm_driver->mm_sarea->evict_tt_seq = + dev->mm_driver->mm_sarea->validation_seq + 1; + } } -EXPORT_SYMBOL(drm_ttm_fence_regions); +EXPORT_SYMBOL(drm_ttm_fence_regions); /* * Evict the first (oldest) region on the lru list, after its fence @@ -1866,7 +1862,6 @@ int drm_mm_do_takedown(drm_device_t * dev) return 0; } - /* * FIXME: Temporarily non-static to allow for intel initialization hack. */ diff --git a/linux-core/drm_ttm.h b/linux-core/drm_ttm.h index 8a82917c..4bdc0122 100644 --- a/linux-core/drm_ttm.h +++ b/linux-core/drm_ttm.h @@ -30,7 +30,7 @@ typedef struct drm_ttm_backend { #define DRM_FLUSH_EXE (0x04) typedef struct drm_ttm_backend_list { - uint32_t flags; + uint32_t flags; atomic_t refcount; struct list_head head; drm_ttm_backend_t *be; @@ -43,7 +43,7 @@ typedef struct drm_ttm_backend_list { uint32_t fence_type; struct drm_mm_node *mm_node; struct drm_ttm_mm *mm; - int pinned; + int pinned; enum { ttm_bound, ttm_evicted, @@ -59,10 +59,10 @@ typedef struct drm_ttm_vma_list { } drm_ttm_vma_list_t; typedef struct drm_ttm { - struct list_head p_mm_list; - atomic_t shared_count; - uint32_t mm_list_seq; - unsigned long aperture_base; + struct list_head p_mm_list; + atomic_t shared_count; + uint32_t mm_list_seq; + unsigned long aperture_base; struct page **pages; uint32_t *page_flags; unsigned long lhandle; @@ -74,7 +74,7 @@ typedef struct drm_ttm { atomic_t unfinished_regions; drm_file_t *owner; int destroy; - int mmap_sem_locked; + int mmap_sem_locked; } drm_ttm_t; /* @@ -128,10 +128,10 @@ int drm_rebind_ttm_region(drm_ttm_backend_list_t * entry, extern int drm_destroy_ttm(drm_ttm_t * ttm); extern void drm_user_destroy_region(drm_ttm_backend_list_t * entry); -extern int drm_ttm_add_mm_to_list(drm_ttm_t *ttm, struct mm_struct *mm); -extern void drm_ttm_delete_mm(drm_ttm_t *ttm, struct mm_struct *mm); -extern void drm_ttm_fence_before_destroy(drm_ttm_t *ttm); -extern void drm_fence_unfenced_region(drm_ttm_backend_list_t *entry); +extern int drm_ttm_add_mm_to_list(drm_ttm_t * ttm, struct mm_struct *mm); +extern void drm_ttm_delete_mm(drm_ttm_t * ttm, struct mm_struct *mm); +extern void drm_ttm_fence_before_destroy(drm_ttm_t * ttm); +extern void drm_fence_unfenced_region(drm_ttm_backend_list_t * entry); extern int drm_ttm_ioctl(DRM_IOCTL_ARGS); extern int drm_mm_init_ioctl(DRM_IOCTL_ARGS); diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index 29771c3a..55d60f4c 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -37,7 +37,7 @@ #define DRIVER_NAME "i915" #define DRIVER_DESC "Intel Graphics" -#define DRIVER_DATE "20060306" +#define DRIVER_DATE "20060329" /* Interface history: * @@ -45,9 +45,10 @@ * 1.2: Add Power Management * 1.3: Add vblank support * 1.4: Fix cmdbuffer path, add heap destroy + * 1.5: TTM support */ #define DRIVER_MAJOR 1 -#define DRIVER_MINOR 4 +#define DRIVER_MINOR 5 #define DRIVER_PATCHLEVEL 0 typedef struct _drm_i915_ring_buffer { |