patch-2.4.0-test6 linux/drivers/video/acornfb.c
Next file: linux/drivers/video/chipsfb.c
Previous file: linux/drivers/video/S3triofb.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Wed Aug 9 14:11:11 2000
- Orig file:
v2.4.0-test5/linux/drivers/video/acornfb.c
- Orig date:
Thu Jul 27 17:38:01 2000
diff -u --recursive --new-file v2.4.0-test5/linux/drivers/video/acornfb.c linux/drivers/video/acornfb.c
@@ -22,6 +22,7 @@
#include <linux/malloc.h>
#include <linux/init.h>
#include <linux/fb.h>
+#include <linux/wrapper.h>
#include <asm/hardware.h>
#include <asm/io.h>
@@ -1532,8 +1533,8 @@
* set count to 1, and free
* the page.
*/
- clear_bit(PG_reserved, &mem_map[MAP_NR(virtual_start)].flags);
- atomic_set(&mem_map[MAP_NR(virtual_start)].count, 1);
+ mem_map_unreserve(virt_to_page(virtual_start));
+ atomic_set(&virt_to_page(virtual_start)->count, 1);
free_page(virtual_start);
virtual_start += PAGE_SIZE;
@@ -1628,7 +1629,7 @@
for (page = current_par.screen_base;
page < PAGE_ALIGN(current_par.screen_base + size);
page += PAGE_SIZE)
- mem_map[MAP_NR(page)].flags |= (1 << PG_reserved);
+ mem_map_reserve(virt_to_page(page));
/* Hand back any excess pages that we allocated. */
for (page = current_par.screen_base + size; page < top; page += PAGE_SIZE)
free_page(page);
@@ -1662,8 +1663,12 @@
sizeof(modedb) / sizeof(*modedb),
&acornfb_default_mode, DEFAULT_BPP);
- if (!rc && fb_find_mode(&init_var, &fb_info, NULL, NULL, 0,
- &acornfb_default_mode, DEFAULT_BPP)) {
+ /*
+ * If we didn't find an exact match, try the
+ * generic database.
+ */
+ if (rc != 1 && fb_find_mode(&init_var, &fb_info, NULL, NULL, 0,
+ &acornfb_default_mode, DEFAULT_BPP)) {
printk("Acornfb: no valid mode found\n");
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)