* [PATCH 2/5]: vga16fb fixes
@ 2003-02-16 6:08 Antonino Daplas
2003-02-16 16:37 ` James Simmons
0 siblings, 1 reply; 2+ messages in thread
From: Antonino Daplas @ 2003-02-16 6:08 UTC (permalink / raw)
To: James Simmons, Geert Uytterhoeven; +Cc: Linux Fbdev development list
[-- 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 = {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-16 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-16 6:08 [PATCH 2/5]: vga16fb fixes Antonino Daplas
2003-02-16 16:37 ` James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).