@@ -295,20 +295,26 @@ static irqreturn_t davincifb_isr(int irq, void *arg)
unsigned long addr=0;
if ((dispc_reg_in(VENC_VSTAT) & 0x00000010) == 0x10) {
- xchg(&addr, dm->osd0->sdram_address);
- if (addr) {
- set_sdram_params(dm->osd0->info.fix.id,
- dm->osd0->sdram_address,
- dm->osd0->info.fix.line_length);
- dm->osd0->sdram_address = 0;
+ if (dm->osd0)
+ {
+ xchg(&addr, dm->osd0->sdram_address);
+ if (addr) {
+ set_sdram_params(dm->osd0->info.fix.id,
+ dm->osd0->sdram_address,
+ dm->osd0->info.fix.line_length);
+ dm->osd0->sdram_address = 0;
+ }
}
- addr = 0;
- xchg(&addr, dm->osd1->sdram_address);
- if (addr) {
- set_sdram_params(dm->osd1->info.fix.id,
- dm->osd1->sdram_address,
- dm->osd1->info.fix.line_length);
- dm->osd1->sdram_address = 0;
+ if (dm->osd1)
+ {
+ addr = 0;
+ xchg(&addr, dm->osd1->sdram_address);
+ if (addr) {
+ set_sdram_params(dm->osd1->info.fix.id,
+ dm->osd1->sdram_address,
+ dm->osd1->info.fix.line_length);
+ dm->osd1->sdram_address = 0;
+ }
}
addr = 0;
xchg(&addr, dm->vid0->sdram_address);
@@ -318,13 +324,16 @@ static irqreturn_t davincifb_isr(int irq, void *arg)
dm->vid0->info.fix.line_length);
dm->vid0->sdram_address = 0;
}
- addr = 0;
- xchg(&addr, dm->vid1->sdram_address);
- if (addr) {
- set_sdram_params(dm->vid1->info.fix.id,
- dm->vid1->sdram_address,
- dm->vid1->info.fix.line_length);
- dm->vid1->sdram_address = 0;
+ if (dm->vid1)
+ {
+ addr = 0;
+ xchg(&addr, dm->vid1->sdram_address);
+ if (addr) {
+ set_sdram_params(dm->vid1->info.fix.id,
+ dm->vid1->sdram_address,
+ dm->vid1->info.fix.line_length);
+ dm->vid1->sdram_address = 0;
+ }
}
return IRQ_HANDLED;
} else {