Rev 471 | Rev 473 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
471 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Giacomo Guidi <giacomo@gandalf.sssup.it> |
||
10 | * |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /* Glue Layer for Frame Buffer 2.6 Driver */ |
||
20 | |||
21 | #include <kernel/kern.h> |
||
22 | |||
23 | extern int fbmem_init(void); |
||
24 | extern int fb_open_inode(int num); |
||
25 | extern int fb_close_inode(int num); |
||
472 | giacomo | 26 | extern int fb_set_mode_inode(int num, int wx, int wy, int bpp); |
471 | giacomo | 27 | |
28 | /* Init the Linux PCI 2.6 Driver */ |
||
29 | int FB26_init() { |
||
30 | |||
472 | giacomo | 31 | if (fbmem_init()) { |
32 | printk("FB ERROR: Cannot init the FrameBuffer driver\n"); |
||
33 | return -1; |
||
34 | } |
||
471 | giacomo | 35 | |
36 | return 0; |
||
37 | |||
38 | } |
||
39 | |||
40 | int FB26_open(int num) { |
||
41 | |||
472 | giacomo | 42 | if (fb_open_inode(num)) { |
43 | printk("FB ERROR: Cannot open the FrameBuffer driver\n"); |
||
44 | return -1; |
||
45 | } |
||
471 | giacomo | 46 | |
47 | return 0; |
||
48 | |||
49 | } |
||
50 | |||
472 | giacomo | 51 | int FB26_set_mode(int num, int wx, int wy, int bpp) { |
52 | |||
53 | if (fb_set_mode_inode(num,wx,wy,bpp)) { |
||
54 | printk("FB ERROR: Cannot set mode for FrameBuffer driver\n"); |
||
55 | return -1; |
||
56 | } |
||
57 | |||
58 | return 0; |
||
59 | |||
60 | } |
||
61 | |||
471 | giacomo | 62 | int FB26_close(int num) { |
63 | |||
472 | giacomo | 64 | if (fb_close_inode(num)) { |
65 | printk("FB ERROR: Cannot close the FrameBuffer driver\n"); |
||
66 | return -1; |
||
67 | } |
||
68 | |||
471 | giacomo | 69 | return 0; |
70 | |||
71 | } |