aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-08-20 23:21:01 -0400
committerDave Airlie <airlied@redhat.com>2009-08-21 00:20:38 -0400
commit50f153036c9d9e4ae1768d5ca9c2ad4184f7a0b7 (patch)
treef9e4946bd45ead837fa298713c77ac51374dd8e3 /drivers/gpu/drm
parent759e4f83f418f4001e724042b4c0e408d615d9ec (diff)
drm/radeon/kms: generate the safe register tables.
Previously we just made these offline and included them, but no reason we can't generate them at build time. TODO: add rs690 + r100/r200 when done. should we do rs480/rs690 no tcl version? Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/Makefile15
-rw-r--r--drivers/gpu/drm/radeon/mkregtable.c726
-rw-r--r--drivers/gpu/drm/radeon/r300.c45
-rw-r--r--drivers/gpu/drm/radeon/reg_srcs/r300728
-rw-r--r--drivers/gpu/drm/radeon/reg_srcs/rv515486
-rw-r--r--drivers/gpu/drm/radeon/rv515.c64
6 files changed, 1960 insertions, 104 deletions
diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile
index 013d38059943..8e1771889b4d 100644
--- a/drivers/gpu/drm/radeon/Makefile
+++ b/drivers/gpu/drm/radeon/Makefile
@@ -6,6 +6,21 @@ ccflags-y := -Iinclude/drm
6radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \ 6radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \
7 radeon_irq.o r300_cmdbuf.o r600_cp.o 7 radeon_irq.o r300_cmdbuf.o r600_cp.o
8 8
9hostprogs-y := mkregtable
10
11quiet_cmd_mkregtable = MKREGTABLE $@
12 cmd_mkregtable = $(obj)/mkregtable $< > $@
13
14$(obj)/rv515_reg_safe.h: $(src)/reg_srcs/rv515 $(obj)/mkregtable
15 $(call if_changed,mkregtable)
16
17$(obj)/r300_reg_safe.h: $(src)/reg_srcs/r300 $(obj)/mkregtable
18 $(call if_changed,mkregtable)
19
20$(obj)/rv515.o: $(obj)/rv515_reg_safe.h
21
22$(obj)/r300.o: $(obj)/r300_reg_safe.h
23
9radeon-$(CONFIG_DRM_RADEON_KMS) += radeon_device.o radeon_kms.o \ 24radeon-$(CONFIG_DRM_RADEON_KMS) += radeon_device.o radeon_kms.o \
10 radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \ 25 radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \
11 atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \ 26 atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \
diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c
new file mode 100644
index 000000000000..0acd1cf8c361
--- /dev/null
+++ b/drivers/gpu/drm/radeon/mkregtable.c
@@ -0,0 +1,726 @@
1/* utility to create the register check tables
2 * this includes inlined list.h safe for userspace.
3 *
4 * Copyright 2009 Jerome Glisse
5 * Copyright 2009 Red Hat Inc.
6 *
7 * Authors:
8 * Jerome Glisse
9 * Dave Airlie
10 */
11
12#include <sys/types.h>
13#include <stdlib.h>
14#include <string.h>
15#include <stdio.h>
16#include <regex.h>
17#include <libgen.h>
18
19#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
20/**
21 * container_of - cast a member of a structure out to the containing structure
22 * @ptr: the pointer to the member.
23 * @type: the type of the container struct this is embedded in.
24 * @member: the name of the member within the struct.
25 *
26 */
27#define container_of(ptr, type, member) ({ \
28 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
29 (type *)( (char *)__mptr - offsetof(type,member) );})
30
31
32
33/*
34 * Simple doubly linked list implementation.
35 *
36 * Some of the internal functions ("__xxx") are useful when
37 * manipulating whole lists rather than single entries, as
38 * sometimes we already know the next/prev entries and we can
39 * generate better code by using them directly rather than
40 * using the generic single-entry routines.
41 */
42
43struct list_head {
44 struct list_head *next, *prev;
45};
46
47#define LIST_HEAD_INIT(name) { &(name), &(name) }
48
49#define LIST_HEAD(name) \
50 struct list_head name = LIST_HEAD_INIT(name)
51
52static inline void INIT_LIST_HEAD(struct list_head *list)
53{
54 list->next = list;
55 list->prev = list;
56}
57
58/*
59 * Insert a new entry between two known consecutive entries.
60 *
61 * This is only for internal list manipulation where we know
62 * the prev/next entries already!
63 */
64#ifndef CONFIG_DEBUG_LIST
65static inline void __list_add(struct list_head *new,
66 struct list_head *prev,
67 struct list_head *next)
68{
69 next->prev = new;
70 new->next = next;
71 new->prev = prev;
72 prev->next = new;
73}
74#else
75extern void __list_add(struct list_head *new,
76 struct list_head *prev,
77 struct list_head *next);
78#endif
79
80/**
81 * list_add - add a new entry
82 * @new: new entry to be added
83 * @head: list head to add it after
84 *
85 * Insert a new entry after the specified head.
86 * This is good for implementing stacks.
87 */
88static inline void list_add(struct list_head *new, struct list_head *head)
89{
90 __list_add(new, head, head->next);
91}
92
93
94/**
95 * list_add_tail - add a new entry
96 * @new: new entry to be added
97 * @head: list head to add it before
98 *
99 * Insert a new entry before the specified head.
100 * This is useful for implementing queues.
101 */
102static inline void list_add_tail(struct list_head *new, struct list_head *head)
103{
104 __list_add(new, head->prev, head);
105}
106
107/*
108 * Delete a list entry by making the prev/next entries
109 * point to each other.
110 *
111 * This is only for internal list manipulation where we know
112 * the prev/next entries already!
113 */
114static inline void __list_del(struct list_head * prev, struct list_head * next)
115{
116 next->prev = prev;
117 prev->next = next;
118}
119
120/**
121 * list_del - deletes entry from list.
122 * @entry: the element to delete from the list.
123 * Note: list_empty() on entry does not return true after this, the entry is
124 * in an undefined state.
125 */
126#ifndef CONFIG_DEBUG_LIST
127static inline void list_del(struct list_head *entry)
128{
129 __list_del(entry->prev, entry->next);
130 entry->next = (void*)0xDEADBEEF;
131 entry->prev = (void*)0xBEEFDEAD;
132}
133#else
134extern void list_del(struct list_head *entry);
135#endif
136
137/**
138 * list_replace - replace old entry by new one
139 * @old : the element to be replaced
140 * @new : the new element to insert
141 *
142 * If @old was empty, it will be overwritten.
143 */
144static inline void list_replace(struct list_head *old,
145 struct list_head *new)
146{
147 new->next = old->next;
148 new->next->prev = new;
149 new->prev = old->prev;
150 new->prev->next = new;
151}
152
153static inline void list_replace_init(struct list_head *old,
154 struct list_head *new)
155{
156 list_replace(old, new);
157 INIT_LIST_HEAD(old);
158}
159
160/**
161 * list_del_init - deletes entry from list and reinitialize it.
162 * @entry: the element to delete from the list.
163 */
164static inline void list_del_init(struct list_head *entry)
165{
166 __list_del(entry->prev, entry->next);
167 INIT_LIST_HEAD(entry);
168}
169
170/**
171 * list_move - delete from one list and add as another's head
172 * @list: the entry to move
173 * @head: the head that will precede our entry
174 */
175static inline void list_move(struct list_head *list, struct list_head *head)
176{
177 __list_del(list->prev, list->next);
178 list_add(list, head);
179}
180
181/**
182 * list_move_tail - delete from one list and add as another's tail
183 * @list: the entry to move
184 * @head: the head that will follow our entry
185 */
186static inline void list_move_tail(struct list_head *list,
187 struct list_head *head)
188{
189 __list_del(list->prev, list->next);
190 list_add_tail(list, head);
191}
192
193/**
194 * list_is_last - tests whether @list is the last entry in list @head
195 * @list: the entry to test
196 * @head: the head of the list
197 */
198static inline int list_is_last(const struct list_head *list,
199 const struct list_head *head)
200{
201 return list->next == head;
202}
203
204/**
205 * list_empty - tests whether a list is empty
206 * @head: the list to test.
207 */
208static inline int list_empty(const struct list_head *head)
209{
210 return head->next == head;
211}
212
213/**
214 * list_empty_careful - tests whether a list is empty and not being modified
215 * @head: the list to test
216 *
217 * Description:
218 * tests whether a list is empty _and_ checks that no other CPU might be
219 * in the process of modifying either member (next or prev)
220 *
221 * NOTE: using list_empty_careful() without synchronization
222 * can only be safe if the only activity that can happen
223 * to the list entry is list_del_init(). Eg. it cannot be used
224 * if another CPU could re-list_add() it.
225 */
226static inline int list_empty_careful(const struct list_head *head)
227{
228 struct list_head *next = head->next;
229 return (next == head) && (next == head->prev);
230}
231
232/**
233 * list_is_singular - tests whether a list has just one entry.
234 * @head: the list to test.
235 */
236static inline int list_is_singular(const struct list_head *head)
237{
238 return !list_empty(head) && (head->next == head->prev);
239}
240
241static inline void __list_cut_position(struct list_head *list,
242 struct list_head *head, struct list_head *entry)
243{
244 struct list_head *new_first = entry->next;
245 list->next = head->next;
246 list->next->prev = list;
247 list->prev = entry;
248 entry->next = list;
249 head->next = new_first;
250 new_first->prev = head;
251}
252
253/**
254 * list_cut_position - cut a list into two
255 * @list: a new list to add all removed entries
256 * @head: a list with entries
257 * @entry: an entry within head, could be the head itself
258 * and if so we won't cut the list
259 *
260 * This helper moves the initial part of @head, up to and
261 * including @entry, from @head to @list. You should
262 * pass on @entry an element you know is on @head. @list
263 * should be an empty list or a list you do not care about
264 * losing its data.
265 *
266 */
267static inline void list_cut_position(struct list_head *list,
268 struct list_head *head, struct list_head *entry)
269{
270 if (list_empty(head))
271 return;
272 if (list_is_singular(head) &&
273 (head->next != entry && head != entry))
274 return;
275 if (entry == head)
276 INIT_LIST_HEAD(list);
277 else
278 __list_cut_position(list, head, entry);
279}
280
281static inline void __list_splice(const struct list_head *list,
282 struct list_head *prev,
283 struct list_head *next)
284{
285 struct list_head *first = list->next;
286 struct list_head *last = list->prev;
287
288 first->prev = prev;
289 prev->next = first;
290
291 last->next = next;
292 next->prev = last;
293}
294
295/**
296 * list_splice - join two lists, this is designed for stacks
297 * @list: the new list to add.
298 * @head: the place to add it in the first list.
299 */
300static inline void list_splice(const struct list_head *list,
301 struct list_head *head)
302{
303 if (!list_empty(list))
304 __list_splice(list, head, head->next);
305}
306
307/**
308 * list_splice_tail - join two lists, each list being a queue
309 * @list: the new list to add.
310 * @head: the place to add it in the first list.
311 */
312static inline void list_splice_tail(struct list_head *list,
313 struct list_head *head)
314{
315 if (!list_empty(list))
316 __list_splice(list, head->prev, head);
317}
318
319/**
320 * list_splice_init - join two lists and reinitialise the emptied list.
321 * @list: the new list to add.
322 * @head: the place to add it in the first list.
323 *
324 * The list at @list is reinitialised
325 */
326static inline void list_splice_init(struct list_head *list,
327 struct list_head *head)
328{
329 if (!list_empty(list)) {
330 __list_splice(list, head, head->next);
331 INIT_LIST_HEAD(list);
332 }
333}
334
335/**
336 * list_splice_tail_init - join two lists and reinitialise the emptied list
337 * @list: the new list to add.
338 * @head: the place to add it in the first list.
339 *
340 * Each of the lists is a queue.
341 * The list at @list is reinitialised
342 */
343static inline void list_splice_tail_init(struct list_head *list,
344 struct list_head *head)
345{
346 if (!list_empty(list)) {
347 __list_splice(list, head->prev, head);
348 INIT_LIST_HEAD(list);
349 }
350}
351
352/**
353 * list_entry - get the struct for this entry
354 * @ptr: the &struct list_head pointer.
355 * @type: the type of the struct this is embedded in.
356 * @member: the name of the list_struct within the struct.
357 */
358#define list_entry(ptr, type, member) \
359 container_of(ptr, type, member)
360
361/**
362 * list_first_entry - get the first element from a list
363 * @ptr: the list head to take the element from.
364 * @type: the type of the struct this is embedded in.
365 * @member: the name of the list_struct within the struct.
366 *
367 * Note, that list is expected to be not empty.
368 */
369#define list_first_entry(ptr, type, member) \
370 list_entry((ptr)->next, type, member)
371
372/**
373 * list_for_each - iterate over a list
374 * @pos: the &struct list_head to use as a loop cursor.
375 * @head: the head for your list.
376 */
377#define list_for_each(pos, head) \
378 for (pos = (head)->next; prefetch(pos->next), pos != (head); \
379 pos = pos->next)
380
381/**
382 * __list_for_each - iterate over a list
383 * @pos: the &struct list_head to use as a loop cursor.
384 * @head: the head for your list.
385 *
386 * This variant differs from list_for_each() in that it's the
387 * simplest possible list iteration code, no prefetching is done.
388 * Use this for code that knows the list to be very short (empty
389 * or 1 entry) most of the time.
390 */
391#define __list_for_each(pos, head) \
392 for (pos = (head)->next; pos != (head); pos = pos->next)
393
394/**
395 * list_for_each_prev - iterate over a list backwards
396 * @pos: the &struct list_head to use as a loop cursor.
397 * @head: the head for your list.
398 */
399#define list_for_each_prev(pos, head) \
400 for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \
401 pos = pos->prev)
402
403/**
404 * list_for_each_safe - iterate over a list safe against removal of list entry
405 * @pos: the &struct list_head to use as a loop cursor.
406 * @n: another &struct list_head to use as temporary storage
407 * @head: the head for your list.
408 */
409#define list_for_each_safe(pos, n, head) \
410 for (pos = (head)->next, n = pos->next; pos != (head); \
411 pos = n, n = pos->next)
412
413/**
414 * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
415 * @pos: the &struct list_head to use as a loop cursor.
416 * @n: another &struct list_head to use as temporary storage
417 * @head: the head for your list.
418 */
419#define list_for_each_prev_safe(pos, n, head) \
420 for (pos = (head)->prev, n = pos->prev; \
421 prefetch(pos->prev), pos != (head); \
422 pos = n, n = pos->prev)
423
424/**
425 * list_for_each_entry - iterate over list of given type
426 * @pos: the type * to use as a loop cursor.
427 * @head: the head for your list.
428 * @member: the name of the list_struct within the struct.
429 */
430#define list_for_each_entry(pos, head, member) \
431 for (pos = list_entry((head)->next, typeof(*pos), member); \
432 &pos->member != (head); \
433 pos = list_entry(pos->member.next, typeof(*pos), member))
434
435/**
436 * list_for_each_entry_reverse - iterate backwards over list of given type.
437 * @pos: the type * to use as a loop cursor.
438 * @head: the head for your list.
439 * @member: the name of the list_struct within the struct.
440 */
441#define list_for_each_entry_reverse(pos, head, member) \
442 for (pos = list_entry((head)->prev, typeof(*pos), member); \
443 prefetch(pos->member.prev), &pos->member != (head); \
444 pos = list_entry(pos->member.prev, typeof(*pos), member))
445
446/**
447 * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
448 * @pos: the type * to use as a start point
449 * @head: the head of the list
450 * @member: the name of the list_struct within the struct.
451 *
452 * Prepares a pos entry for use as a start point in list_for_each_entry_continue().
453 */
454#define list_prepare_entry(pos, head, member) \
455 ((pos) ? : list_entry(head, typeof(*pos), member))
456
457/**
458 * list_for_each_entry_continue - continue iteration over list of given type
459 * @pos: the type * to use as a loop cursor.
460 * @head: the head for your list.
461 * @member: the name of the list_struct within the struct.
462 *
463 * Continue to iterate over list of given type, continuing after
464 * the current position.
465 */
466#define list_for_each_entry_continue(pos, head, member) \
467 for (pos = list_entry(pos->member.next, typeof(*pos), member); \
468 prefetch(pos->member.next), &pos->member != (head); \
469 pos = list_entry(pos->member.next, typeof(*pos), member))
470
471/**
472 * list_for_each_entry_continue_reverse - iterate backwards from the given point
473 * @pos: the type * to use as a loop cursor.
474 * @head: the head for your list.
475 * @member: the name of the list_struct within the struct.
476 *
477 * Start to iterate over list of given type backwards, continuing after
478 * the current position.
479 */
480#define list_for_each_entry_continue_reverse(pos, head, member) \
481 for (pos = list_entry(pos->member.prev, typeof(*pos), member); \
482 prefetch(pos->member.prev), &pos->member != (head); \
483 pos = list_entry(pos->member.prev, typeof(*pos), member))
484
485/**
486 * list_for_each_entry_from - iterate over list of given type from the current point
487 * @pos: the type * to use as a loop cursor.
488 * @head: the head for your list.
489 * @member: the name of the list_struct within the struct.
490 *
491 * Iterate over list of given type, continuing from current position.
492 */
493#define list_for_each_entry_from(pos, head, member) \
494 for (; prefetch(pos->member.next), &pos->member != (head); \
495 pos = list_entry(pos->member.next, typeof(*pos), member))
496
497/**
498 * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
499 * @pos: the type * to use as a loop cursor.
500 * @n: another type * to use as temporary storage
501 * @head: the head for your list.
502 * @member: the name of the list_struct within the struct.
503 */
504#define list_for_each_entry_safe(pos, n, head, member) \
505 for (pos = list_entry((head)->next, typeof(*pos), member), \
506 n = list_entry(pos->member.next, typeof(*pos), member); \
507 &pos->member != (head); \
508 pos = n, n = list_entry(n->member.next, typeof(*n), member))
509
510/**
511 * list_for_each_entry_safe_continue
512 * @pos: the type * to use as a loop cursor.
513 * @n: another type * to use as temporary storage
514 * @head: the head for your list.
515 * @member: the name of the list_struct within the struct.
516 *
517 * Iterate over list of given type, continuing after current point,
518 * safe against removal of list entry.
519 */
520#define list_for_each_entry_safe_continue(pos, n, head, member) \
521 for (pos = list_entry(pos->member.next, typeof(*pos), member), \
522 n = list_entry(pos->member.next, typeof(*pos), member); \
523 &pos->member != (head); \
524 pos = n, n = list_entry(n->member.next, typeof(*n), member))
525
526/**
527 * list_for_each_entry_safe_from
528 * @pos: the type * to use as a loop cursor.
529 * @n: another type * to use as temporary storage
530 * @head: the head for your list.
531 * @member: the name of the list_struct within the struct.
532 *
533 * Iterate over list of given type from current point, safe against
534 * removal of list entry.
535 */
536#define list_for_each_entry_safe_from(pos, n, head, member) \
537 for (n = list_entry(pos->member.next, typeof(*pos), member); \
538 &pos->member != (head); \
539 pos = n, n = list_entry(n->member.next, typeof(*n), member))
540
541/**
542 * list_for_each_entry_safe_reverse
543 * @pos: the type * to use as a loop cursor.
544 * @n: another type * to use as temporary storage
545 * @head: the head for your list.
546 * @member: the name of the list_struct within the struct.
547 *
548 * Iterate backwards over list of given type, safe against removal
549 * of list entry.
550 */
551#define list_for_each_entry_safe_reverse(pos, n, head, member) \
552 for (pos = list_entry((head)->prev, typeof(*pos), member), \
553 n = list_entry(pos->member.prev, typeof(*pos), member); \
554 &pos->member != (head); \
555 pos = n, n = list_entry(n->member.prev, typeof(*n), member))
556
557struct offset {
558 struct list_head list;
559 unsigned offset;
560};
561
562struct table {
563 struct list_head offsets;
564 unsigned offset_max;
565 unsigned nentry;
566 unsigned *table;
567 char *gpu_prefix;
568};
569
570struct offset* offset_new(unsigned o)
571{
572 struct offset *offset;
573
574 offset = (struct offset*)malloc(sizeof(struct offset));
575 if (offset) {
576 INIT_LIST_HEAD(&offset->list);
577 offset->offset = o;
578 }
579 return offset;
580}
581
582void table_offset_add(struct table *t, struct offset *offset)
583{
584 list_add_tail(&offset->list, &t->offsets);
585}
586
587void table_init(struct table *t)
588{
589 INIT_LIST_HEAD(&t->offsets);
590 t->offset_max = 0;
591 t->nentry = 0;
592 t->table = NULL;
593}
594
595void table_print(struct table *t)
596{
597 unsigned nlloop, i, j, n, c, id;
598
599 nlloop = (t->nentry + 3) / 4;
600 c = t->nentry;
601 printf("static const unsigned %s_reg_safe_bm[%d] = {\n", t->gpu_prefix, t->nentry);
602 for(i = 0, id = 0; i < nlloop; i++) {
603 n = 4;
604 if (n > c) {
605 n = c;
606 }
607 c -= n;
608 for(j = 0; j < n; j++) {
609 if (j == 0) printf("\t");
610 else printf(" ");
611 printf("0x%08X,", t->table[id++]);
612 }
613 printf("\n");
614 }
615 printf("};\n");
616}
617
618int table_build(struct table *t)
619{
620 struct offset *offset;
621 unsigned i, m;
622
623 t->nentry = ((t->offset_max >> 2) + 31) / 32;
624 t->table = (unsigned*)malloc(sizeof(unsigned) * t->nentry);
625 if (t->table == NULL) {
626 return -1;
627 }
628 memset(t->table, 0xff, sizeof(unsigned) * t->nentry);
629 list_for_each_entry(offset, &t->offsets, list) {
630 i = (offset->offset >> 2) / 32;
631 m = (offset->offset >> 2) & 31;
632 m = 1 << m;
633 t->table[i] ^= m;
634 }
635 return 0;
636}
637
638static char gpu_name[10];
639int parser_auth(struct table *t, const char *filename)
640{
641 FILE *file;
642 regex_t mask_rex;
643 regmatch_t match[4];
644 char buf[1024];
645 size_t end;
646 int len;
647 int done = 0;
648 int r;
649 unsigned o;
650 struct offset *offset;
651 char last_reg_s[10];
652 int last_reg;
653
654 if (regcomp(&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
655 fprintf(stderr, "Failed to compile regular expression\n");
656 return -1;
657 }
658 file = fopen(filename, "r");
659 if (file == NULL) {
660 fprintf(stderr, "Failed to open: %s\n", filename);
661 return -1;
662 }
663 fseek(file, 0, SEEK_END);
664 end = ftell(file);
665 fseek(file, 0, SEEK_SET);
666
667 /* get header */
668 if (fgets(buf, 1024, file) == NULL)
669 return -1;
670
671 /* first line will contain the last register
672 * and gpu name */
673 sscanf(buf, "%s %s", gpu_name, last_reg_s);
674 t->gpu_prefix = gpu_name;
675 last_reg = strtol(last_reg_s, NULL, 16);
676
677 do {
678 if (fgets(buf, 1024, file) == NULL)
679 return -1;
680 len = strlen(buf);
681 if (ftell(file) == end) {
682 done = 1;
683 }
684 if (len) {
685 r = regexec(&mask_rex, buf, 4, match, 0);
686 if (r == REG_NOMATCH) {
687 } else if (r) {
688 fprintf(stderr, "Error matching regular expression %d in %s\n",
689 r, filename);
690 return -1;
691 } else {
692 buf[match[0].rm_eo] = 0;
693 buf[match[1].rm_eo] = 0;
694 buf[match[2].rm_eo] = 0;
695 o = strtol(&buf[match[1].rm_so], NULL, 16);
696 offset = offset_new(o);
697 table_offset_add(t, offset);
698 if (o > t->offset_max) {
699 t->offset_max = o;
700 }
701 }
702 }
703 } while (!done);
704 fclose(file);
705 if (t->offset_max < last_reg)
706 t->offset_max = last_reg;
707 return table_build(t);
708}
709
710int main(int argc, char *argv[])
711{
712 struct table t;
713
714 if (argc != 2) {
715 fprintf(stderr, "Usage: %s <authfile>\n",
716 argv[0]);
717 exit(1);
718 }
719 table_init(&t);
720 if (parser_auth(&t, argv[1])) {
721 fprintf(stderr, "Failed to parse file %s\n", argv[1]);
722 return -1;
723 }
724 table_print(&t);
725 return 0;
726}
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index c47579dcafa1..482d6b296b74 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -33,6 +33,8 @@
33#include "radeon_drm.h" 33#include "radeon_drm.h"
34#include "radeon_share.h" 34#include "radeon_share.h"
35 35
36#include "r300_reg_safe.h"
37
36/* r300,r350,rv350,rv370,rv380 depends on : */ 38/* r300,r350,rv350,rv370,rv380 depends on : */
37void r100_hdp_reset(struct radeon_device *rdev); 39void r100_hdp_reset(struct radeon_device *rdev);
38int r100_cp_reset(struct radeon_device *rdev); 40int r100_cp_reset(struct radeon_device *rdev);
@@ -953,49 +955,6 @@ static inline void r300_cs_track_clear(struct r300_cs_track *track)
953 } 955 }
954} 956}
955 957
956static const unsigned r300_reg_safe_bm[159] = {
957 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
958 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
959 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
960 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
961 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
962 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
963 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
964 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
965 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
966 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
967 0x17FF1FFF, 0xFFFFFFFC, 0xFFFFFFFF, 0xFF30FFBF,
968 0xFFFFFFF8, 0xC3E6FFFF, 0xFFFFF6DF, 0xFFFFFFFF,
969 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
970 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
971 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFF03F,
972 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
973 0xFFFFFFFF, 0xFFFFEFCE, 0xF00EBFFF, 0x007C0000,
974 0xF0000078, 0xFF000009, 0xFFFFFFFF, 0xFFFFFFFF,
975 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
976 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
977 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
978 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
979 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
980 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
981 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
982 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
983 0xFFFFF7FF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
984 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
985 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
986 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
987 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
988 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
989 0xFFFFFC78, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFF,
990 0x38FF8F50, 0xFFF88082, 0xF000000C, 0xFAE009FF,
991 0x0000FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000,
992 0x00000000, 0x0000C100, 0x00000000, 0x00000000,
993 0x00000000, 0x00000000, 0x00000000, 0x00000000,
994 0x00000000, 0xFFFF0000, 0xFFFFFFFF, 0xFF80FFFF,
995 0x00000000, 0x00000000, 0x00000000, 0x00000000,
996 0x0003FC01, 0xFFFFFFF8, 0xFE800B19,
997};
998
999static int r300_packet0_check(struct radeon_cs_parser *p, 958static int r300_packet0_check(struct radeon_cs_parser *p,
1000 struct radeon_cs_packet *pkt, 959 struct radeon_cs_packet *pkt,
1001 unsigned idx, unsigned reg) 960 unsigned idx, unsigned reg)
diff --git a/drivers/gpu/drm/radeon/reg_srcs/r300 b/drivers/gpu/drm/radeon/reg_srcs/r300
new file mode 100644
index 000000000000..b4bd5b64fcba
--- /dev/null
+++ b/drivers/gpu/drm/radeon/reg_srcs/r300
@@ -0,0 +1,728 @@
1r300 0x4f60
20x1434 SRC_Y_X
30x1438 DST_Y_X
40x143C DST_HEIGHT_WIDTH
50x146C DP_GUI_MASTER_CNTL
60x1474 BRUSH_Y_X
70x1478 DP_BRUSH_BKGD_CLR
80x147C DP_BRUSH_FRGD_CLR
90x1480 BRUSH_DATA0
100x1484 BRUSH_DATA1
110x1598 DST_WIDTH_HEIGHT
120x15C0 CLR_CMP_CNTL
130x15C4 CLR_CMP_CLR_SRC
140x15C8 CLR_CMP_CLR_DST
150x15CC CLR_CMP_MSK
160x15D8 DP_SRC_FRGD_CLR
170x15DC DP_SRC_BKGD_CLR
180x1600 DST_LINE_START
190x1604 DST_LINE_END
200x1608 DST_LINE_PATCOUNT
210x16C0 DP_CNTL
220x16CC DP_WRITE_MSK
230x16D0 DP_CNTL_XDIR_YDIR_YMAJOR
240x16E8 DEFAULT_SC_BOTTOM_RIGHT
250x16EC SC_TOP_LEFT
260x16F0 SC_BOTTOM_RIGHT
270x16F4 SRC_SC_BOTTOM_RIGHT
280x1714 DSTCACHE_CTLSTAT
290x1720 WAIT_UNTIL
300x172C RBBM_GUICNTL
310x1D98 VAP_VPORT_XSCALE
320x1D9C VAP_VPORT_XOFFSET
330x1DA0 VAP_VPORT_YSCALE
340x1DA4 VAP_VPORT_YOFFSET
350x1DA8 VAP_VPORT_ZSCALE
360x1DAC VAP_VPORT_ZOFFSET
370x2080 VAP_CNTL
380x2090 VAP_OUT_VTX_FMT_0
390x2094 VAP_OUT_VTX_FMT_1
400x20B0 VAP_VTE_CNTL
410x2138 VAP_VF_MIN_VTX_INDX
420x2140 VAP_CNTL_STATUS
430x2150 VAP_PROG_STREAM_CNTL_0
440x2154 VAP_PROG_STREAM_CNTL_1
450x2158 VAP_PROG_STREAM_CNTL_2
460x215C VAP_PROG_STREAM_CNTL_3
470x2160 VAP_PROG_STREAM_CNTL_4
480x2164 VAP_PROG_STREAM_CNTL_5
490x2168 VAP_PROG_STREAM_CNTL_6
500x216C VAP_PROG_STREAM_CNTL_7
510x2180 VAP_VTX_STATE_CNTL
520x2184 VAP_VSM_VTX_ASSM
530x2188 VAP_VTX_STATE_IND_REG_0
540x218C VAP_VTX_STATE_IND_REG_1
550x2190 VAP_VTX_STATE_IND_REG_2
560x2194 VAP_VTX_STATE_IND_REG_3
570x2198 VAP_VTX_STATE_IND_REG_4
580x219C VAP_VTX_STATE_IND_REG_5
590x21A0 VAP_VTX_STATE_IND_REG_6
600x21A4 VAP_VTX_STATE_IND_REG_7
610x21A8 VAP_VTX_STATE_IND_REG_8
620x21AC VAP_VTX_STATE_IND_REG_9
630x21B0 VAP_VTX_STATE_IND_REG_10
640x21B4 VAP_VTX_STATE_IND_REG_11
650x21B8 VAP_VTX_STATE_IND_REG_12
660x21BC VAP_VTX_STATE_IND_REG_13
670x21C0 VAP_VTX_STATE_IND_REG_14
680x21C4 VAP_VTX_STATE_IND_REG_15
690x21DC VAP_PSC_SGN_NORM_CNTL
700x21E0 VAP_PROG_STREAM_CNTL_EXT_0
710x21E4 VAP_PROG_STREAM_CNTL_EXT_1
720x21E8 VAP_PROG_STREAM_CNTL_EXT_2
730x21EC VAP_PROG_STREAM_CNTL_EXT_3
740x21F0 VAP_PROG_STREAM_CNTL_EXT_4
750x21F4 VAP_PROG_STREAM_CNTL_EXT_5
760x21F8 VAP_PROG_STREAM_CNTL_EXT_6
770x21FC VAP_PROG_STREAM_CNTL_EXT_7
780x2200 VAP_PVS_VECTOR_INDX_REG
790x2204 VAP_PVS_VECTOR_DATA_REG
800x2208 VAP_PVS_VECTOR_DATA_REG_128
810x221C VAP_CLIP_CNTL
820x2220 VAP_GB_VERT_CLIP_ADJ
830x2224 VAP_GB_VERT_DISC_ADJ
840x2228 VAP_GB_HORZ_CLIP_ADJ
850x222C VAP_GB_HORZ_DISC_ADJ
860x2230 VAP_PVS_FLOW_CNTL_ADDRS_0
870x2234 VAP_PVS_FLOW_CNTL_ADDRS_1
880x2238 VAP_PVS_FLOW_CNTL_ADDRS_2
890x223C VAP_PVS_FLOW_CNTL_ADDRS_3
900x2240 VAP_PVS_FLOW_CNTL_ADDRS_4
910x2244 VAP_PVS_FLOW_CNTL_ADDRS_5
920x2248 VAP_PVS_FLOW_CNTL_ADDRS_6
930x224C VAP_PVS_FLOW_CNTL_ADDRS_7
940x2250 VAP_PVS_FLOW_CNTL_ADDRS_8
950x2254 VAP_PVS_FLOW_CNTL_ADDRS_9
960x2258 VAP_PVS_FLOW_CNTL_ADDRS_10
970x225C VAP_PVS_FLOW_CNTL_ADDRS_11
980x2260 VAP_PVS_FLOW_CNTL_ADDRS_12
990x2264 VAP_PVS_FLOW_CNTL_ADDRS_13
1000x2268 VAP_PVS_FLOW_CNTL_ADDRS_14
1010x226C VAP_PVS_FLOW_CNTL_ADDRS_15
1020x2284 VAP_PVS_STATE_FLUSH_REG
1030x2288 VAP_PVS_VTX_TIMEOUT_REG
1040x2290 VAP_PVS_FLOW_CNTL_LOOP_INDEX_0
1050x2294 VAP_PVS_FLOW_CNTL_LOOP_INDEX_1
1060x2298 VAP_PVS_FLOW_CNTL_LOOP_INDEX_2
1070x229C VAP_PVS_FLOW_CNTL_LOOP_INDEX_3
1080x22A0 VAP_PVS_FLOW_CNTL_LOOP_INDEX_4
1090x22A4 VAP_PVS_FLOW_CNTL_LOOP_INDEX_5
1100x22A8 VAP_PVS_FLOW_CNTL_LOOP_INDEX_6
1110x22AC VAP_PVS_FLOW_CNTL_LOOP_INDEX_7
1120x22B0 VAP_PVS_FLOW_CNTL_LOOP_INDEX_8
1130x22B4 VAP_PVS_FLOW_CNTL_LOOP_INDEX_9
1140x22B8 VAP_PVS_FLOW_CNTL_LOOP_INDEX_10
1150x22BC VAP_PVS_FLOW_CNTL_LOOP_INDEX_11
1160x22C0 VAP_PVS_FLOW_CNTL_LOOP_INDEX_12
1170x22C4 VAP_PVS_FLOW_CNTL_LOOP_INDEX_13
1180x22C8 VAP_PVS_FLOW_CNTL_LOOP_INDEX_14
1190x22CC VAP_PVS_FLOW_CNTL_LOOP_INDEX_15
1200x22D0 VAP_PVS_CODE_CNTL_0
1210x22D4 VAP_PVS_CONST_CNTL
1220x22D8 VAP_PVS_CODE_CNTL_1
1230x22DC VAP_PVS_FLOW_CNTL_OPC
1240x342C RB2D_DSTCACHE_CTLSTAT
1250x4000 GB_VAP_RASTER_VTX_FMT_0
1260x4004 GB_VAP_RASTER_VTX_FMT_1
1270x4008 GB_ENABLE
1280x401C GB_SELECT
1290x4020 GB_AA_CONFIG
1300x4024 GB_FIFO_SIZE
1310x4100 TX_INVALTAGS
1320x4200 GA_POINT_S0
1330x4204 GA_POINT_T0
1340x4208 GA_POINT_S1
1350x420C GA_POINT_T1
1360x4214 GA_TRIANGLE_STIPPLE
1370x421C GA_POINT_SIZE
1380x4230 GA_POINT_MINMAX
1390x4234 GA_LINE_CNTL
1400x4238 GA_LINE_STIPPLE_CONFIG
1410x4260 GA_LINE_STIPPLE_VALUE
1420x4264 GA_LINE_S0
1430x4268 GA_LINE_S1
1440x4278 GA_COLOR_CONTROL
1450x427C GA_SOLID_RG
1460x4280 GA_SOLID_BA
1470x4288 GA_POLY_MODE
1480x428C GA_ROUND_MODE
1490x4290 GA_OFFSET
1500x4294 GA_FOG_SCALE
1510x4298 GA_FOG_OFFSET
1520x42A0 SU_TEX_WRAP
1530x42A4 SU_POLY_OFFSET_FRONT_SCALE
1540x42A8 SU_POLY_OFFSET_FRONT_OFFSET
1550x42AC SU_POLY_OFFSET_BACK_SCALE
1560x42B0 SU_POLY_OFFSET_BACK_OFFSET
1570x42B4 SU_POLY_OFFSET_ENABLE
1580x42B8 SU_CULL_MODE
1590x42C0 SU_DEPTH_SCALE
1600x42C4 SU_DEPTH_OFFSET
1610x42C8 SU_REG_DEST
1620x4300 RS_COUNT
1630x4304 RS_INST_COUNT
1640x4310 RS_IP_0
1650x4314 RS_IP_1
1660x4318 RS_IP_2
1670x431C RS_IP_3
1680x4320 RS_IP_4
1690x4324 RS_IP_5
1700x4328 RS_IP_6
1710x432C RS_IP_7
1720x4330 RS_INST_0
1730x4334 RS_INST_1
1740x4338 RS_INST_2
1750x433C RS_INST_3
1760x4340 RS_INST_4
1770x4344 RS_INST_5
1780x4348 RS_INST_6
1790x434C RS_INST_7
1800x4350 RS_INST_8
1810x4354 RS_INST_9
1820x4358 RS_INST_10
1830x435C RS_INST_11
1840x4360 RS_INST_12
1850x4364 RS_INST_13
1860x4368 RS_INST_14
1870x436C RS_INST_15
1880x43A4 SC_HYPERZ_EN
1890x43A8 SC_EDGERULE
1900x43B0 SC_CLIP_0_A
1910x43B4 SC_CLIP_0_B
1920x43B8 SC_CLIP_1_A
1930x43BC SC_CLIP_1_B
1940x43C0 SC_CLIP_2_A
1950x43C4 SC_CLIP_2_B
1960x43C8 SC_CLIP_3_A
1970x43CC SC_CLIP_3_B
1980x43D0 SC_CLIP_RULE
1990x43E0 SC_SCISSOR0
2000x43E8 SC_SCREENDOOR
2010x4440 TX_FILTER1_0
2020x4444 TX_FILTER1_1
2030x4448 TX_FILTER1_2
2040x444C TX_FILTER1_3
2050x4450 TX_FILTER1_4
2060x4454 TX_FILTER1_5
2070x4458 TX_FILTER1_6
2080x445C TX_FILTER1_7
2090x4460 TX_FILTER1_8
2100x4464 TX_FILTER1_9
2110x4468 TX_FILTER1_10
2120x446C TX_FILTER1_11
2130x4470 TX_FILTER1_12
2140x4474 TX_FILTER1_13
2150x4478 TX_FILTER1_14
2160x447C TX_FILTER1_15
2170x4580 TX_CHROMA_KEY_0
2180x4584 TX_CHROMA_KEY_1
2190x4588 TX_CHROMA_KEY_2
2200x458C TX_CHROMA_KEY_3
2210x4590 TX_CHROMA_KEY_4
2220x4594 TX_CHROMA_KEY_5
2230x4598 TX_CHROMA_KEY_6
2240x459C TX_CHROMA_KEY_7
2250x45A0 TX_CHROMA_KEY_8
2260x45A4 TX_CHROMA_KEY_9
2270x45A8 TX_CHROMA_KEY_10
2280x45AC TX_CHROMA_KEY_11
2290x45B0 TX_CHROMA_KEY_12
2300x45B4 TX_CHROMA_KEY_13
2310x45B8 TX_CHROMA_KEY_14
2320x45BC TX_CHROMA_KEY_15
2330x45C0 TX_BORDER_COLOR_0
2340x45C4 TX_BORDER_COLOR_1
2350x45C8 TX_BORDER_COLOR_2
2360x45CC TX_BORDER_COLOR_3
2370x45D0 TX_BORDER_COLOR_4
2380x45D4 TX_BORDER_COLOR_5
2390x45D8 TX_BORDER_COLOR_6
2400x45DC TX_BORDER_COLOR_7
2410x45E0 TX_BORDER_COLOR_8
2420x45E4 TX_BORDER_COLOR_9
2430x45E8 TX_BORDER_COLOR_10
2440x45EC TX_BORDER_COLOR_11
2450x45F0 TX_BORDER_COLOR_12
2460x45F4 TX_BORDER_COLOR_13
2470x45F8 TX_BORDER_COLOR_14
2480x45FC TX_BORDER_COLOR_15
2490x4600 US_CONFIG
2500x4604 US_PIXSIZE
2510x4608 US_CODE_OFFSET
2520x460C US_RESET
2530x4610 US_CODE_ADDR_0
2540x4614 US_CODE_ADDR_1
2550x4618 US_CODE_ADDR_2
2560x461C US_CODE_ADDR_3
2570x4620 US_TEX_INST_0
2580x4624 US_TEX_INST_1
2590x4628 US_TEX_INST_2
2600x462C US_TEX_INST_3
2610x4630 US_TEX_INST_4
2620x4634 US_TEX_INST_5
2630x4638 US_TEX_INST_6
2640x463C US_TEX_INST_7
2650x4640 US_TEX_INST_8
2660x4644 US_TEX_INST_9
2670x4648 US_TEX_INST_10
2680x464C US_TEX_INST_11
2690x4650 US_TEX_INST_12
2700x4654 US_TEX_INST_13
2710x4658 US_TEX_INST_14
2720x465C US_TEX_INST_15
2730x4660 US_TEX_INST_16
2740x4664 US_TEX_INST_17
2750x4668 US_TEX_INST_18
2760x466C US_TEX_INST_19
2770x4670 US_TEX_INST_20
2780x4674 US_TEX_INST_21
2790x4678 US_TEX_INST_22
2800x467C US_TEX_INST_23
2810x4680 US_TEX_INST_24
2820x4684 US_TEX_INST_25
2830x4688 US_TEX_INST_26
2840x468C US_TEX_INST_27
2850x4690 US_TEX_INST_28
2860x4694 US_TEX_INST_29
2870x4698 US_TEX_INST_30
2880x469C US_TEX_INST_31
2890x46A4 US_OUT_FMT_0
2900x46A8 US_OUT_FMT_1
2910x46AC US_OUT_FMT_2
2920x46B0 US_OUT_FMT_3
2930x46B4 US_W_FMT
2940x46C0 US_ALU_RGB_ADDR_0
2950x46C4 US_ALU_RGB_ADDR_1
2960x46C8 US_ALU_RGB_ADDR_2
2970x46CC US_ALU_RGB_ADDR_3
2980x46D0 US_ALU_RGB_ADDR_4
2990x46D4 US_ALU_RGB_ADDR_5
3000x46D8 US_ALU_RGB_ADDR_6
3010x46DC US_ALU_RGB_ADDR_7
3020x46E0 US_ALU_RGB_ADDR_8
3030x46E4 US_ALU_RGB_ADDR_9
3040x46E8 US_ALU_RGB_ADDR_10
3050x46EC US_ALU_RGB_ADDR_11
3060x46F0 US_ALU_RGB_ADDR_12
3070x46F4 US_ALU_RGB_ADDR_13
3080x46F8 US_ALU_RGB_ADDR_14
3090x46FC US_ALU_RGB_ADDR_15
3100x4700 US_ALU_RGB_ADDR_16
3110x4704 US_ALU_RGB_ADDR_17
3120x4708 US_ALU_RGB_ADDR_18
3130x470C US_ALU_RGB_ADDR_19
3140x4710 US_ALU_RGB_ADDR_20
3150x4714 US_ALU_RGB_ADDR_21
3160x4718 US_ALU_RGB_ADDR_22
3170x471C US_ALU_RGB_ADDR_23
3180x4720 US_ALU_RGB_ADDR_24
3190x4724 US_ALU_RGB_ADDR_25
3200x4728 US_ALU_RGB_ADDR_26
3210x472C US_ALU_RGB_ADDR_27
3220x4730 US_ALU_RGB_ADDR_28
3230x4734 US_ALU_RGB_ADDR_29
3240x4738 US_ALU_RGB_ADDR_30
3250x473C US_ALU_RGB_ADDR_31
3260x4740 US_ALU_RGB_ADDR_32
3270x4744 US_ALU_RGB_ADDR_33
3280x4748 US_ALU_RGB_ADDR_34
3290x474C US_ALU_RGB_ADDR_35
3300x4750 US_ALU_RGB_ADDR_36
3310x4754 US_ALU_RGB_ADDR_37
3320x4758 US_ALU_RGB_ADDR_38
3330x475C US_ALU_RGB_ADDR_39
3340x4760 US_ALU_RGB_ADDR_40
3350x4764 US_ALU_RGB_ADDR_41
3360x4768 US_ALU_RGB_ADDR_42
3370x476C US_ALU_RGB_ADDR_43
3380x4770 US_ALU_RGB_ADDR_44
3390x4774 US_ALU_RGB_ADDR_45
3400x4778 US_ALU_RGB_ADDR_46
3410x477C US_ALU_RGB_ADDR_47
3420x4780 US_ALU_RGB_ADDR_48
3430x4784 US_ALU_RGB_ADDR_49
3440x4788 US_ALU_RGB_ADDR_50
3450x478C US_ALU_RGB_ADDR_51
3460x4790 US_ALU_RGB_ADDR_52
3470x4794 US_ALU_RGB_ADDR_53
3480x4798 US_ALU_RGB_ADDR_54
3490x479C US_ALU_RGB_ADDR_55
3500x47A0 US_ALU_RGB_ADDR_56
3510x47A4 US_ALU_RGB_ADDR_57
3520x47A8 US_ALU_RGB_ADDR_58
3530x47AC US_ALU_RGB_ADDR_59
3540x47B0 US_ALU_RGB_ADDR_60
3550x47B4 US_ALU_RGB_ADDR_61
3560x47B8 US_ALU_RGB_ADDR_62
3570x47BC US_ALU_RGB_ADDR_63
3580x47C0 US_ALU_ALPHA_ADDR_0
3590x47C4 US_ALU_ALPHA_ADDR_1
3600x47C8 US_ALU_ALPHA_ADDR_2
3610x47CC US_ALU_ALPHA_ADDR_3
3620x47D0 US_ALU_ALPHA_ADDR_4
3630x47D4 US_ALU_ALPHA_ADDR_5
3640x47D8 US_ALU_ALPHA_ADDR_6
3650x47DC US_ALU_ALPHA_ADDR_7
3660x47E0 US_ALU_ALPHA_ADDR_8
3670x47E4 US_ALU_ALPHA_ADDR_9
3680x47E8 US_ALU_ALPHA_ADDR_10
3690x47EC US_ALU_ALPHA_ADDR_11
3700x47F0 US_ALU_ALPHA_ADDR_12
3710x47F4 US_ALU_ALPHA_ADDR_13
3720x47F8 US_ALU_ALPHA_ADDR_14
3730x47FC US_ALU_ALPHA_ADDR_15
3740x4800 US_ALU_ALPHA_ADDR_16
3750x4804 US_ALU_ALPHA_ADDR_17
3760x4808 US_ALU_ALPHA_ADDR_18
3770x480C US_ALU_ALPHA_ADDR_19
3780x4810 US_ALU_ALPHA_ADDR_20
3790x4814 US_ALU_ALPHA_ADDR_21
3800x4818 US_ALU_ALPHA_ADDR_22
3810x481C US_ALU_ALPHA_ADDR_23
3820x4820 US_ALU_ALPHA_ADDR_24
3830x4824 US_ALU_ALPHA_ADDR_25
3840x4828 US_ALU_ALPHA_ADDR_26
3850x482C US_ALU_ALPHA_ADDR_27
3860x4830 US_ALU_ALPHA_ADDR_28
3870x4834 US_ALU_ALPHA_ADDR_29
3880x4838 US_ALU_ALPHA_ADDR_30
3890x483C US_ALU_ALPHA_ADDR_31
3900x4840 US_ALU_ALPHA_ADDR_32
3910x4844 US_ALU_ALPHA_ADDR_33
3920x4848 US_ALU_ALPHA_ADDR_34
3930x484C US_ALU_ALPHA_ADDR_35
3940x4850 US_ALU_ALPHA_ADDR_36
3950x4854 US_ALU_ALPHA_ADDR_37
3960x4858 US_ALU_ALPHA_ADDR_38
3970x485C US_ALU_ALPHA_ADDR_39
3980x4860 US_ALU_ALPHA_ADDR_40
3990x4864 US_ALU_ALPHA_ADDR_41
4000x4868 US_ALU_ALPHA_ADDR_42
4010x486C US_ALU_ALPHA_ADDR_43
4020x4870 US_ALU_ALPHA_ADDR_44
4030x4874 US_ALU_ALPHA_ADDR_45
4040x4878 US_ALU_ALPHA_ADDR_46
4050x487C US_ALU_ALPHA_ADDR_47
4060x4880 US_ALU_ALPHA_ADDR_48
4070x4884 US_ALU_ALPHA_ADDR_49
4080x4888 US_ALU_ALPHA_ADDR_50
4090x488C US_ALU_ALPHA_ADDR_51
4100x4890 US_ALU_ALPHA_ADDR_52
4110x4894 US_ALU_ALPHA_ADDR_53
4120x4898 US_ALU_ALPHA_ADDR_54
4130x489C US_ALU_ALPHA_ADDR_55
4140x48A0 US_ALU_ALPHA_ADDR_56
4150x48A4 US_ALU_ALPHA_ADDR_57
4160x48A8 US_ALU_ALPHA_ADDR_58
4170x48AC US_ALU_ALPHA_ADDR_59
4180x48B0 US_ALU_ALPHA_ADDR_60
4190x48B4 US_ALU_ALPHA_ADDR_61
4200x48B8 US_ALU_ALPHA_ADDR_62
4210x48BC US_ALU_ALPHA_ADDR_63
4220x48C0 US_ALU_RGB_INST_0
4230x48C4 US_ALU_RGB_INST_1
4240x48C8 US_ALU_RGB_INST_2
4250x48CC US_ALU_RGB_INST_3
4260x48D0 US_ALU_RGB_INST_4
4270x48D4 US_ALU_RGB_INST_5
4280x48D8 US_ALU_RGB_INST_6
4290x48DC US_ALU_RGB_INST_7
4300x48E0 US_ALU_RGB_INST_8
4310x48E4 US_ALU_RGB_INST_9
4320x48E8 US_ALU_RGB_INST_10
4330x48EC US_ALU_RGB_INST_11
4340x48F0 US_ALU_RGB_INST_12
4350x48F4 US_ALU_RGB_INST_13
4360x48F8 US_ALU_RGB_INST_14
4370x48FC US_ALU_RGB_INST_15
4380x4900 US_ALU_RGB_INST_16
4390x4904 US_ALU_RGB_INST_17
4400x4908 US_ALU_RGB_INST_18
4410x490C US_ALU_RGB_INST_19
4420x4910 US_ALU_RGB_INST_20
4430x4914 US_ALU_RGB_INST_21
4440x4918 US_ALU_RGB_INST_22
4450x491C US_ALU_RGB_INST_23
4460x4920 US_ALU_RGB_INST_24
4470x4924 US_ALU_RGB_INST_25
4480x4928 US_ALU_RGB_INST_26
4490x492C US_ALU_RGB_INST_27
4500x4930 US_ALU_RGB_INST_28
4510x4934 US_ALU_RGB_INST_29
4520x4938 US_ALU_RGB_INST_30
4530x493C US_ALU_RGB_INST_31
4540x4940 US_ALU_RGB_INST_32
4550x4944 US_ALU_RGB_INST_33
4560x4948 US_ALU_RGB_INST_34
4570x494C US_ALU_RGB_INST_35
4580x4950 US_ALU_RGB_INST_36
4590x4954 US_ALU_RGB_INST_37
4600x4958 US_ALU_RGB_INST_38
4610x495C US_ALU_RGB_INST_39
4620x4960 US_ALU_RGB_INST_40
4630x4964 US_ALU_RGB_INST_41
4640x4968 US_ALU_RGB_INST_42
4650x496C US_ALU_RGB_INST_43
4660x4970 US_ALU_RGB_INST_44
4670x4974 US_ALU_RGB_INST_45
4680x4978 US_ALU_RGB_INST_46
4690x497C US_ALU_RGB_INST_47
4700x4980 US_ALU_RGB_INST_48
4710x4984 US_ALU_RGB_INST_49
4720x4988 US_ALU_RGB_INST_50
4730x498C US_ALU_RGB_INST_51
4740x4990 US_ALU_RGB_INST_52
4750x4994 US_ALU_RGB_INST_53
4760x4998 US_ALU_RGB_INST_54
4770x499C US_ALU_RGB_INST_55
4780x49A0 US_ALU_RGB_INST_56
4790x49A4 US_ALU_RGB_INST_57
4800x49A8 US_ALU_RGB_INST_58
4810x49AC US_ALU_RGB_INST_59
4820x49B0 US_ALU_RGB_INST_60
4830x49B4 US_ALU_RGB_INST_61
4840x49B8 US_ALU_RGB_INST_62
4850x49BC US_ALU_RGB_INST_63
4860x49C0 US_ALU_ALPHA_INST_0
4870x49C4 US_ALU_ALPHA_INST_1
4880x49C8 US_ALU_ALPHA_INST_2
4890x49CC US_ALU_ALPHA_INST_3
4900x49D0 US_ALU_ALPHA_INST_4
4910x49D4 US_ALU_ALPHA_INST_5
4920x49D8 US_ALU_ALPHA_INST_6
4930x49DC US_ALU_ALPHA_INST_7
4940x49E0 US_ALU_ALPHA_INST_8
4950x49E4 US_ALU_ALPHA_INST_9
4960x49E8 US_ALU_ALPHA_INST_10
4970x49EC US_ALU_ALPHA_INST_11
4980x49F0 US_ALU_ALPHA_INST_12
4990x49F4 US_ALU_ALPHA_INST_13
5000x49F8 US_ALU_ALPHA_INST_14
5010x49FC US_ALU_ALPHA_INST_15
5020x4A00 US_ALU_ALPHA_INST_16
5030x4A04 US_ALU_ALPHA_INST_17
5040x4A08 US_ALU_ALPHA_INST_18
5050x4A0C US_ALU_ALPHA_INST_19
5060x4A10 US_ALU_ALPHA_INST_20
5070x4A14 US_ALU_ALPHA_INST_21
5080x4A18 US_ALU_ALPHA_INST_22
5090x4A1C US_ALU_ALPHA_INST_23
5100x4A20 US_ALU_ALPHA_INST_24
5110x4A24 US_ALU_ALPHA_INST_25
5120x4A28 US_ALU_ALPHA_INST_26
5130x4A2C US_ALU_ALPHA_INST_27
5140x4A30 US_ALU_ALPHA_INST_28
5150x4A34 US_ALU_ALPHA_INST_29
5160x4A38 US_ALU_ALPHA_INST_30
5170x4A3C US_ALU_ALPHA_INST_31
5180x4A40 US_ALU_ALPHA_INST_32
5190x4A44 US_ALU_ALPHA_INST_33
5200x4A48 US_ALU_ALPHA_INST_34
5210x4A4C US_ALU_ALPHA_INST_35
5220x4A50 US_ALU_ALPHA_INST_36
5230x4A54 US_ALU_ALPHA_INST_37
5240x4A58 US_ALU_ALPHA_INST_38
5250x4A5C US_ALU_ALPHA_INST_39
5260x4A60 US_ALU_ALPHA_INST_40
5270x4A64 US_ALU_ALPHA_INST_41
5280x4A68 US_ALU_ALPHA_INST_42
5290x4A6C US_ALU_ALPHA_INST_43
5300x4A70 US_ALU_ALPHA_INST_44
5310x4A74 US_ALU_ALPHA_INST_45
5320x4A78 US_ALU_ALPHA_INST_46
5330x4A7C US_ALU_ALPHA_INST_47
5340x4A80 US_ALU_ALPHA_INST_48
5350x4A84 US_ALU_ALPHA_INST_49
5360x4A88 US_ALU_ALPHA_INST_50
5370x4A8C US_ALU_ALPHA_INST_51
5380x4A90 US_ALU_ALPHA_INST_52
5390x4A94 US_ALU_ALPHA_INST_53
5400x4A98 US_ALU_ALPHA_INST_54
5410x4A9C US_ALU_ALPHA_INST_55
5420x4AA0 US_ALU_ALPHA_INST_56
5430x4AA4 US_ALU_ALPHA_INST_57
5440x4AA8 US_ALU_ALPHA_INST_58
5450x4AAC US_ALU_ALPHA_INST_59
5460x4AB0 US_ALU_ALPHA_INST_60
5470x4AB4 US_ALU_ALPHA_INST_61
5480x4AB8 US_ALU_ALPHA_INST_62
5490x4ABC US_ALU_ALPHA_INST_63
5500x4BC0 FG_FOG_BLEND
5510x4BC4 FG_FOG_FACTOR
5520x4BC8 FG_FOG_COLOR_R
5530x4BCC FG_FOG_COLOR_G
5540x4BD0 FG_FOG_COLOR_B
5550x4BD4 FG_ALPHA_FUNC
5560x4BD8 FG_DEPTH_SRC
5570x4C00 US_ALU_CONST_R_0
5580x4C04 US_ALU_CONST_G_0
5590x4C08 US_ALU_CONST_B_0
5600x4C0C US_ALU_CONST_A_0
5610x4C10 US_ALU_CONST_R_1
5620x4C14 US_ALU_CONST_G_1
5630x4C18 US_ALU_CONST_B_1
5640x4C1C US_ALU_CONST_A_1
5650x4C20 US_ALU_CONST_R_2
5660x4C24 US_ALU_CONST_G_2
5670x4C28 US_ALU_CONST_B_2
5680x4C2C US_ALU_CONST_A_2
5690x4C30 US_ALU_CONST_R_3
5700x4C34 US_ALU_CONST_G_3
5710x4C38 US_ALU_CONST_B_3
5720x4C3C US_ALU_CONST_A_3
5730x4C40 US_ALU_CONST_R_4
5740x4C44 US_ALU_CONST_G_4
5750x4C48 US_ALU_CONST_B_4
5760x4C4C US_ALU_CONST_A_4
5770x4C50 US_ALU_CONST_R_5
5780x4C54 US_ALU_CONST_G_5
5790x4C58 US_ALU_CONST_B_5
5800x4C5C US_ALU_CONST_A_5
5810x4C60 US_ALU_CONST_R_6
5820x4C64 US_ALU_CONST_G_6
5830x4C68 US_ALU_CONST_B_6
5840x4C6C US_ALU_CONST_A_6
5850x4C70 US_ALU_CONST_R_7
5860x4C74 US_ALU_CONST_G_7
5870x4C78 US_ALU_CONST_B_7
5880x4C7C US_ALU_CONST_A_7
5890x4C80 US_ALU_CONST_R_8
5900x4C84 US_ALU_CONST_G_8
5910x4C88 US_ALU_CONST_B_8
5920x4C8C US_ALU_CONST_A_8
5930x4C90 US_ALU_CONST_R_9
5940x4C94 US_ALU_CONST_G_9
5950x4C98 US_ALU_CONST_B_9
5960x4C9C US_ALU_CONST_A_9
5970x4CA0 US_ALU_CONST_R_10
5980x4CA4 US_ALU_CONST_G_10
5990x4CA8 US_ALU_CONST_B_10
6000x4CAC US_ALU_CONST_A_10
6010x4CB0 US_ALU_CONST_R_11
6020x4CB4 US_ALU_CONST_G_11
6030x4CB8 US_ALU_CONST_B_11
6040x4CBC US_ALU_CONST_A_11
6050x4CC0 US_ALU_CONST_R_12
6060x4CC4 US_ALU_CONST_G_12
6070x4CC8 US_ALU_CONST_B_12
6080x4CCC US_ALU_CONST_A_12
6090x4CD0 US_ALU_CONST_R_13
6100x4CD4 US_ALU_CONST_G_13
6110x4CD8 US_ALU_CONST_B_13
6120x4CDC US_ALU_CONST_A_13
6130x4CE0 US_ALU_CONST_R_14
6140x4CE4 US_ALU_CONST_G_14
6150x4CE8 US_ALU_CONST_B_14
6160x4CEC US_ALU_CONST_A_14
6170x4CF0 US_ALU_CONST_R_15
6180x4CF4 US_ALU_CONST_G_15
6190x4CF8 US_ALU_CONST_B_15
6200x4CFC US_ALU_CONST_A_15
6210x4D00 US_ALU_CONST_R_16
6220x4D04 US_ALU_CONST_G_16
6230x4D08 US_ALU_CONST_B_16
6240x4D0C US_ALU_CONST_A_16
6250x4D10 US_ALU_CONST_R_17
6260x4D14 US_ALU_CONST_G_17
6270x4D18 US_ALU_CONST_B_17
6280x4D1C US_ALU_CONST_A_17
6290x4D20 US_ALU_CONST_R_18
6300x4D24 US_ALU_CONST_G_18
6310x4D28 US_ALU_CONST_B_18
6320x4D2C US_ALU_CONST_A_18
6330x4D30 US_ALU_CONST_R_19
6340x4D34 US_ALU_CONST_G_19
6350x4D38 US_ALU_CONST_B_19
6360x4D3C US_ALU_CONST_A_19
6370x4D40 US_ALU_CONST_R_20
6380x4D44 US_ALU_CONST_G_20
6390x4D48 US_ALU_CONST_B_20
6400x4D4C US_ALU_CONST_A_20
6410x4D50 US_ALU_CONST_R_21
6420x4D54 US_ALU_CONST_G_21
6430x4D58 US_ALU_CONST_B_21
6440x4D5C US_ALU_CONST_A_21
6450x4D60 US_ALU_CONST_R_22
6460x4D64 US_ALU_CONST_G_22
6470x4D68 US_ALU_CONST_B_22
6480x4D6C US_ALU_CONST_A_22
6490x4D70 US_ALU_CONST_R_23
6500x4D74 US_ALU_CONST_G_23
6510x4D78 US_ALU_CONST_B_23
6520x4D7C US_ALU_CONST_A_23
6530x4D80 US_ALU_CONST_R_24
6540x4D84 US_ALU_CONST_G_24
6550x4D88 US_ALU_CONST_B_24
6560x4D8C US_ALU_CONST_A_24
6570x4D90 US_ALU_CONST_R_25
6580x4D94 US_ALU_CONST_G_25
6590x4D98 US_ALU_CONST_B_25
6600x4D9C US_ALU_CONST_A_25
6610x4DA0 US_ALU_CONST_R_26
6620x4DA4 US_ALU_CONST_G_26
6630x4DA8 US_ALU_CONST_B_26
6640x4DAC US_ALU_CONST_A_26
6650x4DB0 US_ALU_CONST_R_27
6660x4DB4 US_ALU_CONST_G_27
6670x4DB8 US_ALU_CONST_B_27
6680x4DBC US_ALU_CONST_A_27
6690x4DC0 US_ALU_CONST_R_28
6700x4DC4 US_ALU_CONST_G_28
6710x4DC8 US_ALU_CONST_B_28
6720x4DCC US_ALU_CONST_A_28
6730x4DD0 US_ALU_CONST_R_29
6740x4DD4 US_ALU_CONST_G_29
6750x4DD8 US_ALU_CONST_B_29
6760x4DDC US_ALU_CONST_A_29
6770x4DE0 US_ALU_CONST_R_30
6780x4DE4 US_ALU_CONST_G_30
6790x4DE8 US_ALU_CONST_B_30
6800x4DEC US_ALU_CONST_A_30
6810x4DF0 US_ALU_CONST_R_31
6820x4DF4 US_ALU_CONST_G_31
6830x4DF8 US_ALU_CONST_B_31
6840x4DFC US_ALU_CONST_A_31
6850x4E04 RB3D_BLENDCNTL_R3
6860x4E08 RB3D_ABLENDCNTL_R3
6870x4E0C RB3D_COLOR_CHANNEL_MASK
6880x4E10 RB3D_CONSTANT_COLOR
6890x4E14 RB3D_COLOR_CLEAR_VALUE
6900x4E18 RB3D_ROPCNTL_R3
6910x4E1C RB3D_CLRCMP_FLIPE_R3
6920x4E20 RB3D_CLRCMP_CLR_R3
6930x4E24 RB3D_CLRCMP_MSK_R3
6940x4E48 RB3D_DEBUG_CTL
6950x4E4C RB3D_DSTCACHE_CTLSTAT_R3
6960x4E50 RB3D_DITHER_CTL
6970x4E54 RB3D_CMASK_OFFSET0
6980x4E58 RB3D_CMASK_OFFSET1
6990x4E5C RB3D_CMASK_OFFSET2
7000x4E60 RB3D_CMASK_OFFSET3
7010x4E64 RB3D_CMASK_PITCH0
7020x4E68 RB3D_CMASK_PITCH1
7030x4E6C RB3D_CMASK_PITCH2
7040x4E70 RB3D_CMASK_PITCH3
7050x4E74 RB3D_CMASK_WRINDEX
7060x4E78 RB3D_CMASK_DWORD
7070x4E7C RB3D_CMASK_RDINDEX
7080x4E80 RB3D_AARESOLVE_OFFSET
7090x4E84 RB3D_AARESOLVE_PITCH
7100x4E88 RB3D_AARESOLVE_CTL
7110x4F04 ZB_ZSTENCILCNTL
7120x4F08 ZB_STENCILREFMASK
7130x4F14 ZB_ZTOP
7140x4F18 ZB_ZCACHE_CTLSTAT
7150x4F1C ZB_BW_CNTL
7160x4F28 ZB_DEPTHCLEARVALUE
7170x4F30 ZB_ZMASK_OFFSET
7180x4F34 ZB_ZMASK_PITCH
7190x4F38 ZB_ZMASK_WRINDEX
7200x4F3C ZB_ZMASK_DWORD
7210x4F40 ZB_ZMASK_RDINDEX
7220x4F44 ZB_HIZ_OFFSET
7230x4F48 ZB_HIZ_WRINDEX
7240x4F4C ZB_HIZ_DWORD
7250x4F50 ZB_HIZ_RDINDEX
7260x4F54 ZB_HIZ_PITCH
7270x4F58 ZB_ZPASS_DATA
7280x4F60 ZB_DEPTHXY_OFFSET
diff --git a/drivers/gpu/drm/radeon/reg_srcs/rv515 b/drivers/gpu/drm/radeon/reg_srcs/rv515
new file mode 100644
index 000000000000..d1fcf382fd77
--- /dev/null
+++ b/drivers/gpu/drm/radeon/reg_srcs/rv515
@@ -0,0 +1,486 @@
1rv515 0x6d40
20x1434 SRC_Y_X
30x1438 DST_Y_X
40x143C DST_HEIGHT_WIDTH
50x146C DP_GUI_MASTER_CNTL
60x1474 BRUSH_Y_X
70x1478 DP_BRUSH_BKGD_CLR
80x147C DP_BRUSH_FRGD_CLR
90x1480 BRUSH_DATA0
100x1484 BRUSH_DATA1
110x1598 DST_WIDTH_HEIGHT
120x15C0 CLR_CMP_CNTL
130x15C4 CLR_CMP_CLR_SRC
140x15C8 CLR_CMP_CLR_DST
150x15CC CLR_CMP_MSK
160x15D8 DP_SRC_FRGD_CLR
170x15DC DP_SRC_BKGD_CLR
180x1600 DST_LINE_START
190x1604 DST_LINE_END
200x1608 DST_LINE_PATCOUNT
210x16C0 DP_CNTL
220x16CC DP_WRITE_MSK
230x16D0 DP_CNTL_XDIR_YDIR_YMAJOR
240x16E8 DEFAULT_SC_BOTTOM_RIGHT
250x16EC SC_TOP_LEFT
260x16F0 SC_BOTTOM_RIGHT
270x16F4 SRC_SC_BOTTOM_RIGHT
280x1714 DSTCACHE_CTLSTAT
290x1720 WAIT_UNTIL
300x172C RBBM_GUICNTL
310x1D98 VAP_VPORT_XSCALE
320x1D9C VAP_VPORT_XOFFSET
330x1DA0 VAP_VPORT_YSCALE
340x1DA4 VAP_VPORT_YOFFSET
350x1DA8 VAP_VPORT_ZSCALE
360x1DAC VAP_VPORT_ZOFFSET
370x2080 VAP_CNTL
380x2090 VAP_OUT_VTX_FMT_0
390x2094 VAP_OUT_VTX_FMT_1
400x20B0 VAP_VTE_CNTL
410x2138 VAP_VF_MIN_VTX_INDX
420x2140 VAP_CNTL_STATUS
430x2150 VAP_PROG_STREAM_CNTL_0
440x2154 VAP_PROG_STREAM_CNTL_1
450x2158 VAP_PROG_STREAM_CNTL_2
460x215C VAP_PROG_STREAM_CNTL_3
470x2160 VAP_PROG_STREAM_CNTL_4
480x2164 VAP_PROG_STREAM_CNTL_5
490x2168 VAP_PROG_STREAM_CNTL_6
500x216C VAP_PROG_STREAM_CNTL_7
510x2180 VAP_VTX_STATE_CNTL
520x2184 VAP_VSM_VTX_ASSM
530x2188 VAP_VTX_STATE_IND_REG_0
540x218C VAP_VTX_STATE_IND_REG_1
550x2190 VAP_VTX_STATE_IND_REG_2
560x2194 VAP_VTX_STATE_IND_REG_3
570x2198 VAP_VTX_STATE_IND_REG_4
580x219C VAP_VTX_STATE_IND_REG_5
590x21A0 VAP_VTX_STATE_IND_REG_6
600x21A4 VAP_VTX_STATE_IND_REG_7
610x21A8 VAP_VTX_STATE_IND_REG_8
620x21AC VAP_VTX_STATE_IND_REG_9
630x21B0 VAP_VTX_STATE_IND_REG_10
640x21B4 VAP_VTX_STATE_IND_REG_11
650x21B8 VAP_VTX_STATE_IND_REG_12
660x21BC VAP_VTX_STATE_IND_REG_13
670x21C0 VAP_VTX_STATE_IND_REG_14
680x21C4 VAP_VTX_STATE_IND_REG_15
690x21DC VAP_PSC_SGN_NORM_CNTL
700x21E0 VAP_PROG_STREAM_CNTL_EXT_0
710x21E4 VAP_PROG_STREAM_CNTL_EXT_1
720x21E8 VAP_PROG_STREAM_CNTL_EXT_2
730x21EC VAP_PROG_STREAM_CNTL_EXT_3
740x21F0 VAP_PROG_STREAM_CNTL_EXT_4
750x21F4 VAP_PROG_STREAM_CNTL_EXT_5
760x21F8 VAP_PROG_STREAM_CNTL_EXT_6
770x21FC VAP_PROG_STREAM_CNTL_EXT_7
780x2200 VAP_PVS_VECTOR_INDX_REG
790x2204 VAP_PVS_VECTOR_DATA_REG
800x2208 VAP_PVS_VECTOR_DATA_REG_128
810x2218 VAP_TEX_TO_COLOR_CNTL
820x221C VAP_CLIP_CNTL
830x2220 VAP_GB_VERT_CLIP_ADJ
840x2224 VAP_GB_VERT_DISC_ADJ
850x2228 VAP_GB_HORZ_CLIP_ADJ
860x222C VAP_GB_HORZ_DISC_ADJ
870x2230 VAP_PVS_FLOW_CNTL_ADDRS_0
880x2234 VAP_PVS_FLOW_CNTL_ADDRS_1
890x2238 VAP_PVS_FLOW_CNTL_ADDRS_2
900x223C VAP_PVS_FLOW_CNTL_ADDRS_3
910x2240 VAP_PVS_FLOW_CNTL_ADDRS_4
920x2244 VAP_PVS_FLOW_CNTL_ADDRS_5
930x2248 VAP_PVS_FLOW_CNTL_ADDRS_6
940x224C VAP_PVS_FLOW_CNTL_ADDRS_7
950x2250 VAP_PVS_FLOW_CNTL_ADDRS_8
960x2254 VAP_PVS_FLOW_CNTL_ADDRS_9
970x2258 VAP_PVS_FLOW_CNTL_ADDRS_10
980x225C VAP_PVS_FLOW_CNTL_ADDRS_11
990x2260 VAP_PVS_FLOW_CNTL_ADDRS_12
1000x2264 VAP_PVS_FLOW_CNTL_ADDRS_13
1010x2268 VAP_PVS_FLOW_CNTL_ADDRS_14
1020x226C VAP_PVS_FLOW_CNTL_ADDRS_15
1030x2284 VAP_PVS_STATE_FLUSH_REG
1040x2288 VAP_PVS_VTX_TIMEOUT_REG
1050x2290 VAP_PVS_FLOW_CNTL_LOOP_INDEX_0
1060x2294 VAP_PVS_FLOW_CNTL_LOOP_INDEX_1
1070x2298 VAP_PVS_FLOW_CNTL_LOOP_INDEX_2
1080x229C VAP_PVS_FLOW_CNTL_LOOP_INDEX_3
1090x22A0 VAP_PVS_FLOW_CNTL_LOOP_INDEX_4
1100x22A4 VAP_PVS_FLOW_CNTL_LOOP_INDEX_5
1110x22A8 VAP_PVS_FLOW_CNTL_LOOP_INDEX_6
1120x22AC VAP_PVS_FLOW_CNTL_LOOP_INDEX_7
1130x22B0 VAP_PVS_FLOW_CNTL_LOOP_INDEX_8
1140x22B4 VAP_PVS_FLOW_CNTL_LOOP_INDEX_9
1150x22B8 VAP_PVS_FLOW_CNTL_LOOP_INDEX_10
1160x22BC VAP_PVS_FLOW_CNTL_LOOP_INDEX_11
1170x22C0 VAP_PVS_FLOW_CNTL_LOOP_INDEX_12
1180x22C4 VAP_PVS_FLOW_CNTL_LOOP_INDEX_13
1190x22C8 VAP_PVS_FLOW_CNTL_LOOP_INDEX_14
1200x22CC VAP_PVS_FLOW_CNTL_LOOP_INDEX_15
1210x22D0 VAP_PVS_CODE_CNTL_0
1220x22D4 VAP_PVS_CONST_CNTL
1230x22D8 VAP_PVS_CODE_CNTL_1
1240x22DC VAP_PVS_FLOW_CNTL_OPC
1250x2500 VAP_PVS_FLOW_CNTL_ADDRS_LW_0
1260x2504 VAP_PVS_FLOW_CNTL_ADDRS_UW_0
1270x2508 VAP_PVS_FLOW_CNTL_ADDRS_LW_1
1280x250C VAP_PVS_FLOW_CNTL_ADDRS_UW_1
1290x2510 VAP_PVS_FLOW_CNTL_ADDRS_LW_2
1300x2514 VAP_PVS_FLOW_CNTL_ADDRS_UW_2
1310x2518 VAP_PVS_FLOW_CNTL_ADDRS_LW_3
1320x251C VAP_PVS_FLOW_CNTL_ADDRS_UW_3
1330x2520 VAP_PVS_FLOW_CNTL_ADDRS_LW_4
1340x2524 VAP_PVS_FLOW_CNTL_ADDRS_UW_4
1350x2528 VAP_PVS_FLOW_CNTL_ADDRS_LW_5
1360x252C VAP_PVS_FLOW_CNTL_ADDRS_UW_5
1370x2530 VAP_PVS_FLOW_CNTL_ADDRS_LW_6
1380x2534 VAP_PVS_FLOW_CNTL_ADDRS_UW_6
1390x2538 VAP_PVS_FLOW_CNTL_ADDRS_LW_7
1400x253C VAP_PVS_FLOW_CNTL_ADDRS_UW_7
1410x2540 VAP_PVS_FLOW_CNTL_ADDRS_LW_8
1420x2544 VAP_PVS_FLOW_CNTL_ADDRS_UW_8
1430x2548 VAP_PVS_FLOW_CNTL_ADDRS_LW_9
1440x254C VAP_PVS_FLOW_CNTL_ADDRS_UW_9
1450x2550 VAP_PVS_FLOW_CNTL_ADDRS_LW_10
1460x2554 VAP_PVS_FLOW_CNTL_ADDRS_UW_10
1470x2558 VAP_PVS_FLOW_CNTL_ADDRS_LW_11
1480x255C VAP_PVS_FLOW_CNTL_ADDRS_UW_11
1490x2560 VAP_PVS_FLOW_CNTL_ADDRS_LW_12
1500x2564 VAP_PVS_FLOW_CNTL_ADDRS_UW_12
1510x2568 VAP_PVS_FLOW_CNTL_ADDRS_LW_13
1520x256C VAP_PVS_FLOW_CNTL_ADDRS_UW_13
1530x2570 VAP_PVS_FLOW_CNTL_ADDRS_LW_14
1540x2574 VAP_PVS_FLOW_CNTL_ADDRS_UW_14
1550x2578 VAP_PVS_FLOW_CNTL_ADDRS_LW_15
1560x257C VAP_PVS_FLOW_CNTL_ADDRS_UW_15
1570x342C RB2D_DSTCACHE_CTLSTAT
1580x4000 GB_VAP_RASTER_VTX_FMT_0
1590x4004 GB_VAP_RASTER_VTX_FMT_1
1600x4008 GB_ENABLE
1610x401C GB_SELECT
1620x4020 GB_AA_CONFIG
1630x4024 GB_FIFO_SIZE
1640x4100 TX_INVALTAGS
1650x4200 GA_POINT_S0
1660x4204 GA_POINT_T0
1670x4208 GA_POINT_S1
1680x420C GA_POINT_T1
1690x4214 GA_TRIANGLE_STIPPLE
1700x421C GA_POINT_SIZE
1710x4230 GA_POINT_MINMAX
1720x4234 GA_LINE_CNTL
1730x4238 GA_LINE_STIPPLE_CONFIG
1740x4260 GA_LINE_STIPPLE_VALUE
1750x4264 GA_LINE_S0
1760x4268 GA_LINE_S1
1770x4278 GA_COLOR_CONTROL
1780x427C GA_SOLID_RG
1790x4280 GA_SOLID_BA
1800x4288 GA_POLY_MODE
1810x428C GA_ROUND_MODE
1820x4290 GA_OFFSET
1830x4294 GA_FOG_SCALE
1840x4298 GA_FOG_OFFSET
1850x42A0 SU_TEX_WRAP
1860x42A4 SU_POLY_OFFSET_FRONT_SCALE
1870x42A8 SU_POLY_OFFSET_FRONT_OFFSET
1880x42AC SU_POLY_OFFSET_BACK_SCALE
1890x42B0 SU_POLY_OFFSET_BACK_OFFSET
1900x42B4 SU_POLY_OFFSET_ENABLE
1910x42B8 SU_CULL_MODE
1920x42C0 SU_DEPTH_SCALE
1930x42C4 SU_DEPTH_OFFSET
1940x42C8 SU_REG_DEST
1950x4300 RS_COUNT
1960x4304 RS_INST_COUNT
1970x4074 RS_IP_0
1980x4078 RS_IP_1
1990x407C RS_IP_2
2000x4080 RS_IP_3
2010x4084 RS_IP_4
2020x4088 RS_IP_5
2030x408C RS_IP_6
2040x4090 RS_IP_7
2050x4094 RS_IP_8
2060x4098 RS_IP_9
2070x409C RS_IP_10
2080x40A0 RS_IP_11
2090x40A4 RS_IP_12
2100x40A8 RS_IP_13
2110x40AC RS_IP_14
2120x40B0 RS_IP_15
2130x4320 RS_INST_0
2140x4324 RS_INST_1
2150x4328 RS_INST_2
2160x432C RS_INST_3
2170x4330 RS_INST_4
2180x4334 RS_INST_5
2190x4338 RS_INST_6
2200x433C RS_INST_7
2210x4340 RS_INST_8
2220x4344 RS_INST_9
2230x4348 RS_INST_10
2240x434C RS_INST_11
2250x4350 RS_INST_12
2260x4354 RS_INST_13
2270x4358 RS_INST_14
2280x435C RS_INST_15
2290x43A4 SC_HYPERZ_EN
2300x43A8 SC_EDGERULE
2310x43B0 SC_CLIP_0_A
2320x43B4 SC_CLIP_0_B
2330x43B8 SC_CLIP_1_A
2340x43BC SC_CLIP_1_B
2350x43C0 SC_CLIP_2_A
2360x43C4 SC_CLIP_2_B
2370x43C8 SC_CLIP_3_A
2380x43CC SC_CLIP_3_B
2390x43D0 SC_CLIP_RULE
2400x43E0 SC_SCISSOR0
2410x43E8 SC_SCREENDOOR
2420x4440 TX_FILTER1_0
2430x4444 TX_FILTER1_1
2440x4448 TX_FILTER1_2
2450x444C TX_FILTER1_3
2460x4450 TX_FILTER1_4
2470x4454 TX_FILTER1_5
2480x4458 TX_FILTER1_6
2490x445C TX_FILTER1_7
2500x4460 TX_FILTER1_8
2510x4464 TX_FILTER1_9
2520x4468 TX_FILTER1_10
2530x446C TX_FILTER1_11
2540x4470 TX_FILTER1_12
2550x4474 TX_FILTER1_13
2560x4478 TX_FILTER1_14
2570x447C TX_FILTER1_15
2580x4580 TX_CHROMA_KEY_0
2590x4584 TX_CHROMA_KEY_1
2600x4588 TX_CHROMA_KEY_2
2610x458C TX_CHROMA_KEY_3
2620x4590 TX_CHROMA_KEY_4
2630x4594 TX_CHROMA_KEY_5
2640x4598 TX_CHROMA_KEY_6
2650x459C TX_CHROMA_KEY_7
2660x45A0 TX_CHROMA_KEY_8
2670x45A4 TX_CHROMA_KEY_9
2680x45A8 TX_CHROMA_KEY_10
2690x45AC TX_CHROMA_KEY_11
2700x45B0 TX_CHROMA_KEY_12
2710x45B4 TX_CHROMA_KEY_13
2720x45B8 TX_CHROMA_KEY_14
2730x45BC TX_CHROMA_KEY_15
2740x45C0 TX_BORDER_COLOR_0
2750x45C4 TX_BORDER_COLOR_1
2760x45C8 TX_BORDER_COLOR_2
2770x45CC TX_BORDER_COLOR_3
2780x45D0 TX_BORDER_COLOR_4
2790x45D4 TX_BORDER_COLOR_5
2800x45D8 TX_BORDER_COLOR_6
2810x45DC TX_BORDER_COLOR_7
2820x45E0 TX_BORDER_COLOR_8
2830x45E4 TX_BORDER_COLOR_9
2840x45E8 TX_BORDER_COLOR_10
2850x45EC TX_BORDER_COLOR_11
2860x45F0 TX_BORDER_COLOR_12
2870x45F4 TX_BORDER_COLOR_13
2880x45F8 TX_BORDER_COLOR_14
2890x45FC TX_BORDER_COLOR_15
2900x4250 GA_US_VECTOR_INDEX
2910x4254 GA_US_VECTOR_DATA
2920x4600 US_CONFIG
2930x4604 US_PIXSIZE
2940x4620 US_FC_BOOL_CONST
2950x4624 US_FC_CTRL
2960x4630 US_CODE_ADDR
2970x4634 US_CODE_RANGE
2980x4638 US_CODE_OFFSET
2990x46A4 US_OUT_FMT_0
3000x46A8 US_OUT_FMT_1
3010x46AC US_OUT_FMT_2
3020x46B0 US_OUT_FMT_3
3030x46B4 US_W_FMT
3040x4BC0 FG_FOG_BLEND
3050x4BC4 FG_FOG_FACTOR
3060x4BC8 FG_FOG_COLOR_R
3070x4BCC FG_FOG_COLOR_G
3080x4BD0 FG_FOG_COLOR_B
3090x4BD4 FG_ALPHA_FUNC
3100x4BD8 FG_DEPTH_SRC
3110x4C00 US_ALU_CONST_R_0
3120x4C04 US_ALU_CONST_G_0
3130x4C08 US_ALU_CONST_B_0
3140x4C0C US_ALU_CONST_A_0
3150x4C10 US_ALU_CONST_R_1
3160x4C14 US_ALU_CONST_G_1
3170x4C18 US_ALU_CONST_B_1
3180x4C1C US_ALU_CONST_A_1
3190x4C20 US_ALU_CONST_R_2
3200x4C24 US_ALU_CONST_G_2
3210x4C28 US_ALU_CONST_B_2
3220x4C2C US_ALU_CONST_A_2
3230x4C30 US_ALU_CONST_R_3
3240x4C34 US_ALU_CONST_G_3
3250x4C38 US_ALU_CONST_B_3
3260x4C3C US_ALU_CONST_A_3
3270x4C40 US_ALU_CONST_R_4
3280x4C44 US_ALU_CONST_G_4
3290x4C48 US_ALU_CONST_B_4
3300x4C4C US_ALU_CONST_A_4
3310x4C50 US_ALU_CONST_R_5
3320x4C54 US_ALU_CONST_G_5
3330x4C58 US_ALU_CONST_B_5
3340x4C5C US_ALU_CONST_A_5
3350x4C60 US_ALU_CONST_R_6
3360x4C64 US_ALU_CONST_G_6
3370x4C68 US_ALU_CONST_B_6
3380x4C6C US_ALU_CONST_A_6
3390x4C70 US_ALU_CONST_R_7
3400x4C74 US_ALU_CONST_G_7
3410x4C78 US_ALU_CONST_B_7
3420x4C7C US_ALU_CONST_A_7
3430x4C80 US_ALU_CONST_R_8
3440x4C84 US_ALU_CONST_G_8
3450x4C88 US_ALU_CONST_B_8
3460x4C8C US_ALU_CONST_A_8
3470x4C90 US_ALU_CONST_R_9
3480x4C94 US_ALU_CONST_G_9
3490x4C98 US_ALU_CONST_B_9
3500x4C9C US_ALU_CONST_A_9
3510x4CA0 US_ALU_CONST_R_10
3520x4CA4 US_ALU_CONST_G_10
3530x4CA8 US_ALU_CONST_B_10
3540x4CAC US_ALU_CONST_A_10
3550x4CB0 US_ALU_CONST_R_11
3560x4CB4 US_ALU_CONST_G_11
3570x4CB8 US_ALU_CONST_B_11
3580x4CBC US_ALU_CONST_A_11
3590x4CC0 US_ALU_CONST_R_12
3600x4CC4 US_ALU_CONST_G_12
3610x4CC8 US_ALU_CONST_B_12
3620x4CCC US_ALU_CONST_A_12
3630x4CD0 US_ALU_CONST_R_13
3640x4CD4 US_ALU_CONST_G_13
3650x4CD8 US_ALU_CONST_B_13
3660x4CDC US_ALU_CONST_A_13
3670x4CE0 US_ALU_CONST_R_14
3680x4CE4 US_ALU_CONST_G_14
3690x4CE8 US_ALU_CONST_B_14
3700x4CEC US_ALU_CONST_A_14
3710x4CF0 US_ALU_CONST_R_15
3720x4CF4 US_ALU_CONST_G_15
3730x4CF8 US_ALU_CONST_B_15
3740x4CFC US_ALU_CONST_A_15
3750x4D00 US_ALU_CONST_R_16
3760x4D04 US_ALU_CONST_G_16
3770x4D08 US_ALU_CONST_B_16
3780x4D0C US_ALU_CONST_A_16
3790x4D10 US_ALU_CONST_R_17
3800x4D14 US_ALU_CONST_G_17
3810x4D18 US_ALU_CONST_B_17
3820x4D1C US_ALU_CONST_A_17
3830x4D20 US_ALU_CONST_R_18
3840x4D24 US_ALU_CONST_G_18
3850x4D28 US_ALU_CONST_B_18
3860x4D2C US_ALU_CONST_A_18
3870x4D30 US_ALU_CONST_R_19
3880x4D34 US_ALU_CONST_G_19
3890x4D38 US_ALU_CONST_B_19
3900x4D3C US_ALU_CONST_A_19
3910x4D40 US_ALU_CONST_R_20
3920x4D44 US_ALU_CONST_G_20
3930x4D48 US_ALU_CONST_B_20
3940x4D4C US_ALU_CONST_A_20
3950x4D50 US_ALU_CONST_R_21
3960x4D54 US_ALU_CONST_G_21
3970x4D58 US_ALU_CONST_B_21
3980x4D5C US_ALU_CONST_A_21
3990x4D60 US_ALU_CONST_R_22
4000x4D64 US_ALU_CONST_G_22
4010x4D68 US_ALU_CONST_B_22
4020x4D6C US_ALU_CONST_A_22
4030x4D70 US_ALU_CONST_R_23
4040x4D74 US_ALU_CONST_G_23
4050x4D78 US_ALU_CONST_B_23
4060x4D7C US_ALU_CONST_A_23
4070x4D80 US_ALU_CONST_R_24
4080x4D84 US_ALU_CONST_G_24
4090x4D88 US_ALU_CONST_B_24
4100x4D8C US_ALU_CONST_A_24
4110x4D90 US_ALU_CONST_R_25
4120x4D94 US_ALU_CONST_G_25
4130x4D98 US_ALU_CONST_B_25
4140x4D9C US_ALU_CONST_A_25
4150x4DA0 US_ALU_CONST_R_26
4160x4DA4 US_ALU_CONST_G_26
4170x4DA8 US_ALU_CONST_B_26
4180x4DAC US_ALU_CONST_A_26
4190x4DB0 US_ALU_CONST_R_27
4200x4DB4 US_ALU_CONST_G_27
4210x4DB8 US_ALU_CONST_B_27
4220x4DBC US_ALU_CONST_A_27
4230x4DC0 US_ALU_CONST_R_28
4240x4DC4 US_ALU_CONST_G_28
4250x4DC8 US_ALU_CONST_B_28
4260x4DCC US_ALU_CONST_A_28
4270x4DD0 US_ALU_CONST_R_29
4280x4DD4 US_ALU_CONST_G_29
4290x4DD8 US_ALU_CONST_B_29
4300x4DDC US_ALU_CONST_A_29
4310x4DE0 US_ALU_CONST_R_30
4320x4DE4 US_ALU_CONST_G_30
4330x4DE8 US_ALU_CONST_B_30
4340x4DEC US_ALU_CONST_A_30
4350x4DF0 US_ALU_CONST_R_31
4360x4DF4 US_ALU_CONST_G_31
4370x4DF8 US_ALU_CONST_B_31
4380x4DFC US_ALU_CONST_A_31
4390x4E04 RB3D_BLENDCNTL_R3
4400x4E08 RB3D_ABLENDCNTL_R3
4410x4E0C RB3D_COLOR_CHANNEL_MASK
4420x4E10 RB3D_CONSTANT_COLOR
4430x4E14 RB3D_COLOR_CLEAR_VALUE
4440x4E18 RB3D_ROPCNTL_R3
4450x4E1C RB3D_CLRCMP_FLIPE_R3
4460x4E20 RB3D_CLRCMP_CLR_R3
4470x4E24 RB3D_CLRCMP_MSK_R3
4480x4E48 RB3D_DEBUG_CTL
4490x4E4C RB3D_DSTCACHE_CTLSTAT_R3
4500x4E50 RB3D_DITHER_CTL
4510x4E54 RB3D_CMASK_OFFSET0
4520x4E58 RB3D_CMASK_OFFSET1
4530x4E5C RB3D_CMASK_OFFSET2
4540x4E60 RB3D_CMASK_OFFSET3
4550x4E64 RB3D_CMASK_PITCH0
4560x4E68 RB3D_CMASK_PITCH1
4570x4E6C RB3D_CMASK_PITCH2
4580x4E70 RB3D_CMASK_PITCH3
4590x4E74 RB3D_CMASK_WRINDEX
4600x4E78 RB3D_CMASK_DWORD
4610x4E7C RB3D_CMASK_RDINDEX
4620x4E80 RB3D_AARESOLVE_OFFSET
4630x4E84 RB3D_AARESOLVE_PITCH
4640x4E88 RB3D_AARESOLVE_CTL
4650x4EA0 RB3D_DISCARD_SRC_PIXEL_LTE_THRESHOLD
4660x4EA4 RB3D_DISCARD_SRC_PIXEL_GTE_THRESHOLD
4670x4EF8 RB3D_CONSTANT_COLOR_AR
4680x4EFC RB3D_CONSTANT_COLOR_GB
4690x4F04 ZB_ZSTENCILCNTL
4700x4F08 ZB_STENCILREFMASK
4710x4F14 ZB_ZTOP
4720x4F18 ZB_ZCACHE_CTLSTAT
4730x4F1C ZB_BW_CNTL
4740x4F28 ZB_DEPTHCLEARVALUE
4750x4F30 ZB_ZMASK_OFFSET
4760x4F34 ZB_ZMASK_PITCH
4770x4F38 ZB_ZMASK_WRINDEX
4780x4F3C ZB_ZMASK_DWORD
4790x4F40 ZB_ZMASK_RDINDEX
4800x4F44 ZB_HIZ_OFFSET
4810x4F48 ZB_HIZ_WRINDEX
4820x4F4C ZB_HIZ_DWORD
4830x4F50 ZB_HIZ_RDINDEX
4840x4F54 ZB_HIZ_PITCH
4850x4F58 ZB_ZPASS_DATA
4860x4F60 ZB_DEPTHXY_OFFSET
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
index 31a7f668ae5a..60a194f1d9a8 100644
--- a/drivers/gpu/drm/radeon/rv515.c
+++ b/drivers/gpu/drm/radeon/rv515.c
@@ -31,6 +31,7 @@
31#include "radeon.h" 31#include "radeon.h"
32#include "radeon_share.h" 32#include "radeon_share.h"
33 33
34#include "rv515_reg_safe.h"
34/* rv515 depends on : */ 35/* rv515 depends on : */
35void r100_hdp_reset(struct radeon_device *rdev); 36void r100_hdp_reset(struct radeon_device *rdev);
36int r100_cp_reset(struct radeon_device *rdev); 37int r100_cp_reset(struct radeon_device *rdev);
@@ -464,72 +465,13 @@ int rv515_debugfs_ga_info_init(struct radeon_device *rdev)
464#endif 465#endif
465} 466}
466 467
467
468/* 468/*
469 * Asic initialization 469 * Asic initialization
470 */ 470 */
471static const unsigned r500_reg_safe_bm[219] = {
472 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
473 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
474 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
475 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
476 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
477 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
478 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
479 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
480 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
481 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
482 0x17FF1FFF, 0xFFFFFFFC, 0xFFFFFFFF, 0xFF30FFBF,
483 0xFFFFFFF8, 0xC3E6FFFF, 0xFFFFF6DF, 0xFFFFFFFF,
484 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
485 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
486 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFF03F,
487 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
488 0xFFFFFFFF, 0xFFFFEFCE, 0xF00EBFFF, 0x007C0000,
489 0xF0000038, 0xFF000009, 0xFFFFFFFF, 0xFFFFFFFF,
490 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF,
491 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
492 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
493 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
494 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
495 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
496 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
497 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
498 0xFFFFF7FF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
499 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
500 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
501 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
502 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
503 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
504 0x1FFFFC78, 0xFFFFE000, 0xFFFFFFFE, 0xFFFFFFFF,
505 0x38CF8F50, 0xFFF88082, 0xFF0000FC, 0xFAE009FF,
506 0x0000FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000,
507 0xFFFF8CFC, 0xFFFFC1FF, 0xFFFFFFFF, 0xFFFFFFFF,
508 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
509 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF80FFFF,
510 0x00000000, 0x00000000, 0x00000000, 0x00000000,
511 0x0003FC01, 0x3FFFFCF8, 0xFE800B19, 0xFFFFFFFF,
512 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
513 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
514 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
515 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
516 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
517 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
518 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
519 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
520 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
521 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
522 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
523 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
524 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
525 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
526 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
527};
528
529int rv515_init(struct radeon_device *rdev) 471int rv515_init(struct radeon_device *rdev)
530{ 472{
531 rdev->config.r300.reg_safe_bm = r500_reg_safe_bm; 473 rdev->config.r300.reg_safe_bm = rv515_reg_safe_bm;
532 rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(r500_reg_safe_bm); 474 rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(rv515_reg_safe_bm);
533 return 0; 475 return 0;
534} 476}
535 477