All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
@ 2006-06-25 10:06 Antonino A. Daplas
  2006-06-25 10:37 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Antonino A. Daplas @ 2006-06-25 10:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Fbdev development list

From: Edgar Hucek <hostmaster@ed-soft.at>

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.

Signed-off-by: Edgar Hucek <hostmaster@ed-soft.at>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 drivers/video/Kconfig  |    9 +
 drivers/video/Makefile |    1 
 drivers/video/imacfb.c |  343 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 353 insertions(+), 0 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2a265e1..17de4c8 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -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
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 4800358..c335e9b 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -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
 
diff --git a/drivers/video/imacfb.c b/drivers/video/imacfb.c
new file mode 100644
index 0000000..3c47eab
--- /dev/null
+++ b/drivers/video/imacfb.c
@@ -0,0 +1,343 @@
+/*
+ * framebuffer driver for Intel Based Mac's
+ *
+ * (c) 2006 Edgar Hucek <gimli@dark-green.com>
+ * Original imac driver written by Gerd Knorr <kraxel@goldbach.in-berlin.de>
+ *
+ */
+
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/fb.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/tty.h>
+
+#include <asm/io.h>
+
+#include <video/vga.h>
+
+typedef enum _MAC_TYPE {
+	M_I17,
+	M_I20,
+	M_MINI,
+	M_MACBOOK,
+	M_NEW
+} MAC_TYPE;
+
+/* --------------------------------------------------------------------- */
+
+static struct fb_var_screeninfo imacfb_defined __initdata = {
+	.activate		= FB_ACTIVATE_NOW,
+	.height			= -1,
+	.width			= -1,
+	.right_margin		= 32,
+	.upper_margin		= 16,
+	.lower_margin		= 4,
+	.vsync_len		= 4,
+	.vmode			= FB_VMODE_NONINTERLACED,
+};
+
+static struct fb_fix_screeninfo imacfb_fix __initdata = {
+	.id			= "IMAC VGA",
+	.type			= FB_TYPE_PACKED_PIXELS,
+	.accel			= FB_ACCEL_NONE,
+	.visual			= FB_VISUAL_TRUECOLOR,
+};
+
+static int inverse		= 0;
+static int model		= M_NEW;
+static int manual_height	= 0;
+static int manual_width		= 0;
+
+#define	DEFAULT_FB_MEM	1024*1024*16
+
+/* --------------------------------------------------------------------- */
+
+static int imacfb_setcolreg(unsigned regno, unsigned red, unsigned green,
+			    unsigned blue, unsigned transp,
+			    struct fb_info *info)
+{
+	/*
+	 *  Set a single color register. The values supplied are
+	 *  already rounded down to the hardware's capabilities
+	 *  (according to the entries in the `var' structure). Return
+	 *  != 0 for invalid regno.
+	 */
+
+	if (regno >= info->cmap.len)
+		return 1;
+
+	if (regno < 16) {
+		red   >>= 8;
+		green >>= 8;
+		blue  >>= 8;
+		((u32 *)(info->pseudo_palette))[regno] =
+			(red   << info->var.red.offset)   |
+			(green << info->var.green.offset) |
+			(blue  << info->var.blue.offset);
+	}
+	return 0;
+}
+
+static struct fb_ops imacfb_ops = {
+	.owner		= THIS_MODULE,
+	.fb_setcolreg	= imacfb_setcolreg,
+	.fb_fillrect	= cfb_fillrect,
+	.fb_copyarea	= cfb_copyarea,
+	.fb_imageblit	= cfb_imageblit,
+};
+
+static int __init imacfb_setup(char *options)
+{
+	char *this_opt;
+
+	if (!options || !*options)
+		return 0;
+
+	while ((this_opt = strsep(&options, ",")) != NULL) {
+		if (!*this_opt) continue;
+
+		if (!strcmp(this_opt, "inverse"))
+			inverse=1;
+		else if (!strcmp(this_opt, "i17"))
+			model = M_I17;
+		else if (!strcmp(this_opt, "i20"))
+			model = M_I20;
+		else if (!strcmp(this_opt, "mini"))
+			model = M_MINI;
+		else if (!strcmp(this_opt, "macbook"))
+			model = M_MACBOOK;
+		else if (!strncmp(this_opt, "height:", 7))
+			manual_height = simple_strtoul(this_opt+7, NULL, 0);
+		else if (!strncmp(this_opt, "width:", 6))
+			manual_width = simple_strtoul(this_opt+6, NULL, 0);
+	}
+	return 0;
+}
+
+static int __init imacfb_probe(struct platform_device *dev)
+{
+	struct fb_info *info;
+	int err;
+	unsigned int size_vmode;
+	unsigned int size_remap;
+	unsigned int size_total;
+
+	screen_info.lfb_depth = 32;
+	screen_info.lfb_size = DEFAULT_FB_MEM / 0x10000;
+	screen_info.pages=1;
+	screen_info.blue_size = 8;
+	screen_info.blue_pos = 0;
+	screen_info.green_size = 8;
+	screen_info.green_pos = 8;
+	screen_info.red_size = 8;
+	screen_info.red_pos = 16;
+	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;
+ 	}
+
+	/* if the user wants to manually specify height/width,
+	   we will override the defaults */
+	/* TODO: eventually get auto-detection working */
+	if (manual_height > 0)
+		screen_info.lfb_height = manual_height;
+	if (manual_width > 0)
+		screen_info.lfb_width = manual_width;
+
+	imacfb_fix.smem_start = screen_info.lfb_base;
+	imacfb_defined.bits_per_pixel = screen_info.lfb_depth;
+	imacfb_defined.xres = screen_info.lfb_width;
+	imacfb_defined.yres = screen_info.lfb_height;
+	imacfb_fix.line_length = screen_info.lfb_linelength;
+
+	/*   size_vmode -- that is the amount of memory needed for the
+	 *                 used video mode, i.e. the minimum amount of
+	 *                 memory we need. */
+	size_vmode = imacfb_defined.yres * imacfb_fix.line_length;
+
+	/*   size_total -- all video memory we have. Used for
+	 *                 entries, ressource allocation and bounds
+	 *                 checking. */
+	size_total = screen_info.lfb_size * 65536;
+	if (size_total < size_vmode)
+		size_total = size_vmode;
+
+	/*   size_remap -- the amount of video memory we are going to
+	 *                 use for imacfb.  With modern cards it is no
+	 *                 option to simply use size_total as that
+	 *                 wastes plenty of kernel address space. */
+	size_remap  = size_vmode * 2;
+	if (size_remap < size_vmode)
+		size_remap = size_vmode;
+	if (size_remap > size_total)
+		size_remap = size_total;
+	imacfb_fix.smem_len = size_remap;
+
+#ifndef __i386__
+	screen_info.imacpm_seg = 0;
+#endif
+
+	if (!request_mem_region(imacfb_fix.smem_start, size_total, "imacfb")) {
+		printk(KERN_WARNING
+		       "imacfb: cannot reserve video memory at 0x%lx\n",
+			imacfb_fix.smem_start);
+		/* We cannot make this fatal. Sometimes this comes from magic
+		   spaces our resource handlers simply don't know about */
+	}
+
+	info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev);
+	if (!info) {
+		err = -ENOMEM;
+		goto err_release_mem;
+	}
+	info->pseudo_palette = info->par;
+	info->par = NULL;
+
+	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",
+			imacfb_fix.smem_len, imacfb_fix.smem_start);
+		err = -EIO;
+		goto err_unmap;
+	}
+
+	printk(KERN_INFO "imacfb: framebuffer at 0x%lx, mapped to 0x%p, "
+	       "using %dk, total %dk\n",
+	       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_virtual = imacfb_defined.xres;
+	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;
+
+	/* some dummy values for timing to make fbset happy */
+	imacfb_defined.pixclock     = 10000000 / imacfb_defined.xres *
+					1000 / imacfb_defined.yres;
+	imacfb_defined.left_margin  = (imacfb_defined.xres / 8) & 0xf8;
+	imacfb_defined.hsync_len    = (imacfb_defined.xres / 8) & 0xf8;
+
+	imacfb_defined.red.offset    = screen_info.red_pos;
+	imacfb_defined.red.length    = screen_info.red_size;
+	imacfb_defined.green.offset  = screen_info.green_pos;
+	imacfb_defined.green.length  = screen_info.green_size;
+	imacfb_defined.blue.offset   = screen_info.blue_pos;
+	imacfb_defined.blue.length   = screen_info.blue_size;
+	imacfb_defined.transp.offset = screen_info.rsvd_pos;
+	imacfb_defined.transp.length = screen_info.rsvd_size;
+
+	printk(KERN_INFO "imacfb: %s: "
+	       "size=%d:%d:%d:%d, shift=%d:%d:%d:%d\n",
+	       "Truecolor",
+	       screen_info.rsvd_size,
+	       screen_info.red_size,
+	       screen_info.green_size,
+	       screen_info.blue_size,
+	       screen_info.rsvd_pos,
+	       screen_info.red_pos,
+	       screen_info.green_pos,
+	       screen_info.blue_pos);
+
+	imacfb_fix.ypanstep  = 0;
+	imacfb_fix.ywrapstep = 0;
+
+	/* request failure does not faze us, as vgacon probably has this
+	 * region already (FIXME) */
+	request_region(0x3c0, 32, "imacfb");
+
+	info->fbops = &imacfb_ops;
+	info->var = imacfb_defined;
+	info->fix = imacfb_fix;
+	info->flags = FBINFO_FLAG_DEFAULT;
+
+	if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
+		err = -ENOMEM;
+		goto err_unmap;
+	}
+	if (register_framebuffer(info)<0) {
+		err = -EINVAL;
+		goto err_fb_dealoc;
+	}
+	printk(KERN_INFO "fb%d: %s frame buffer device\n",
+	       info->node, info->fix.id);
+	return 0;
+
+err_fb_dealoc:
+	fb_dealloc_cmap(&info->cmap);
+err_unmap:
+	iounmap(info->screen_base);
+	framebuffer_release(info);
+err_release_mem:
+	release_mem_region(imacfb_fix.smem_start, size_total);
+	return err;
+}
+
+static struct platform_driver imacfb_driver = {
+	.probe	= imacfb_probe,
+	.driver	= {
+		.name	= "imacfb",
+	},
+};
+
+static struct platform_device imacfb_device = {
+	.name	= "imacfb",
+};
+
+static int __init imacfb_init(void)
+{
+	int ret;
+	char *option = NULL;
+
+	/* ignore error return of fb_get_options */
+	fb_get_options("imacfb", &option);
+	imacfb_setup(option);
+	ret = platform_driver_register(&imacfb_driver);
+
+	if (!ret) {
+		ret = platform_device_register(&imacfb_device);
+		if (ret)
+			platform_driver_unregister(&imacfb_driver);
+	}
+	return ret;
+}
+module_init(imacfb_init);
+
+MODULE_LICENSE("GPL");


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
  2006-06-25 10:06 [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support Antonino A. Daplas
@ 2006-06-25 10:37 ` Andrew Morton
  2006-06-25 10:46   ` Antonino A. Daplas
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2006-06-25 10:37 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

On Sun, 25 Jun 2006 18:06:51 +0800
"Antonino A. Daplas" <adaplas@gmail.com> wrote:

> 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 <akpm@osdl.org>

- coding style tweaks

- remove unneeded initialisation of statics

Cc: Edgar Hucek <hostmaster@ed-soft.at>
Cc: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/video/imacfb.c |   72 ++++++++++++++++++++-------------------
 video/Makefile         |    0 
 2 files changed, 37 insertions(+), 35 deletions(-)

diff -puN drivers/video/imacfb.c~imacfb-add-intel-based-macintosh-framebuffer-support-tidy drivers/video/imacfb.c
--- a/drivers/video/imacfb.c~imacfb-add-intel-based-macintosh-framebuffer-support-tidy
+++ a/drivers/video/imacfb.c
@@ -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 *opt
 		if (!*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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
  2006-06-25 10:37 ` Andrew Morton
@ 2006-06-25 10:46   ` Antonino A. Daplas
  2006-06-25 11:28     ` Edgar Hucek
  0 siblings, 1 reply; 6+ messages in thread
From: Antonino A. Daplas @ 2006-06-25 10:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fbdev-devel

Andrew Morton wrote:
> On Sun, 25 Jun 2006 18:06:51 +0800
> "Antonino A. Daplas" <adaplas@gmail.com> wrote:
> 
>> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
  2006-06-25 10:46   ` Antonino A. Daplas
@ 2006-06-25 11:28     ` Edgar Hucek
  0 siblings, 0 replies; 6+ messages in thread
From: Edgar Hucek @ 2006-06-25 11:28 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Andrew Morton, linux-fbdev-devel

Antonino A. Daplas schrieb:
> Andrew Morton wrote:
>> On Sun, 25 Jun 2006 18:06:51 +0800
>> "Antonino A. Daplas" <adaplas@gmail.com> wrote:
>>
>>> 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
> 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
  2006-06-27  0:01 ` Dave Jones
@ 2006-06-27  6:10   ` Edgar Hucek
  0 siblings, 0 replies; 6+ messages in thread
From: Edgar Hucek @ 2006-06-27  6:10 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel Mailing List, Edgar Hucek,
	Antonino Daplas, Andrew Morton, Linus Torvalds

At the moment i work on implementing Machine detection through DMI
and make the driver loadable as module. I know that the driver is
not perfekt, but a good starting point :)

cu

Edgar (gimli) Hucek

Dave Jones schrieb:
> On Mon, Jun 26, 2006 at 06:03:02PM +0000, Linux Kernel wrote:
>  > commit 90b4f9aca4d124d114e02bbb3d1d4f3d1d47138f
>  > tree e367b2fd3ad08b706bd7825c6251a95284f3bb76
>  > parent 1a8c9795290361cef232fd54f425a57d143108a8
>  > author Edgar Hucek <hostmaster@ed-soft.at> Mon, 26 Jun 2006 14:26:59 -0700
>  > committer Linus Torvalds <torvalds@g5.osdl.org> Mon, 26 Jun 2006 23:58:32 -0700
>  > 
>  > [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
>  > 
>  > 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.
>  > 
>  > [akpm: note: doesn't support modular building]
> 
> This scares me from a distro kernel point of view too, because
> it does no probing that it's actually running on a mac, (be that
> through DMI strings or PCI idents).  Instead if it hasn't been 
> passed a boot option, it sets model to 'M_NEW'....
> 
>  > +	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;
> 
> And then assumes it can scribble at 0x80010000.
> 
> Whilst in most cases the request_region that follows is going to fail,
> the possibility exists that something entirely different could be
> mapped there, guaranteeing fun times should Apple ever do something
> silly like, mapping the NVRAM there..
> 
> 		Dave
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
       [not found] <200606261803.k5QI32W8003539@hera.kernel.org>
@ 2006-06-27  0:01 ` Dave Jones
  2006-06-27  6:10   ` Edgar Hucek
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2006-06-27  0:01 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Edgar Hucek, Antonino Daplas, Andrew Morton, Linus Torvalds

On Mon, Jun 26, 2006 at 06:03:02PM +0000, Linux Kernel wrote:
 > commit 90b4f9aca4d124d114e02bbb3d1d4f3d1d47138f
 > tree e367b2fd3ad08b706bd7825c6251a95284f3bb76
 > parent 1a8c9795290361cef232fd54f425a57d143108a8
 > author Edgar Hucek <hostmaster@ed-soft.at> Mon, 26 Jun 2006 14:26:59 -0700
 > committer Linus Torvalds <torvalds@g5.osdl.org> Mon, 26 Jun 2006 23:58:32 -0700
 > 
 > [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support
 > 
 > 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.
 > 
 > [akpm: note: doesn't support modular building]

This scares me from a distro kernel point of view too, because
it does no probing that it's actually running on a mac, (be that
through DMI strings or PCI idents).  Instead if it hasn't been 
passed a boot option, it sets model to 'M_NEW'....

 > +	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;

And then assumes it can scribble at 0x80010000.

Whilst in most cases the request_region that follows is going to fail,
the possibility exists that something entirely different could be
mapped there, guaranteeing fun times should Apple ever do something
silly like, mapping the NVRAM there..

		Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-27  6:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-25 10:06 [PATCH] imacfb: Add Intel-based Macintosh Framebuffer Support Antonino A. Daplas
2006-06-25 10:37 ` Andrew Morton
2006-06-25 10:46   ` Antonino A. Daplas
2006-06-25 11:28     ` Edgar Hucek
     [not found] <200606261803.k5QI32W8003539@hera.kernel.org>
2006-06-27  0:01 ` Dave Jones
2006-06-27  6:10   ` Edgar Hucek

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.