summaryrefslogtreecommitdiff
path: root/reg.h
blob: 61ffbf643e46519648ea4d962e30feff63b8a233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright © 2009 Jerome Glisse <glisse@freedesktop.org>
 *
 * This file is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 */
#ifndef REG_H
#define REG_H

#include <stdio.h>
#include <stdint.h>

struct range {
    unsigned        domain;
    unsigned        foffset;
    unsigned        loffset;
    unsigned        stride;
};

struct reg {
    unsigned        domain;
    unsigned        offset;
    unsigned        value;
};

struct dump {
    struct reg      *regs;
    unsigned        nregs;
};

int dump_range(struct dump *dump, struct radeon_pci *pradeon, struct range *range);
int dump_read(struct dump *dump, const char *filename);
void dump_write(struct dump *dump, struct radeon_pci *pradeon);
int dump_keep_same(struct dump *odump, struct dump *adump, struct dump *bdump);
int dump_keep_diff(struct dump *odump, struct dump *adump, struct dump *bdump);
void dump_print(struct dump *dump);
void dump_fini(struct dump *dump);

#endif