aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--linux-core/drmP.h17
-rw-r--r--linux-core/drm_drv.c3
-rw-r--r--linux-core/drm_memory.h20
-rw-r--r--linux/drmP.h17
-rw-r--r--linux/drm_drv.h3
-rw-r--r--linux/drm_memory.h20
-rw-r--r--linux/gamma_context.h5
-rw-r--r--tests/dristat.c12
8 files changed, 0 insertions, 97 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 8ebd1ec8..08f4faa8 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -447,21 +447,6 @@ typedef struct drm_lock_data {
447} drm_lock_data_t; 447} drm_lock_data_t;
448 448
449typedef struct drm_device_dma { 449typedef struct drm_device_dma {
450#if 0
451 /* Performance Counters */
452 atomic_t total_prio; /* Total DRM_DMA_PRIORITY */
453 atomic_t total_bytes; /* Total bytes DMA'd */
454 atomic_t total_dmas; /* Total DMA buffers dispatched */
455
456 atomic_t total_missed_dma; /* Missed drm_do_dma */
457 atomic_t total_missed_lock; /* Missed lock in drm_do_dma */
458 atomic_t total_missed_free; /* Missed drm_free_this_buffer */
459 atomic_t total_missed_sched;/* Missed drm_dma_schedule */
460
461 atomic_t total_tried; /* Tried next_buffer */
462 atomic_t total_hit; /* Sent next_buffer */
463 atomic_t total_lost; /* Lost interrupt */
464#endif
465 450
466 drm_buf_entry_t bufs[DRM_MAX_ORDER+1]; 451 drm_buf_entry_t bufs[DRM_MAX_ORDER+1];
467 int buf_count; 452 int buf_count;
@@ -694,8 +679,6 @@ extern int DRM(mem_info)(char *buf, char **start, off_t offset,
694extern void *DRM(alloc)(size_t size, int area); 679extern void *DRM(alloc)(size_t size, int area);
695extern void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, 680extern void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size,
696 int area); 681 int area);
697extern char *DRM(strdup)(const char *s, int area);
698extern void DRM(strfree)(const char *s, int area);
699extern void DRM(free)(void *pt, size_t size, int area); 682extern void DRM(free)(void *pt, size_t size, int area);
700extern unsigned long DRM(alloc_pages)(int order, int area); 683extern unsigned long DRM(alloc_pages)(int order, int area);
701extern void DRM(free_pages)(unsigned long address, int order, 684extern void DRM(free_pages)(unsigned long address, int order,
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index dad961f8..88d27e15 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -815,9 +815,6 @@ int DRM(release)( struct inode *inode, struct file *filp )
815 break; /* Got lock */ 815 break; /* Got lock */
816 } 816 }
817 /* Contention */ 817 /* Contention */
818#if 0
819 atomic_inc( &dev->total_sleeps );
820#endif
821 schedule(); 818 schedule();
822 if ( signal_pending( current ) ) { 819 if ( signal_pending( current ) ) {
823 retcode = -ERESTARTSYS; 820 retcode = -ERESTARTSYS;
diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h
index 22aab7f4..138de873 100644
--- a/linux-core/drm_memory.h
+++ b/linux-core/drm_memory.h
@@ -178,26 +178,6 @@ void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area)
178 return pt; 178 return pt;
179} 179}
180 180
181char *DRM(strdup)(const char *s, int area)
182{
183 char *pt;
184 int length = s ? strlen(s) : 0;
185
186 if (!(pt = DRM(alloc)(length+1, area))) return NULL;
187 strcpy(pt, s);
188 return pt;
189}
190
191void DRM(strfree)(const char *s, int area)
192{
193 unsigned int size;
194
195 if (!s) return;
196
197 size = 1 + (s ? strlen(s) : 0);
198 DRM(free)((void *)s, size, area);
199}
200
201void DRM(free)(void *pt, size_t size, int area) 181void DRM(free)(void *pt, size_t size, int area)
202{ 182{
203 int alloc_count; 183 int alloc_count;
diff --git a/linux/drmP.h b/linux/drmP.h
index 8ebd1ec8..08f4faa8 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -447,21 +447,6 @@ typedef struct drm_lock_data {
447} drm_lock_data_t; 447} drm_lock_data_t;
448 448
449typedef struct drm_device_dma { 449typedef struct drm_device_dma {
450#if 0
451 /* Performance Counters */
452 atomic_t total_prio; /* Total DRM_DMA_PRIORITY */
453 atomic_t total_bytes; /* Total bytes DMA'd */
454 atomic_t total_dmas; /* Total DMA buffers dispatched */
455
456 atomic_t total_missed_dma; /* Missed drm_do_dma */
457 atomic_t total_missed_lock; /* Missed lock in drm_do_dma */
458 atomic_t total_missed_free; /* Missed drm_free_this_buffer */
459 atomic_t total_missed_sched;/* Missed drm_dma_schedule */
460
461 atomic_t total_tried; /* Tried next_buffer */
462 atomic_t total_hit; /* Sent next_buffer */
463 atomic_t total_lost; /* Lost interrupt */
464#endif
465 450
466 drm_buf_entry_t bufs[DRM_MAX_ORDER+1]; 451 drm_buf_entry_t bufs[DRM_MAX_ORDER+1];
467 int buf_count; 452 int buf_count;
@@ -694,8 +679,6 @@ extern int DRM(mem_info)(char *buf, char **start, off_t offset,
694extern void *DRM(alloc)(size_t size, int area); 679extern void *DRM(alloc)(size_t size, int area);
695extern void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, 680extern void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size,
696 int area); 681 int area);
697extern char *DRM(strdup)(const char *s, int area);
698extern void DRM(strfree)(const char *s, int area);
699extern void DRM(free)(void *pt, size_t size, int area); 682extern void DRM(free)(void *pt, size_t size, int area);
700extern unsigned long DRM(alloc_pages)(int order, int area); 683extern unsigned long DRM(alloc_pages)(int order, int area);
701extern void DRM(free_pages)(unsigned long address, int order, 684extern void DRM(free_pages)(unsigned long address, int order,
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index dad961f8..88d27e15 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -815,9 +815,6 @@ int DRM(release)( struct inode *inode, struct file *filp )
815 break; /* Got lock */ 815 break; /* Got lock */
816 } 816 }
817 /* Contention */ 817 /* Contention */
818#if 0
819 atomic_inc( &dev->total_sleeps );
820#endif
821 schedule(); 818 schedule();
822 if ( signal_pending( current ) ) { 819 if ( signal_pending( current ) ) {
823 retcode = -ERESTARTSYS; 820 retcode = -ERESTARTSYS;
diff --git a/linux/drm_memory.h b/linux/drm_memory.h
index 22aab7f4..138de873 100644
--- a/linux/drm_memory.h
+++ b/linux/drm_memory.h
@@ -178,26 +178,6 @@ void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area)
178 return pt; 178 return pt;
179} 179}
180 180
181char *DRM(strdup)(const char *s, int area)
182{
183 char *pt;
184 int length = s ? strlen(s) : 0;
185
186 if (!(pt = DRM(alloc)(length+1, area))) return NULL;
187 strcpy(pt, s);
188 return pt;
189}
190
191void DRM(strfree)(const char *s, int area)
192{
193 unsigned int size;
194
195 if (!s) return;
196
197 size = 1 + (s ? strlen(s) : 0);
198 DRM(free)((void *)s, size, area);
199}
200
201void DRM(free)(void *pt, size_t size, int area) 181void DRM(free)(void *pt, size_t size, int area)
202{ 182{
203 int alloc_count; 183 int alloc_count;
diff --git a/linux/gamma_context.h b/linux/gamma_context.h
index 9e4b913f..2338cb38 100644
--- a/linux/gamma_context.h
+++ b/linux/gamma_context.h
@@ -143,16 +143,11 @@ int DRM(context_switch)(drm_device_t *dev, int old, int new)
143 char buf[64]; 143 char buf[64];
144 drm_queue_t *q; 144 drm_queue_t *q;
145 145
146#if 0
147 atomic_inc(&dev->total_ctx);
148#endif
149
150 if (test_and_set_bit(0, &dev->context_flag)) { 146 if (test_and_set_bit(0, &dev->context_flag)) {
151 DRM_ERROR("Reentering -- FIXME\n"); 147 DRM_ERROR("Reentering -- FIXME\n");
152 return -EBUSY; 148 return -EBUSY;
153 } 149 }
154 150
155
156 DRM_DEBUG("Context switch from %d to %d\n", old, new); 151 DRM_DEBUG("Context switch from %d to %d\n", old, new);
157 152
158 if (new >= dev->queue_count) { 153 if (new >= dev->queue_count) {
diff --git a/tests/dristat.c b/tests/dristat.c
index 47193ab4..07ab54ea 100644
--- a/tests/dristat.c
+++ b/tests/dristat.c
@@ -69,18 +69,6 @@ static void getbusid(int fd)
69 drmFreeBusid(busid); 69 drmFreeBusid(busid);
70} 70}
71 71
72#if 0
73typedef struct {
74 unsigned long offset; /* Requested physical address (0 for SAREA)*/
75 unsigned long size; /* Requested physical size (bytes) */
76 drm_map_type_t type; /* Type of memory to map */
77 drm_map_flags_t flags; /* Flags */
78 void *handle; /* User-space: "Handle" to pass to mmap */
79 /* Kernel-space: kernel-virtual address */
80 int mtrr; /* MTRR slot used */
81 /* Private data */
82} drmVmRec, *drmVmPtr;
83#endif
84 72
85static void getvm(int fd) 73static void getvm(int fd)
86{ 74{