Subversion Repositories Kolibri OS

Rev

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

Rev 1119 Rev 1120
Line 42... Line 42...
42
 *	- Barrier in gart code
42
 *	- Barrier in gart code
43
 *	- Unmappabled vram ?
43
 *	- Unmappabled vram ?
44
 *	- TESTING, TESTING, TESTING
44
 *	- TESTING, TESTING, TESTING
45
 */
45
 */
Line 46... Line 46...
46
 
46
 
47
#include "types.h"
47
#include 
Line -... Line 48...
-
 
48
#include 
-
 
49
 
48
#include "pci.h"
50
#include 
Line 49... Line 51...
49
 
51
 
50
#include "errno-base.h"
52
#include 
51
 
53
 
Line 58... Line 60...
58
extern int radeon_dynclks;
60
extern int radeon_dynclks;
59
extern int radeon_gart_size;
61
extern int radeon_gart_size;
60
extern int radeon_r4xx_atom;
62
extern int radeon_r4xx_atom;
Line 61... Line -...
61
 
-
 
62
 
63
 
63
 
64
 
64
/*
65
/*
65
 * Copy from radeon_drv.h so we don't have to include both and have conflicting
66
 * Copy from radeon_drv.h so we don't have to include both and have conflicting
66
 * symbol;
67
 * symbol;
Line 167... Line 168...
167
//	atomic_t			seq;
168
//	atomic_t			seq;
168
	uint32_t			last_seq;
169
	uint32_t			last_seq;
169
	unsigned long			count_timeout;
170
	unsigned long			count_timeout;
170
//	wait_queue_head_t		queue;
171
//	wait_queue_head_t		queue;
171
//	rwlock_t			lock;
172
//	rwlock_t			lock;
172
//	struct list_head		created;
173
	struct list_head		created;
173
//	struct list_head		emited;
174
	struct list_head		emited;
174
//	struct list_head		signaled;
175
	struct list_head		signaled;
175
};
176
};
Line 176... Line 177...
176
 
177
 
177
struct radeon_fence {
178
struct radeon_fence {
178
	struct radeon_device		*rdev;
179
	struct radeon_device		*rdev;
179
//	struct kref			kref;
180
//	struct kref			kref;
180
//	struct list_head		list;
181
	struct list_head		list;
181
	/* protected by radeon_fence.lock */
182
	/* protected by radeon_fence.lock */
182
	uint32_t			seq;
183
	uint32_t			seq;
183
	unsigned long			timeout;
184
	unsigned long			timeout;
184
	bool				emited;
185
	bool				emited;
Line 202... Line 203...
202
 * Radeon buffer.
203
 * Radeon buffer.
203
 */
204
 */
204
struct radeon_object;
205
struct radeon_object;
Line 205... Line 206...
205
 
206
 
206
struct radeon_object_list {
207
struct radeon_object_list {
207
//	struct list_head	list;
208
	struct list_head	list;
208
	struct radeon_object	*robj;
209
	struct radeon_object	*robj;
209
	uint64_t		gpu_offset;
210
	uint64_t		gpu_offset;
210
	unsigned		rdomain;
211
	unsigned		rdomain;
211
	unsigned		wdomain;
212
	unsigned		wdomain;
Line 214... Line -...
214
 
-
 
215
 
215
 
216
 
216
 
217
 
217
 
218
 
218
 
Line 253... Line 253...
253
void radeon_gart_table_vram_free(struct radeon_device *rdev);
253
void radeon_gart_table_vram_free(struct radeon_device *rdev);
254
int radeon_gart_init(struct radeon_device *rdev);
254
int radeon_gart_init(struct radeon_device *rdev);
255
void radeon_gart_fini(struct radeon_device *rdev);
255
void radeon_gart_fini(struct radeon_device *rdev);
256
void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
256
void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
257
			int pages);
257
			int pages);
258
//int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
258
int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
259
//            int pages, struct page **pagelist);
259
            int pages, u32_t *pagelist);
Line 260... Line 260...
260
 
260
 
261
 
261
 
262
/*
262
/*
Line 307... Line 307...
307
 
307
 
308
/*
308
/*
309
 * CP & ring.
309
 * CP & ring.
310
 */
310
 */
311
struct radeon_ib {
311
struct radeon_ib {
312
//	struct list_head	list;
312
	struct list_head	list;
313
	unsigned long		idx;
313
	unsigned long		idx;
314
	uint64_t		gpu_addr;
314
	uint64_t		gpu_addr;
315
	struct radeon_fence	*fence;
315
	struct radeon_fence	*fence;
316
	volatile uint32_t	*ptr;
316
	volatile uint32_t	*ptr;
317
	uint32_t		length_dw;
317
	uint32_t		length_dw;
Line 318... Line 318...
318
};
318
};
319
 
319
 
320
struct radeon_ib_pool {
320
struct radeon_ib_pool {
321
//	struct mutex		mutex;
321
//	struct mutex		mutex;
322
	struct radeon_object	*robj;
322
	struct radeon_object	*robj;
323
//	struct list_head	scheduled_ibs;
323
	struct list_head	scheduled_ibs;
324
	struct radeon_ib	ibs[RADEON_IB_POOL_SIZE];
324
	struct radeon_ib	ibs[RADEON_IB_POOL_SIZE];
325
	bool			ready;
325
	bool			ready;
Line 326... Line 326...
326
//	DECLARE_BITMAP(alloc_bm, RADEON_IB_POOL_SIZE);
326
	DECLARE_BITMAP(alloc_bm, RADEON_IB_POOL_SIZE);
327
};
327
};
328
 
328
 
Line 362... Line 362...
362
 * CS.
362
 * CS.
363
 */
363
 */
364
struct radeon_cs_reloc {
364
struct radeon_cs_reloc {
365
//	struct drm_gem_object		*gobj;
365
//	struct drm_gem_object		*gobj;
366
	struct radeon_object		*robj;
366
	struct radeon_object		*robj;
367
//	struct radeon_object_list	lobj;
367
	struct radeon_object_list	lobj;
368
	uint32_t			handle;
368
	uint32_t			handle;
369
	uint32_t			flags;
369
	uint32_t			flags;
370
};
370
};
Line 371... Line 371...
371
 
371
 
Line 386... Line 386...
386
	unsigned		idx;
386
	unsigned		idx;
387
	/* relocations */
387
	/* relocations */
388
	unsigned		nrelocs;
388
	unsigned		nrelocs;
389
	struct radeon_cs_reloc	*relocs;
389
	struct radeon_cs_reloc	*relocs;
390
	struct radeon_cs_reloc	**relocs_ptr;
390
	struct radeon_cs_reloc	**relocs_ptr;
391
//	struct list_head	validated;
391
	struct list_head	validated;
392
	/* indices of various chunks */
392
	/* indices of various chunks */
393
	int			chunk_ib_idx;
393
	int			chunk_ib_idx;
394
	int			chunk_relocs_idx;
394
	int			chunk_relocs_idx;
395
	struct radeon_ib	*ib;
395
	struct radeon_ib	*ib;
396
	void			*track;
396
	void			*track;