version 1.20, 2002/02/04 16:20:20
|
version 1.21, 2002/02/08 16:12:15
|
Line 1070 while ((last_ret=CardServices(last_fn=(f
|
Line 1070 while ((last_ret=CardServices(last_fn=(f
|
#define CFG_CHECK(fn, args...) \ |
#define CFG_CHECK(fn, args...) \ |
if (CardServices(fn, args) != 0) goto next_entry |
if (CardServices(fn, args) != 0) goto next_entry |
|
|
|
static void margi_init(struct cvdv_cards *card) |
|
{ |
|
if (0xdd == read_indexed_register(card, IIO_ID)) { |
|
printk("L64014 Version %d in mode %d detected\n", |
|
(read_indexed_register(card, IIO_MODE) & 248) >> 3, |
|
read_indexed_register(card, IIO_MODE) & 7); |
|
write_indexed_register(card, IIO_GPIO_CONTROL, 0x07); |
|
|
|
L64014Init(card); |
|
|
|
// default: color bars |
|
VideoSetBackground(card, 1, 0, 0, 0); // black |
|
SetVideoSystem(card); |
|
|
|
/*enable L64014 IRQ */ |
|
write_indexed_register(card, IIO_IRQ_CONTROL, |
|
IRQ_POL | IRQ_EN | VSYNC_EN); |
|
// write_indexed_register(card, IIO_IRQ_CONTROL, 0x24); |
|
|
|
OSDOpen(card, 50, 50, 150, 150, 2, 1); |
|
OSDTest(card); |
|
} |
|
|
|
} |
|
|
static void margi_config(dev_link_t * link) |
static void margi_config(dev_link_t * link) |
{ |
{ |
client_handle_t handle = link->handle; |
client_handle_t handle = link->handle; |
Line 1308 static void margi_config(dev_link_t * li
|
Line 1333 static void margi_config(dev_link_t * li
|
printk("\n"); |
printk("\n"); |
|
|
link->state &= ~DEV_CONFIG_PENDING; |
link->state &= ~DEV_CONFIG_PENDING; |
if (0xdd == read_indexed_register(card, IIO_ID)) { |
minorlist[minor] = card; // fast access for the char driver |
printk("L64014 Version %d in mode %d detected\n", |
|
(read_indexed_register(card, IIO_MODE) & 248) >> 3, |
|
read_indexed_register(card, IIO_MODE) & 7); |
|
write_indexed_register(card, IIO_GPIO_CONTROL, 0x07); |
|
|
|
L64014Init(card); |
|
|
|
// default: color bars |
margi_init(card); |
VideoSetBackground(card, 1, 0, 0, 0); // black |
|
SetVideoSystem(card); |
|
minorlist[minor] = card; // fast access for the char driver |
|
|
|
|
|
/*enable L64014 IRQ */ |
|
write_indexed_register(card, IIO_IRQ_CONTROL, |
|
IRQ_POL | IRQ_EN | VSYNC_EN); |
|
// write_indexed_register(card, IIO_IRQ_CONTROL, 0x24); |
|
|
|
OSDOpen(card, 50, 50, 150, 150, 2, 1); |
|
OSDTest(card); |
|
} |
|
return; |
return; |
|
|
cs_failed: |
cs_failed: |
Line 1455 static int margi_event(event_t event, in
|
Line 1461 static int margi_event(event_t event, in
|
if (link->state & DEV_CONFIG) |
if (link->state & DEV_CONFIG) |
CardServices(RequestConfiguration, link->handle, |
CardServices(RequestConfiguration, link->handle, |
&link->conf); |
&link->conf); |
|
margi_init(&dev->card); |
dev->stop = 0; |
dev->stop = 0; |
/* |
/* |
In a normal driver, additional code may go here to restore |
In a normal driver, additional code may go here to restore |