K Krzysztof Helt #
Message details and related content
From: Krzysztof Helt <redacted> Few more fixes for the tridentfb driver: - the set_vclk() function uses mmio region outb() (because mmio is already enabled) - the memory size of 512KB is correctly calculated - enable_mmio() in the setpar function is removed as the mmio is already enabled - mmio is disabled on driver removal Signed-off-by: Krzysztof Helt <redacted> --- diff -urp linux-ref/drivers/video/tridentfb.c linux-2.6.23/drivers/video/tridentfb.c
--- linux-ref/drivers/video/tridentfb.c 2007-11-01 14:07:27.461666762 +0100
+++ linux-2.6.23/drivers/video/tridentfb.c 2007-11-01 15:02:17.622078751 +0100@@ -702,8 +701,8 @@ static void set_vclk(int freq) write3C4(ClockHigh, hi); write3C4(ClockLow, lo); } else { - outb(lo, 0x43C8); - outb(hi, 0x43C9); + t_outb(lo, 0x43C8); + t_outb(hi, 0x43C9); } debug("VCLK = %X %X\n", hi, lo); }
@@ -755,7 +754,7 @@ static unsigned int __devinit get_memsiz switch (tmp) { case 0x01: - k = 512; + k = 512 * Kb; break; case 0x02: k = 6 * Mb; /* XP */
@@ -864,7 +863,6 @@ static int tridentfb_check_var(struct fb debug("exit\n"); return 0; - } /* Pan the display */
@@ -912,7 +912,6 @@ static int tridentfb_set_par(struct fb_i vblankstart = var->yres; vblankend = vtotal + 2; - enable_mmio(); crtc_unlock(); write3CE(CyberControl, 8);
@@ -1348,9 +1347,10 @@ static void __devexit trident_pci_remove struct tridentfb_par *par = (struct tridentfb_par*)fb_info.par; unregister_framebuffer(&fb_info); iounmap(par->io_virt); + release_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len); + disable_mmio(); iounmap(fb_info.screen_base); release_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len); - release_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len); } /* List of boards that we are trying to support */ -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/