Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 178 → Rev 179

/shark/trunk/drivers/bttv/bttv-driver.c
55,6 → 55,7
 
int bttv_num; /* number of Bt848s in use */
int in_irq = 0;
DWORD oldpci_command;
struct bttv *btvirq;
struct bttv bttvs[BTTV_MAX];
 
143,28 → 144,7
free(ptr-4-*(unsigned long *)(ptr-4));
 
}
/*
* Create the giant waste of buffer space we need for now
* until we get DMA to user space sorted out (probably 2.3.x)
*
* We only create this as and when someone uses mmap
*/
static int fbuffer_alloc(struct bttv *btv)
{
if(!btv->fbuffer) {
btv->fbuffer=(unsigned char *) vmalloc_32(gbuffers*gbufsize);
memset(btv->fbuffer, 0, gbuffers*gbufsize);
} else
printk(KERN_ERR "bttv%d: Double alloc of fbuffer!\n",
btv->nr);
if(!btv->fbuffer)
return -ENOBUFS;
return 0;
}
 
/* ----------------------------------------------------------------------- */
 
void bttv_gpio_tracking(struct bttv *btv, char *comment)
{
unsigned int outbits, data;
998,10 → 978,7
unsigned int *vbuf;
 
if(btv->fbuffer==NULL)
{
if(fbuffer_alloc(btv))
return -ENOBUFS;
}
return -ENOBUFS;
 
if(mp->frame >= gbuffers || mp->frame < 0)
return -EINVAL;
1144,8 → 1121,9
unsigned long tmp;
int need_wait;
 
//bt848_dma(btv,0);
 
vfree_32(btv->fbuffer);
btv->fbuffer = NULL;
btv->user--;
need_wait = (-1 != btv->gq_grab);
btv->gq_start = 0;
1165,15 → 1143,13
* and the DMA control operations are posted PCI
* operations.
*/
tmp = btread(BT848_I2C); /* This fixes the PCI posting delay */
 
tmp = btread(BT848_I2C); /* This fixes the PCI posting delay */
if(btv->fbuffer)
vfree_32((void *) btv->fbuffer);
btv->fbuffer=0;
pci_write_config_dword(btv->dev,PCI_COMMAND,oldpci_command);
 
}
 
 
/***********************************/
/* ioctls and supporting functions */
/***********************************/
2111,7 → 2087,7
DWORD dw;
 
printk(KERN_INFO "Initializing PCI BUS...\n");
btv->dev = vmalloc_32(sizeof(struct pci_dev));
 
/* Scan the devices connected to the PCI bus */
2141,8 → 2117,9
 
pcibios_read_config_dword(bus, dv, PCI_BASE_ADDRESS_0, (DWORD *)&(btv->dev->base_address[0]));
pcibios_read_config_byte(bus, dv, PCI_INTERRUPT_LINE, (BYTE *)&(btv->dev->irq));
 
pcibios_read_config_dword(bus,dv,PCI_COMMAND,&dw);
oldpci_command = dw;
dw |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
pcibios_write_config_dword(bus,dv,PCI_COMMAND,dw);
/shark/trunk/drivers/bttv/fg.c
71,7 → 71,7
if (refresh_PID == -1) {
sys_end();
}
bttv_start(&btv);
bttv_ioctl(&btv, VIDIOCGWIN, &vw);
115,13 → 115,12
{
 
task_activate(refresh_PID);
}
 
void FG_close(void)
{
 
task_kill(refresh_PID);
sleep(1);
bttv_close(&btv);
}
/shark/trunk/drivers/svga/vga.c
1228,7 → 1228,7
#ifndef VM86
BYTE p1,p2;
#endif
printk(KERN_INFO "Setmode %i from %i\n", mode, CM);
 
if(mode==-1)return vga_version;
1255,6 → 1255,8
if (mode == TEXT) {
/* Returning to textmode. */
 
cli();
X_REGS16 inregs, outregs;
X_SREGS16 sregs;
 
1273,6 → 1275,8
if (SVGAMODE(prv_mode)) vga_setpage(0);
 
sti();
 
} else {
/* Setting a graphics mode. */
 
1337,7 → 1341,6
MODEX = ((MODEFLAGS = modeinfo->flags) & IS_MODEX);
}
 
// __svgalib_enable_interrupt();
}
 
return 0;