xref: /haiku/src/add-ons/kernel/drivers/graphics/radeon_hd/radeon_hd_private.h (revision a127b88ecbfab58f64944c98aa47722a18e363b2)
1 /*
2  * Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  *		Clemens Zeidler, haiku@clemens-zeidler.de
8  */
9 #ifndef RADEON_RD_PRIVATE_H
10 #define RADEON_RD_PRIVATE_H
11 
12 
13 #include <AGP.h>
14 #include <KernelExport.h>
15 #include <PCI.h>
16 
17 
18 #include "radeon_hd.h"
19 #include "lock.h"
20 
21 
22 // PCI Base Address Registers
23 #define PCI_BAR_FB      0
24 
25 #define RADEON_BIOS8(adr, v) 	(adr[v])
26 #define RADEON_BIOS16(adr, v) 	((adr[v]) | (adr[(v) + 1] << 8))
27 #define RADEON_BIOS32(adr, v)	\
28 	((RADEON_BIOS16(adr, v) | RADEON_BIOS16(adr, v + 2) << 16))
29 
30 
31 struct radeon_info {
32 	int32			open_count;
33 	status_t		init_status;
34 	int32			id;
35 	pci_info*		pci;
36 	addr_t			registers;
37 
38 	uint8*			atom_buffer;	// buffer for atombios
39 
40 	area_id			registers_area;
41 	area_id			framebuffer_area;
42 	area_id			rom_area;
43 
44 	struct radeon_shared_info* shared_info;
45 	area_id			shared_area;
46 
47 	uint32			pciID;
48 	const char*		deviceName;
49 	uint16			chipsetID;
50 	const char*		chipsetName;
51 	uint32			chipsetFlags;
52 	uint8			dceMajor;
53 	uint8			dceMinor;
54 };
55 
56 
57 extern status_t radeon_hd_init(radeon_info& info);
58 extern void radeon_hd_uninit(radeon_info& info);
59 
60 
61 #endif  /* RADEON_RD_PRIVATE_H */
62