All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: James Simmons <jsimmons@infradead.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH 2/5]: vga16fb fixes
Date: 16 Feb 2003 14:08:47 +0800	[thread overview]
Message-ID: <1045375686.1823.73.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 90 bytes --]

Attached is a patch (linux-2.5.61 + James' fbdev.diff) to fix compile warnings.

Tony 




[-- Attachment #2: vga16fb.diff --]
[-- Type: text/x-patch, Size: 2651 bytes --]

diff -Naur linux-2.5.61-fbdev/drivers/video/vga16fb.c linux-2.5.61-ad/drivers/video/vga16fb.c
--- linux-2.5.61-fbdev/drivers/video/vga16fb.c	2003-02-16 00:55:53.000000000 +0000
+++ linux-2.5.61-ad/drivers/video/vga16fb.c	2003-02-16 02:34:06.000000000 +0000
@@ -305,7 +305,8 @@
 
 	if (!cnt) {
 		memset(&par->state, 0, sizeof(struct vgastate));
-		par->state.flags = 8;
+		par->state.flags = VGA_SAVE_FONTS | VGA_SAVE_MODE |
+			VGA_SAVE_CMAP;
 		save_vga(&par->state);
 	}
 	atomic_inc(&par->ref_count);
@@ -1164,14 +1165,14 @@
 #endif
 #endif
 
-void vga_8planes_imageblit(struct fb_info *info, const struct fb_image *image)
+void vga_8planes_imageblit(struct fb_info *info, struct fb_image *image)
 {
         char oldindex = getindex();
         char oldmode = setmode(0x40);
         char oldop = setop(0);
         char oldsr = setsr(0);
         char oldmask = selectmask();
-        u8 *cdat = image->data;
+        const char *cdat = image->data;
 	u32 dx = image->dx;
         char *where;
         int y;
@@ -1195,12 +1196,12 @@
         setindex(oldindex);
 }
 
-void vga_imageblit_expand(struct fb_info *info, const struct fb_image *image)
+void vga_imageblit_expand(struct fb_info *info, struct fb_image *image)
 {
 	char *where = info->screen_base + (image->dx/8) + 
 		image->dy * info->fix.line_length;
 	struct vga16fb_par *par = (struct vga16fb_par *) info->par;
-	u8 *cdat = image->data, *dst;
+	char *cdat = (char *) image->data, *dst;
 	int x, y;
 
 	switch (info->fix.type) {
@@ -1258,7 +1259,7 @@
 	}
 }
 
-void vga_imageblit_color(struct fb_info *info, const struct fb_image *image) 
+void vga_imageblit_color(struct fb_info *info, struct fb_image *image) 
 {
 	/*
 	 * Draw logo 
@@ -1266,7 +1267,7 @@
 	struct vga16fb_par *par = (struct vga16fb_par *) info->par;
 	char *where = info->screen_base + image->dy * info->fix.line_length + 
 		image->dx/8;
-	char *cdat = image->data, *dst;
+	const char *cdat = image->data, *dst;
 	int x, y;
 
 	switch (info->fix.type) {
@@ -1301,12 +1302,14 @@
 	}
 }
 				
-void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image)
+void vga16fb_imageblit(struct fb_info *info, const struct fb_image *img)
 {
-	if (image->depth == 1)
-		vga_imageblit_expand(info, image);
-	else if (image->depth == info->var.bits_per_pixel)
-		vga_imageblit_color(info, image);
+	struct fb_image image = *img;
+
+	if (image.depth == 0)
+		vga_imageblit_expand(info, &image);
+	else if (image.depth == info->var.bits_per_pixel)
+		vga_imageblit_color(info, &image);
 }
 
 static struct fb_ops vga16fb_ops = {

             reply	other threads:[~2003-02-16  6:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-16  6:08 Antonino Daplas [this message]
2003-02-16 16:37 ` [PATCH 2/5]: vga16fb fixes James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1045375686.1823.73.camel@localhost.localdomain \
    --to=adaplas@pol.net \
    --cc=geert@linux-m68k.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.