Subversion Repositories Kolibri OS

Rev

Rev 2005 | Rev 2997 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2005 Rev 2007
Line 46... Line 46...
46
	int r;
46
	int r;
Line 47... Line 47...
47
 
47
 
Line 48... Line 48...
48
    ENTER();
48
    ENTER();
49
 
49
 
Line 50... Line 50...
50
	size = bsize;
50
	size = bsize;
Line 51... Line 51...
51
    n = 2; //1024;
51
    n = 4; //1024;
52
 
52
 
Line 97... Line 97...
97
					size / RADEON_GPU_PAGE_SIZE, fence);
97
					size / RADEON_GPU_PAGE_SIZE, fence);
Line 98... Line 98...
98
 
98
 
99
			if (r) {
99
			if (r) {
100
				goto out_cleanup;
100
				goto out_cleanup;
-
 
101
			}
-
 
102
		}
101
			}
103
 
102
			r = radeon_fence_wait(fence, false);
104
			r = radeon_fence_wait(fence, false);
103
			if (r) {
105
			if (r) {
104
				goto out_cleanup;
106
				goto out_cleanup;
105
			}
107
			}
106
			radeon_fence_unref(&fence);
108
			radeon_fence_unref(&fence);
107
		}
109
 
108
        end_jiffies = GetTimerTicks();
110
        end_jiffies = GetTimerTicks();
109
		time = end_jiffies - start_jiffies;
111
		time = end_jiffies - start_jiffies;
110
		time = jiffies_to_msecs(time);
112
		time = jiffies_to_msecs(time);
111
		if (time > 0) {
113
		if (time > 0) {
Line 126... Line 128...
126
		}
128
		}
127
		r = radeon_copy_blit(rdev, saddr, daddr, size / RADEON_GPU_PAGE_SIZE, fence);
129
		r = radeon_copy_blit(rdev, saddr, daddr, size / RADEON_GPU_PAGE_SIZE, fence);
128
		if (r) {
130
		if (r) {
129
			goto out_cleanup;
131
			goto out_cleanup;
130
		}
132
		}
-
 
133
	}
-
 
134
 
131
		r = radeon_fence_wait(fence, false);
135
		r = radeon_fence_wait(fence, false);
132
		if (r) {
136
		if (r) {
133
			goto out_cleanup;
137
			goto out_cleanup;
134
		}
138
		}
135
		radeon_fence_unref(&fence);
139
		radeon_fence_unref(&fence);
136
	}
140
 
137
    end_jiffies = GetTimerTicks();
141
    end_jiffies = GetTimerTicks();
138
	time = end_jiffies - start_jiffies;
142
	time = end_jiffies - start_jiffies;
139
	time = jiffies_to_msecs(time);
143
	time = jiffies_to_msecs(time);
140
	if (time > 0) {
144
	if (time > 0) {
141
		i = ((n * size) >> 10) / time;
145
		i = ((n * size) >> 10) / time;
Line 174... Line 178...
174
 
178
 
Line 175... Line 179...
175
}
179
}
176
 
180
 
177
void radeon_benchmark(struct radeon_device *rdev)
181
void radeon_benchmark(struct radeon_device *rdev)
178
{
182
{
179
   radeon_benchmark_move(rdev, 8192*4096, RADEON_GEM_DOMAIN_GTT,
183
   radeon_benchmark_move(rdev, 4096*4096, RADEON_GEM_DOMAIN_GTT,
180
                 RADEON_GEM_DOMAIN_VRAM);
184
                 RADEON_GEM_DOMAIN_VRAM);
181
   radeon_benchmark_move(rdev, 8192*4096, RADEON_GEM_DOMAIN_VRAM,
185
   radeon_benchmark_move(rdev, 4096*4096, RADEON_GEM_DOMAIN_VRAM,
182
                 RADEON_GEM_DOMAIN_GTT);
186
                 RADEON_GEM_DOMAIN_GTT);
183
   radeon_benchmark_move(rdev, 8192*4096, RADEON_GEM_DOMAIN_VRAM,
187
   radeon_benchmark_move(rdev, 4096*4096, RADEON_GEM_DOMAIN_VRAM,