patch-2.1.129 linux/drivers/video/fbcon-iplan2p4.c

Next file: linux/drivers/video/fbcon-iplan2p8.c
Previous file: linux/drivers/video/fbcon-iplan2p2.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.128/linux/drivers/video/fbcon-iplan2p4.c linux/drivers/video/fbcon-iplan2p4.c
@@ -388,6 +388,30 @@
     }
 }
 
+void fbcon_iplan2p4_clear_margins(struct vc_data *conp, struct display *p,
+				  int bottom_only)
+{
+    u32 offset;
+    int bytes;
+    int lines;
+    u32 cval1, cval2;
+
+/* No need to handle right margin, cannot occur with fontwidth == 8 */
+
+    bytes = p->next_line;
+    if (fontheightlog(p)) {
+	lines = p->var.yres - (conp->vc_rows << fontheightlog(p));
+	offset = ((p->yscroll + conp->vc_rows) * bytes) << fontheightlog(p);
+    } else {
+	lines = p->var.yres - conp->vc_rows * fontheight(p);
+	offset = (p->yscroll + conp->vc_rows) * bytes * fontheight(p);
+    }
+    if (lines) {
+	expand4dl(attr_bgcol_ec(p,conp), &cval1, &cval2);
+	memset_even_4p(p->screen_base+offset, lines * bytes, cval1, cval2);
+    }
+}
+
 
     /*
      *  `switch' for the low level operations
@@ -396,7 +420,7 @@
 struct display_switch fbcon_iplan2p4 = {
     fbcon_iplan2p4_setup, fbcon_iplan2p4_bmove, fbcon_iplan2p4_clear,
     fbcon_iplan2p4_putc, fbcon_iplan2p4_putcs, fbcon_iplan2p4_revc, NULL,
-    NULL, NULL, FONTWIDTH(8)
+    NULL, fbcon_iplan2p4_clear_margins, FONTWIDTH(8)
 };
 
 
@@ -422,3 +446,4 @@
 EXPORT_SYMBOL(fbcon_iplan2p4_putc);
 EXPORT_SYMBOL(fbcon_iplan2p4_putcs);
 EXPORT_SYMBOL(fbcon_iplan2p4_revc);
+EXPORT_SYMBOL(fbcon_iplan2p4_clear_margins);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov