Commit 9bc8a5d2 authored by Paul Mundt's avatar Paul Mundt Committed by Linus Torvalds

[PATCH] sh: framebuffer updates

hitfb and pvr2fb were both recently broken by mainline changes, this gets them
working properly again.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ae71d5e5
/* /*
* $Id: hitfb.c,v 1.12 2004/03/16 00:07:51 lethal Exp $
* linux/drivers/video/hitfb.c -- Hitachi LCD frame buffer device * linux/drivers/video/hitfb.c -- Hitachi LCD frame buffer device
*
* (C) 1999 Mihai Spatar * (C) 1999 Mihai Spatar
* (C) 2000 YAEGASHI Takeshi * (C) 2000 YAEGASHI Takeshi
* (C) 2003, 2004 Paul Mundt * (C) 2003, 2004 Paul Mundt
...@@ -40,15 +40,15 @@ ...@@ -40,15 +40,15 @@
static struct fb_var_screeninfo hitfb_var __initdata = { static struct fb_var_screeninfo hitfb_var __initdata = {
.activate = FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
.height = -1, .height = -1,
.width = -1, .width = -1,
.vmode = FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
}; };
static struct fb_fix_screeninfo hitfb_fix __initdata = { static struct fb_fix_screeninfo hitfb_fix __initdata = {
.id = "Hitachi HD64461", .id = "Hitachi HD64461",
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.ypanstep = 8, .ypanstep = 8,
.accel = FB_ACCEL_NONE, .accel = FB_ACCEL_NONE,
}; };
static u32 pseudo_palette[16]; static u32 pseudo_palette[16];
...@@ -255,14 +255,14 @@ static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green, ...@@ -255,14 +255,14 @@ static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green,
} }
static struct fb_ops hitfb_ops = { static struct fb_ops hitfb_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.fb_setcolreg = hitfb_setcolreg, .fb_setcolreg = hitfb_setcolreg,
.fb_blank = hitfb_blank, .fb_blank = hitfb_blank,
.fb_pan_display = hitfb_pan_display, .fb_pan_display = hitfb_pan_display,
.fb_fillrect = hitfb_fillrect, .fb_fillrect = hitfb_fillrect,
.fb_copyarea = hitfb_copyarea, .fb_copyarea = hitfb_copyarea,
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
.fb_cursor = soft_cursor, .fb_cursor = soft_cursor,
}; };
int __init hitfb_init(void) int __init hitfb_init(void)
...@@ -324,7 +324,7 @@ int __init hitfb_init(void) ...@@ -324,7 +324,7 @@ int __init hitfb_init(void)
fb_info.var = hitfb_var; fb_info.var = hitfb_var;
fb_info.fix = hitfb_fix; fb_info.fix = hitfb_fix;
fb_info.pseudo_palette = pseudo_palette; fb_info.pseudo_palette = pseudo_palette;
fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; fb_info.flags = FBINFO_DEFAULT;
fb_info.screen_base = (void *)hitfb_fix.smem_start; fb_info.screen_base = (void *)hitfb_fix.smem_start;
...@@ -345,9 +345,6 @@ static void __exit hitfb_exit(void) ...@@ -345,9 +345,6 @@ static void __exit hitfb_exit(void)
} }
module_init(hitfb_init); module_init(hitfb_init);
#ifdef MODULE
module_exit(hitfb_exit); module_exit(hitfb_exit);
#endif
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Dreamcast. * Dreamcast.
* *
* Copyright (c) 2001 M. R. Brown <mrbrown@0xd6.org> * Copyright (c) 2001 M. R. Brown <mrbrown@0xd6.org>
* Copyright (c) 2001, 2002, 2003, 2004 Paul Mundt <lethal@linux-sh.org> * Copyright (c) 2001, 2002, 2003, 2004, 2005 Paul Mundt <lethal@linux-sh.org>
* *
* This file is part of the LinuxDC project (linuxdc.sourceforge.net). * This file is part of the LinuxDC project (linuxdc.sourceforge.net).
* *
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* Then, when it's time to convert back to hardware settings, the only * Then, when it's time to convert back to hardware settings, the only
* constants are the borderstart_* offsets, all other values are derived from * constants are the borderstart_* offsets, all other values are derived from
* the fb video mode: * the fb video mode:
* *
* // PAL * // PAL
* borderstart_h = 116; * borderstart_h = 116;
* borderstart_v = 44; * borderstart_v = 44;
...@@ -939,7 +939,8 @@ static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev, ...@@ -939,7 +939,8 @@ static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev,
pvr2_fix.mmio_start = pci_resource_start(pdev, 1); pvr2_fix.mmio_start = pci_resource_start(pdev, 1);
pvr2_fix.mmio_len = pci_resource_len(pdev, 1); pvr2_fix.mmio_len = pci_resource_len(pdev, 1);
fbinfo->device = &pdev->dev;
fb_info->device = &pdev->dev;
return pvr2fb_common_init(); return pvr2fb_common_init();
} }
...@@ -1068,7 +1069,6 @@ int __init pvr2fb_init(void) ...@@ -1068,7 +1069,6 @@ int __init pvr2fb_init(void)
size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32); size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32);
fb_info = kmalloc(size, GFP_KERNEL); fb_info = kmalloc(size, GFP_KERNEL);
if (!fb_info) { if (!fb_info) {
printk(KERN_ERR "Failed to allocate memory for fb_info\n"); printk(KERN_ERR "Failed to allocate memory for fb_info\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment