Rev 472 | Rev 484 | 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 | |||
473 | giacomo | 23 | extern void fbmem_init(void); |
471 | giacomo | 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 | |||
473 | giacomo | 31 | fbmem_init(); |
471 | giacomo | 32 | |
33 | return 0; |
||
34 | |||
35 | } |
||
36 | |||
37 | int FB26_open(int num) { |
||
38 | |||
472 | giacomo | 39 | if (fb_open_inode(num)) { |
40 | printk("FB ERROR: Cannot open the FrameBuffer driver\n"); |
||
41 | return -1; |
||
42 | } |
||
471 | giacomo | 43 | |
44 | return 0; |
||
45 | |||
46 | } |
||
47 | |||
472 | giacomo | 48 | int FB26_set_mode(int num, int wx, int wy, int bpp) { |
49 | |||
50 | if (fb_set_mode_inode(num,wx,wy,bpp)) { |
||
51 | printk("FB ERROR: Cannot set mode for FrameBuffer driver\n"); |
||
52 | return -1; |
||
53 | } |
||
54 | |||
55 | return 0; |
||
56 | |||
57 | } |
||
58 | |||
471 | giacomo | 59 | int FB26_close(int num) { |
60 | |||
472 | giacomo | 61 | if (fb_close_inode(num)) { |
62 | printk("FB ERROR: Cannot close the FrameBuffer driver\n"); |
||
63 | return -1; |
||
64 | } |
||
65 | |||
471 | giacomo | 66 | return 0; |
67 | |||
68 | } |