imacfb: Add Intel-based Macintosh Framebuffer Support
PATCH 1/1 imacfb: Add Intel-based Macintosh Framebuffer Support
From: Edgar Hucek <[email protected]>
This patch adds a new framebuffer driver for the Intel Based macs. This framebuffer is needed when booting from EFI to get something out the box.
---
drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 drivers/video/imacfb.c | 343 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 353 insertions(+), 0 deletions(-)
drivers/video/Kconfig +9 -0
@@ -550,6 +550,15 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read <file:Documentation/fb/vesafb.txt>. If unsure, say Y. +config FB_IMAC + bool "Intel-based Macintosh Framebuffer Support" + depends on (FB = y) && X86 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Intel-based Macintosh + config FB_HGA tristate "Hercules mono graphics support" depends on FB && X86
drivers/video/Makefile +1 -0
@@ -97,6 +97,7 @@ obj-$(CONFIG_FB_S3C2410) += s3c2410fb. # Platform or fallback drivers go here obj-$(CONFIG_FB_VESA) += vesafb.o +obj-$(CONFIG_FB_IMAC) += imacfb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o vgastate.o obj-$(CONFIG_FB_OF) += offb.o
drivers/video/imacfb.c new file +343 -0
343 lines not on this page · raw message
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 3 lines · On Sun, 25 Jun 2006 18:06:51 +0800 "Antonino A. Daplas" <[email protected]>…
This patch adds a new framebuffer driver for the Intel Based macs. This framebuffer is needed when booting from EFI to get something out the box.
A few fixlets below.
This driver looks like it'll leak lots of things when the module is unloaded.
From: Andrew Morton <[email protected]>
- coding style tweaks
- remove unneeded initialisation of statics
---
drivers/video/imacfb.c | 72 ++++++++++++++++++++------------------- video/Makefile | 0 2 files changed, 37 insertions(+), 35 deletions(-)
drivers/video/imacfb.c renamed from drivers/video/imacfb.c~imacfb-add-intel-based-macintosh-framebuffer-support-tidy +37 -35
@@ -51,10 +51,10 @@ static struct fb_fix_screeninfo imacfb_f .visual = FB_VISUAL_TRUECOLOR, }; -static int inverse =0 ; +static int inverse;static int model =M_NEW ; -static int manual_height =0 ; -static int manual_width =0 ; +static int manual_height; +static int manual_width;#define DEFAULT_FB_MEM 1024*1024*16
@@ -105,7 +105,7 @@ static int __init imacfb_setup(char *optif (!*this_opt)continue ;if (!strcmp (this_opt,"inverse" )) - inverse=1 ; + inverse =1 ;else if (!strcmp (this_opt,"i17" )) model =M_I17 ;else if (!strcmp (this_opt,"i20" ))
@@ -142,32 +142,32 @@ static int __init imacfb_probe(struct pl screen_info.rsvd_size =8 ; screen_info.rsvd_pos =24 ; -switch (model) { -case M_I17 : - screen_info.lfb_width =1440 ; - screen_info.lfb_height =900 ; - screen_info.lfb_linelength =1472 *4 ; - screen_info.lfb_base =0x80010000 ; -break ; -case M_NEW : -case M_I20 : - screen_info.lfb_width =1680 ; - screen_info.lfb_height =1050 ; - screen_info.lfb_linelength =1728 *4 ; - screen_info.lfb_base =0x80010000 ; -break ; -case M_MINI : - screen_info.lfb_width =1024 ; - screen_info.lfb_height =768 ; - screen_info.lfb_linelength =2048 *4 ; - screen_info.lfb_base =0x80000000 ; -break ; -case M_MACBOOK : - screen_info.lfb_width =1280 ; - screen_info.lfb_height =800 ; - screen_info.lfb_linelength =2048 *4 ; - screen_info.lfb_base =0x80000000 ; -break ; +switch (model) { +case M_I17 : + screen_info.lfb_width =1440 ; + screen_info.lfb_height =900 ; + screen_info.lfb_linelength =1472 *4 ; + screen_info.lfb_base =0x80010000 ; +break ; +case M_NEW : +case M_I20 : + screen_info.lfb_width =1680 ; + screen_info.lfb_height =1050 ; + screen_info.lfb_linelength =1728 *4 ; + screen_info.lfb_base =0x80010000 ; +break ; +case M_MINI : + screen_info.lfb_width =1024 ; + screen_info.lfb_height =768 ; + screen_info.lfb_linelength =2048 *4 ; + screen_info.lfb_base =0x80000000 ; +break ; +case M_MACBOOK : + screen_info.lfb_width =1280 ; + screen_info.lfb_height =800 ; + screen_info.lfb_linelength =2048 *4 ; + screen_info.lfb_base =0x80000000 ; +break ; }/* if the user wants to manually specify height/width,
@@ -229,8 +229,8 @@ static int __init imacfb_probe(struct pl info->screen_base =ioremap (imacfb_fix.smem_start, imacfb_fix.smem_len);if (!info->screen_base) { -printk (KERN_ERR -"imacfb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n" , +printk (KERN_ERR "imacfb: abort, cannot ioremap video memory " +"0x%x @ 0x%lx\n" , imacfb_fix.smem_len, imacfb_fix.smem_start); err = -EIO ; goto err_unmap;
@@ -241,11 +241,13 @@ static int __init imacfb_probe(struct pl imacfb_fix.smem_start, info->screen_base, size_remap/1024, size_total/1024);printk (KERN_INFO "imacfb: mode is %dx%dx%d, linelength=%d, pages=%d\n" , - imacfb_defined.xres, imacfb_defined.yres, imacfb_defined.bits_per_pixel, - imacfb_fix.line_length, screen_info.pages); + imacfb_defined.xres, imacfb_defined.yres, + imacfb_defined.bits_per_pixel, imacfb_fix.line_length, + screen_info.pages); imacfb_defined.xres_virtual = imacfb_defined.xres; - imacfb_defined.yres_virtual = imacfb_fix.smem_len / imacfb_fix.line_length; + imacfb_defined.yres_virtual = imacfb_fix.smem_len / + imacfb_fix.line_length;printk (KERN_INFO "imacfb: scrolling: redraw\n" ); imacfb_defined.yres_virtual = imacfb_defined.yres;
diff -puN drivers/video/Kconfig~imacfb-add-intel-based-macintosh-framebuffer-support-tidy drivers/video/Kconfig diff -puN drivers/video/Makefile~imacfb-add-intel-based-macintosh-framebuffer-support-tidy drivers/video/Makefile _
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 10 lines · Andrew Morton
Quoted 3 lines · On Sun, 25 Jun 2006 18:06:51 +0800 "Antonino A. Daplas" <[email protected]>…
This patch adds a new framebuffer driver for the Intel Based macs. This framebuffer is needed when booting from EFI to get something out the box.
A few fixlets below.
This driver looks like it'll leak lots of things when the module is unloaded.
It can't and shouldn't be compiled as a module.
Tony
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 7 lines · Antonino A. Daplas
Quoted 6 lines · Andrew Morton
Quoted 3 lines · On Sun, 25 Jun 2006 18:06:51 +0800 "Antonino A. Daplas" <[email protected]>…
This patch adds a new framebuffer driver for the Intel Based macs. This framebuffer is needed when booting from EFI to get something out the box.
Quoted 8 lines
Quoted 3 lines
A few fixlets below.
This driver looks like it'll leak lots of things when the module is unloaded.
It can't and shouldn't be compiled as a module.
Tony
It was never supposed to build the driver as module.
cu
Edgar (gimli) Hucek
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642