Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 484 → Rev 483

/shark/trunk/drivers/fb/fbmem.c
962,8 → 962,6
return fb_set_cmap(&cmap, 1, info);
}
 
int debx,deby,debb;
 
int
fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
977,6 → 975,7
struct fb_con2fbmap con2fb;
#endif
struct fb_cmap cmap;
struct fb_fillrect rect;
int i;
if (!fb)
992,6 → 991,23
if (i) return i;
if (copy_to_user((void *) arg, &var, sizeof(var)))
return -EFAULT;
 
rect.dx = 0;
rect.dy = 0;
rect.width = info->var.xres;
rect.height = info->var.yres;
rect.color = 0;
rect.rop = ROP_COPY;
cfb_fillrect(info,&rect);
if (info->var.bits_per_pixel >= 8) {
fb_prepare_logo(info);
fb_show_logo(info);
}
 
return 0;
case FBIOGET_FSCREENINFO:
return copy_to_user((void *) arg, &info->fix,
1174,8 → 1190,7
module_put(info->fbops->owner);
}
 
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
info->fbops->fb_set_par(info);
fb_pan_display(info, &info->var);
 
rect.dx = 0;
1382,10 → 1397,19
 
int fb_set_mode_inode(int num, unsigned char *modeopt) {
 
struct inode *i;
struct fb_var_screeninfo var;
struct fb_info *info = registered_fb[num];
struct fb_fillrect rect;
 
i = (struct inode *)kmalloc(sizeof(struct inode),GFP_KERNEL);
 
linuxcomp_setfd(i,num);
 
if (fb_ioctl(i, NULL, FBIOGET_VSCREENINFO, (unsigned long)&var)) {
kfree(i);
return -1;
}
 
fb_find_mode(&var,info,modeopt,NULL,0,NULL,0);
 
var.xoffset = 0;
1393,34 → 1417,13
var.xres_virtual = var.xres;
var.yres_virtual = var.yres;
 
if (info->fbops->fb_check_var)
info->fbops->fb_check_var(&var, info);
memcpy(&(info->var),&var,sizeof(struct fb_var_screeninfo));
if (fb_ioctl(i, NULL, FBIOPUT_VSCREENINFO, (unsigned long)&var)) {
kfree(i);
return -1;
}
 
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
fb_pan_display(info, &info->var);
kfree(i);
 
if (info->var.bits_per_pixel > 8)
info->fix.visual = FB_VISUAL_TRUECOLOR;
 
rect.dx = 0;
rect.dy = 0;
rect.width = info->var.xres;
rect.height = info->var.yres;
rect.color = 0;
rect.rop = ROP_COPY;
cfb_fillrect(info,&rect);
if (info->var.bits_per_pixel >= 8) {
fb_prepare_logo(info);
fb_show_logo(info);
}
 
return 0;
}
/shark/trunk/drivers/fb/shark_fb26.c
23,7 → 23,7
extern void fbmem_init(void);
extern int fb_open_inode(int num);
extern int fb_close_inode(int num);
extern int fb_set_mode_inode(int num, unsigned char *modeopt);
extern int fb_set_mode_inode(int num, int wx, int wy, int bpp);
 
/* Init the Linux PCI 2.6 Driver */
int FB26_init() {
45,9 → 45,9
 
}
 
int FB26_setmode(int num, unsigned char *modeopt) {
int FB26_set_mode(int num, int wx, int wy, int bpp) {
 
if (fb_set_mode_inode(num,modeopt)) {
if (fb_set_mode_inode(num,wx,wy,bpp)) {
printk("FB ERROR: Cannot set mode for FrameBuffer driver\n");
return -1;
}
/shark/trunk/drivers/fb/include/drivers/shark_fb26.h
22,16 → 22,13
#define __SHARK_FB26__
 
/* Init the FB 2.6 Driver */
int FB26_init();
int FB26_init(void);
 
/* Open FB */
/* Open the FB */
int FB26_open(int num);
 
/* Close the FB */
int FB26_close(int num);
 
/* Set mode */
int FB26_setmode(int num, unsigned char *modeopt);
 
#endif
 
/shark/trunk/drivers/fb/shark_fb.c
0,0 → 1,35
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
*
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
 
/* Glue Layer for Frame Buffer 2.6 Driver */
#include <kernel/kern.h>
 
extern int fbmem_init(void);
extern int fb_open_inode(int num);
 
/* Init the Linux PCI 2.6 Driver */
int FB26_init() {
 
fbmem_init();
 
fb_open_inode(0);
 
return 0;
 
}