X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Famifb.c;h=4c9ec3f58c52e35c194d98cfebcd830075be6c61;hb=8191ecd1d14c6914c660dfa007154860a7908857;hp=f1ba54f4fc3921ee1ee4816048bcd97c56e54be0;hpb=4bf311ddfbffe12d41ad1a3c311ab727db6f72cb;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index f1ba54f4fc3..4c9ec3f58c5 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include #include @@ -112,7 +112,7 @@ +----------+---------------------------------------------+----------+-------+ | | ^ | | | | | |upper_margin | | | - | | ¥ | | | + | | v | | | +----------###############################################----------+-------+ | # ^ # | | | # | # | | @@ -133,15 +133,15 @@ | # | # | | | # | # | | | # | # | | - | # ¥ # | | + | # v # | | +----------###############################################----------+-------+ | | ^ | | | | | |lower_margin | | | - | | ¥ | | | + | | v | | | +----------+---------------------------------------------+----------+-------+ | | ^ | | | | | |vsync_len | | | - | | ¥ | | | + | | v | | | +----------+---------------------------------------------+----------+-------+ @@ -325,7 +325,7 @@ CCIR -> PAL ----------- - - a scanline is 64 µs long, of which 52.48 µs are visible. This is about + - a scanline is 64 µs long, of which 52.48 µs are visible. This is about 736 visible 70 ns pixels per line. - we have 625 scanlines, of which 575 are visible (interlaced); after rounding this becomes 576. @@ -333,7 +333,7 @@ RETMA -> NTSC ------------- - - a scanline is 63.5 µs long, of which 53.5 µs are visible. This is about + - a scanline is 63.5 µs long, of which 53.5 µs are visible. This is about 736 visible 70 ns pixels per line. - we have 525 scanlines, of which 485 are visible (interlaced); after rounding this becomes 484. @@ -802,7 +802,7 @@ static u_short ecs_palette[32]; static u_short do_vmode_full = 0; /* Change the Video Mode */ static u_short do_vmode_pan = 0; /* Update the Video Mode */ -static short do_blank = 0; /* (Un)Blank the Screen (±1) */ +static short do_blank = 0; /* (Un)Blank the Screen (±1) */ static u_short do_cursor = 0; /* Move the Cursor */ @@ -1144,7 +1144,7 @@ static void amifb_deinit(void); */ static int flash_cursor(void); -static irqreturn_t amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp); +static irqreturn_t amifb_interrupt(int irq, void *dev_id); static u_long chipalloc(u_long size); static void chipfree(void); @@ -2407,10 +2407,10 @@ default_chipset: fb_info.fix.smem_len); if (!videomemory) { printk("amifb: WARNING! unable to map videomem cached writethrough\n"); - videomemory = ZTWO_VADDR(fb_info.fix.smem_start); - } + fb_info.screen_base = (char *)ZTWO_VADDR(fb_info.fix.smem_start); + } else + fb_info.screen_base = (char *)videomemory; - fb_info.screen_base = (char *)videomemory; memset(dummysprite, 0, DUMMYSPRITEMEMSIZE); /* @@ -2453,6 +2453,8 @@ static void amifb_deinit(void) { fb_dealloc_cmap(&fb_info.cmap); chipfree(); + if (videomemory) + iounmap((void*)videomemory); release_mem_region(CUSTOM_PHYSADDR+0xe0, 0x120); custom.dmacon = DMAF_ALL | DMAF_MASTER; } @@ -2492,7 +2494,7 @@ static int flash_cursor(void) * VBlank Display Interrupt */ -static irqreturn_t amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t amifb_interrupt(int irq, void *dev_id) { if (do_vmode_pan || do_vmode_full) ami_update_display(); @@ -2904,14 +2906,6 @@ static int ami_decode_var(struct fb_var_screeninfo *var, par->crsr.spot_x = par->crsr.spot_y = 0; par->crsr.height = par->crsr.width = 0; -#if 0 /* fbmon not done. uncomment for 2.5.x -brad */ - if (!fbmon_valid_timings(pixclock[clk_shift], htotal, vtotal, - &fb_info)) { - DPRINTK("mode doesn't fit for monitor\n"); - return -EINVAL; - } -#endif - return 0; }