xref: /haiku/src/add-ons/accelerants/matrox/GetDeviceInfo.c (revision 95bac3fda53a4cb21880712d7b43f8c21db32a2e)
1 /*
2 	Author:
3 	Rudolf Cornelissen 11/2004
4 */
5 
6 #define MODULE_BIT 0x04000000
7 
8 #include "acc_std.h"
9 
10 /* Get some info about the device */
11 status_t GET_ACCELERANT_DEVICE_INFO(accelerant_device_info * adi)
12 {
13 	LOG(4,("GET_ACCELERANT_DEVICE_INFO: returning info\n"));
14 
15 	/* no info on version is provided, so presumably this is for my info */
16 	adi->version = 1;
17 
18 	sprintf(adi->name, "Matrox chipset");
19 	switch (si->ps.card_type)
20 	{
21 	case MIL1:
22 		sprintf(adi->chipset, "Millennium I");
23 		break;
24 	case MYST:
25 		sprintf(adi->chipset, "Mystique");
26 		break;
27 	case MIL2:
28 		sprintf(adi->chipset, "Millennium II");
29 		break;
30 	case G100:
31 		sprintf(adi->chipset, "G100");
32 		break;
33 	case G200:
34 		sprintf(adi->chipset, "G200");
35 		break;
36 	case G400:
37 	case G400MAX:
38 		sprintf(adi->chipset, "G400");
39 		break;
40 	case G450:
41 		sprintf(adi->chipset, "G450");
42 		break;
43 	case G550:
44 		sprintf(adi->chipset, "G550");
45 		break;
46 	default:
47 		sprintf(adi->chipset, "unknown");
48 		break;
49 	}
50 	sprintf(adi->serial_no, "unknown");
51 	adi->memory = (si->ps.memory_size * 1024 * 1024);
52 	adi->dac_speed = si->ps.max_dac1_clock;
53 
54 	return B_OK;
55 }
56