|
From: Erik O. <er...@pl...> - 2006-03-13 03:55:51
Attachments:
mini-patch-20060312
|
So, the new patch available from the sourceforge site for rc6 seems to lack the mini support, as well as the 'height' and 'width' options. Based on the diff between the previous version of drivers/video/imacfb.c and the new, one, it seems like the only difference is the mini support. Here is a patch I have produced using the mini modifications (including my own) to imacfb.c as well as the current rc6 patch. -- Erik |
|
From: gimli <gi...@da...> - 2006-03-13 07:57:26
|
Ups. Fixed.
Erik Osheim wrote:
> So, the new patch available from the sourceforge site for rc6 seems to
> lack the mini support, as well as the 'height' and 'width' options.
>
> Based on the diff between the previous version of
> drivers/video/imacfb.c and the new, one, it seems like the only
> difference is the mini support.
>
> Here is a patch I have produced using the mini modifications
> (including my own) to imacfb.c as well as the current rc6 patch.
>
> -- Erik
>
>
> ------------------------------------------------------------------------
>
> diff -Naur linux-2.6.16-rc6/arch/i386/kernel/dmi_scan.c linux-2.6.16-rc6-patched/arch/i386/kernel/dmi_scan.c
> --- linux-2.6.16-rc6/arch/i386/kernel/dmi_scan.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/arch/i386/kernel/dmi_scan.c 2006-03-12 22:28:54.000000000 -0500
> @@ -5,6 +5,7 @@
> #include <linux/dmi.h>
> #include <linux/bootmem.h>
> #include <linux/slab.h>
> +#include <linux/efi.h>
>
> static char * __init dmi_string(struct dmi_header *dm, u8 s)
> {
> @@ -184,39 +185,66 @@
> }
> }
>
> -void __init dmi_scan_machine(void)
> +static int __init dmi_present(char __iomem *p)
> {
> u8 buf[15];
> + memcpy_fromio(buf, p, 15);
> + if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
> + u16 num = (buf[13] << 8) | buf[12];
> + u16 len = (buf[7] << 8) | buf[6];
> + u32 base = (buf[11] << 24) | (buf[10] << 16) |
> + (buf[9] << 8) | buf[8];
> +
> + /*
> + * DMI version 0.0 means that the real version is taken from
> + * the SMBIOS version, which we don't know at this point.
> + */
> + if (buf[14] != 0)
> + printk(KERN_INFO "DMI %d.%d present.\n",
> + buf[14] >> 4, buf[14] & 0xF);
> + else
> + printk(KERN_INFO "DMI present.\n");
> + if (dmi_table(base,len, num, dmi_decode) == 0)
> + return 0;
> + }
> +
> + return 1;
> +}
> +
> +void __init dmi_scan_machine(void)
> +{
> char __iomem *p, *q;
> + int rc;
>
> - /*
> - * no iounmap() for that ioremap(); it would be a no-op, but it's
> - * so early in setup that sucker gets confused into doing what
> - * it shouldn't if we actually call it.
> - */
> - p = ioremap(0xF0000, 0x10000);
> - if (p == NULL)
> - goto out;
>
> - for (q = p; q < p + 0x10000; q += 16) {
> - memcpy_fromio(buf, q, 15);
> - if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
> - u16 num = (buf[13] << 8) | buf[12];
> - u16 len = (buf[7] << 8) | buf[6];
> - u32 base = (buf[11] << 24) | (buf[10] << 16) |
> - (buf[9] << 8) | buf[8];
> -
> - /*
> - * DMI version 0.0 means that the real version is taken from
> - * the SMBIOS version, which we don't know at this point.
> - */
> - if (buf[14] != 0)
> - printk(KERN_INFO "DMI %d.%d present.\n",
> - buf[14] >> 4, buf[14] & 0xF);
> - else
> - printk(KERN_INFO "DMI present.\n");
> + if (efi_enabled) {
> + if (!efi.smbios)
> + goto out;
> +
> + p = efi.smbios;
> +
> + if (p == NULL)
> + goto out;
> +
> + rc = dmi_present(p + 0x10); /* offset of _DMI_ string */
>
> - if (dmi_table(base,len, num, dmi_decode) == 0)
> + if (!rc)
> + return;
> +
> + } else {
> +
> + /*
> + * no iounmap() for that ioremap(); it would be a no-op, but
> + * it's so early in setup that sucker gets confused into doing
> + * what it shouldn't if we actually call it.
> + */
> + p = ioremap(0xF0000, 0x10000);
> + if (p == NULL)
> + goto out;
> +
> + for (q = p; q < p + 0x10000; q += 16) {
> + rc = dmi_present(q);
> + if (!rc)
> return;
> }
> }
> diff -Naur linux-2.6.16-rc6/arch/i386/kernel/efi.c linux-2.6.16-rc6-patched/arch/i386/kernel/efi.c
> --- linux-2.6.16-rc6/arch/i386/kernel/efi.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/arch/i386/kernel/efi.c 2006-03-12 22:28:54.000000000 -0500
> @@ -395,7 +395,7 @@
> printk(KERN_INFO " ACPI=0x%lx ", config_tables[i].table);
> } else
> if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) {
> - efi.smbios = (void *) config_tables[i].table;
> + efi.smbios = __va(config_tables[i].table);
> printk(KERN_INFO " SMBIOS=0x%lx ", config_tables[i].table);
> } else
> if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
> diff -Naur linux-2.6.16-rc6/drivers/acpi/blacklist.c linux-2.6.16-rc6-patched/drivers/acpi/blacklist.c
> --- linux-2.6.16-rc6/drivers/acpi/blacklist.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/acpi/blacklist.c 2006-03-12 22:28:54.000000000 -0500
> @@ -32,6 +32,7 @@
> #include <linux/acpi.h>
> #include <acpi/acpi_bus.h>
> #include <linux/dmi.h>
> +#include <linux/efi.h>
>
> enum acpi_blacklist_predicates {
> all_versions,
> @@ -80,6 +81,9 @@
> int year;
> char *s = dmi_get_system_info(DMI_BIOS_DATE);
>
> + if (efi_enabled)
> + return 0;
> +
> if (!s)
> return 0;
> if (!*s)
> diff -Naur linux-2.6.16-rc6/drivers/acpi/osl.c linux-2.6.16-rc6-patched/drivers/acpi/osl.c
> --- linux-2.6.16-rc6/drivers/acpi/osl.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/acpi/osl.c 2006-03-12 22:28:54.000000000 -0500
> @@ -208,6 +208,10 @@
>
> void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
> {
> + /* Don't unmap memory which was not mapped by acpi_os_map_memory */
> + if (efi_enabled &&
> + (efi_mem_attributes(virt_to_phys(virt)) & EFI_MEMORY_WB))
> + return;
> iounmap(virt);
> }
> EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
> diff -Naur linux-2.6.16-rc6/drivers/pci/msi.c linux-2.6.16-rc6-patched/drivers/pci/msi.c
> --- linux-2.6.16-rc6/drivers/pci/msi.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/pci/msi.c 2006-03-12 22:28:54.000000000 -0500
> @@ -15,6 +15,7 @@
> #include <linux/smp_lock.h>
> #include <linux/pci.h>
> #include <linux/proc_fs.h>
> +#include <linux/dmi.h>
>
> #include <asm/errno.h>
> #include <asm/io.h>
> @@ -40,6 +41,27 @@
> u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
> #endif
>
> +#ifdef CONFIG_X86
> +
> +static int __init apple_msi_disable(struct dmi_system_id *d)
> +{
> + if (!pci_msi_quirk) {
> + printk(KERN_INFO "Apple machine detected. MSI disabled\n");
> + pci_msi_quirk = 1;
> + }
> + return 0;
> +}
> +
> +static struct dmi_system_id __initdata msi_dmi_table[] = {
> + {
> + apple_msi_disable, "Apple",
> + { DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."), },
> + },
> + { }
> +};
> +
> +#endif
> +
> static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
> {
> memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
> @@ -362,6 +384,10 @@
> if (!status)
> return status;
>
> +#ifdef CONFIG_X86
> + dmi_check_system(msi_dmi_table);
> +#endif
> +
> if (pci_msi_quirk) {
> pci_msi_enable = 0;
> printk(KERN_WARNING "PCI: MSI quirk detected. MSI disabled.\n");
> diff -Naur linux-2.6.16-rc6/drivers/scsi/ata_piix.c linux-2.6.16-rc6-patched/drivers/scsi/ata_piix.c
> --- linux-2.6.16-rc6/drivers/scsi/ata_piix.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/scsi/ata_piix.c 2006-03-12 22:28:54.000000000 -0500
> @@ -95,6 +95,8 @@
> #define DRV_NAME "ata_piix"
> #define DRV_VERSION "1.05"
>
> +#define ATA_ENABLE_PATA 1
> +
> enum {
> PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
> ICH5_PMR = 0x90, /* port mapping register */
> @@ -141,6 +143,7 @@
> { 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix4_pata },
> { 0x8086, 0x24db, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_pata },
> { 0x8086, 0x25a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_pata },
> + { 0x8086, 0x27df, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_pata },
> #endif
>
> /* NOTE: The following PCI ids must be kept in sync with the
> diff -Naur linux-2.6.16-rc6/drivers/usb/storage/usb.c linux-2.6.16-rc6-patched/drivers/usb/storage/usb.c
> --- linux-2.6.16-rc6/drivers/usb/storage/usb.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/usb/storage/usb.c 2006-03-12 22:28:54.000000000 -0500
> @@ -103,7 +103,7 @@
> MODULE_DESCRIPTION("USB Mass Storage driver for Linux");
> MODULE_LICENSE("GPL");
>
> -static unsigned int delay_use = 5;
> +static unsigned int delay_use = 0;
> module_param(delay_use, uint, S_IRUGO | S_IWUSR);
> MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device");
>
> diff -Naur linux-2.6.16-rc6/drivers/video/Kconfig linux-2.6.16-rc6-patched/drivers/video/Kconfig
> --- linux-2.6.16-rc6/drivers/video/Kconfig 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/video/Kconfig 2006-03-12 22:28:54.000000000 -0500
> @@ -465,6 +465,15 @@
> 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 Macs FB"
> + 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 Inel Based Mac's
> +
> config VIDEO_SELECT
> bool
> depends on FB_VESA
> diff -Naur linux-2.6.16-rc6/drivers/video/Makefile linux-2.6.16-rc6-patched/drivers/video/Makefile
> --- linux-2.6.16-rc6/drivers/video/Makefile 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/video/Makefile 2006-03-12 22:28:54.000000000 -0500
> @@ -97,6 +97,7 @@
>
> # 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 -Naur linux-2.6.16-rc6/drivers/video/imacfb.c linux-2.6.16-rc6-patched/drivers/video/imacfb.c
> --- linux-2.6.16-rc6/drivers/video/imacfb.c 1969-12-31 19:00:00.000000000 -0500
> +++ linux-2.6.16-rc6-patched/drivers/video/imacfb.c 2006-03-12 22:33:54.000000000 -0500
> @@ -0,0 +1,425 @@
> +/*
> + * framebuffer driver for Intel Based Mac's
> + *
> + * (c) 2006 Edgar Hucek <gi...@da...>
> + * Original imac driver written by Gerd Knorr <kr...@go...>
> + *
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/errno.h>
> +#include <linux/string.h>
> +#include <linux/mm.h>
> +#include <linux/tty.h>
> +#include <linux/slab.h>
> +#include <linux/delay.h>
> +#include <linux/fb.h>
> +#include <linux/ioport.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +
> +#include <video/vga.h>
> +#include <asm/io.h>
> +#include <asm/mtrr.h>
> +
> +#define dac_reg (0x3c8)
> +#define dac_val (0x3c9)
> +
> +typedef enum _MAC_TAPE {
> + M_I17,
> + M_I20,
> + M_MINI,
> + M_NEW
> +} MAC_TAPE;
> +
> +/* --------------------------------------------------------------------- */
> +
> +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,
> +};
> +
> +static int inverse = 0;
> +static int mtrr = 0; /* disable mtrr */
> +static int vram_remap __initdata = 0; /* Set amount of memory to be used */
> +static int vram_total __initdata = 0; /* Set total amount of memory */
> +static int depth;
> +static int model = M_NEW;
> +static int manual_height = 0;
> +static int manual_width = 0;
> +
> +/* --------------------------------------------------------------------- */
> +
> +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 && info->var.bits_per_pixel != 8) {
> + switch (info->var.bits_per_pixel) {
> + case 16:
> + if (info->var.red.offset == 10) {
> + /* 1:5:5:5 */
> + ((u32*) (info->pseudo_palette))[regno] =
> + ((red & 0xf800) >> 1) |
> + ((green & 0xf800) >> 6) |
> + ((blue & 0xf800) >> 11);
> + } else {
> + /* 0:5:6:5 */
> + ((u32*) (info->pseudo_palette))[regno] =
> + ((red & 0xf800) ) |
> + ((green & 0xfc00) >> 5) |
> + ((blue & 0xf800) >> 11);
> + }
> + break;
> + case 24:
> + case 32:
> + 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);
> + break;
> + }
> + }
> +
> + 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 (! strncmp(this_opt, "mtrr:", 5))
> + mtrr = simple_strtoul(this_opt+5, NULL, 0);
> + else if (! strcmp(this_opt, "nomtrr"))
> + mtrr=0;
> + else if (! strncmp(this_opt, "vtotal:", 7))
> + vram_total = simple_strtoul(this_opt+7, NULL, 0);
> + else if (! strncmp(this_opt, "vremap:", 7))
> + vram_remap = simple_strtoul(this_opt+7, NULL, 0);
> + 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 (! 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;
> +}
> +
> +#define DEFAULT_FB_MEM 1024*1024*16
> +
> +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_base = 0x80010000;
> + 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;
> + break;
> + case M_NEW:
> + case M_I20:
> + screen_info.lfb_width = 1680;
> + screen_info.lfb_height = 1050;
> + screen_info.lfb_linelength = 1728 * 4;
> + break;
> + case M_MINI:
> + screen_info.lfb_width = 1024;
> + screen_info.lfb_height = 768;
> + screen_info.lfb_linelength = 2048 * 4;
> + 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;
> +
> + /*
> + static void *videomemory;
> + static u_long videomemorysize = (64*1024*1024);
> + videomemory = ioremap(0x80000000,videomemorysize);
> + memset(videomemory, 0x99, videomemorysize);
> + */
> +
> + imacfb_fix.smem_start = screen_info.lfb_base;
> + imacfb_defined.bits_per_pixel = screen_info.lfb_depth;
> + if (15 == imacfb_defined.bits_per_pixel)
> + imacfb_defined.bits_per_pixel = 16;
> + imacfb_defined.xres = screen_info.lfb_width;
> + imacfb_defined.yres = screen_info.lfb_height;
> + imacfb_fix.line_length = screen_info.lfb_linelength;
> + imacfb_fix.visual = (imacfb_defined.bits_per_pixel == 8) ?
> + FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
> +
> + /* 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 mtrr
> + * entries, ressource allocation and bounds
> + * checking. */
> + size_total = screen_info.lfb_size * 65536;
> + if (vram_total)
> + size_total = vram_total * 1024 * 1024;
> + 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 (vram_remap)
> + size_remap = vram_remap * 1024 * 1024;
> + 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) * 256, &dev->dev);
> + if (!info) {
> + release_mem_region(imacfb_fix.smem_start, size_total);
> + return -ENOMEM;
> + }
> + 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;
> + }
> +
> + 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;
> +
> + if (imacfb_defined.bits_per_pixel <= 8) {
> + depth = imacfb_defined.green.length;
> + imacfb_defined.red.length =
> + imacfb_defined.green.length =
> + imacfb_defined.blue.length =
> + imacfb_defined.bits_per_pixel;
> + }
> +
> + printk(KERN_INFO "imacfb: %s: "
> + "size=%d:%d:%d:%d, shift=%d:%d:%d:%d\n",
> + (imacfb_defined.bits_per_pixel > 8) ?
> + "Truecolor" : "Pseudocolor",
> + 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");
> +
> +#ifdef CONFIG_MTRR
> + if (mtrr) {
> + unsigned int temp_size = size_total;
> + unsigned int type = 0;
> +
> + switch (mtrr) {
> + case 1:
> + type = MTRR_TYPE_UNCACHABLE;
> + break;
> + case 2:
> + type = MTRR_TYPE_WRBACK;
> + break;
> + case 3:
> + type = MTRR_TYPE_WRCOMB;
> + break;
> + case 4:
> + type = MTRR_TYPE_WRTHROUGH;
> + break;
> + default:
> + type = 0;
> + break;
> + }
> +
> + if (type) {
> + int rc;
> +
> + /* Find the largest power-of-two */
> + while (temp_size & (temp_size - 1))
> + temp_size &= (temp_size - 1);
> +
> + /* Try and find a power of two to add */
> + do {
> + rc = mtrr_add(imacfb_fix.smem_start, temp_size,
> + type, 1);
> + temp_size >>= 1;
> + } while (temp_size >= PAGE_SIZE && rc == -EINVAL);
> + }
> + }
> +#endif
> +
> + 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;
> + }
> + if (register_framebuffer(info)<0) {
> + err = -EINVAL;
> + fb_dealloc_cmap(&info->cmap);
> + goto err;
> + }
> + printk(KERN_INFO "fb%d: %s frame buffer device\n",
> + info->node, info->fix.id);
> + return 0;
> +err:
> + framebuffer_release(info);
> + 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");
> diff -Naur linux-2.6.16-rc6/sound/pci/hda/patch_sigmatel.c linux-2.6.16-rc6-patched/sound/pci/hda/patch_sigmatel.c
> --- linux-2.6.16-rc6/sound/pci/hda/patch_sigmatel.c 2006-03-12 15:35:31.000000000 -0500
> +++ linux-2.6.16-rc6-patched/sound/pci/hda/patch_sigmatel.c 2006-03-12 22:28:54.000000000 -0500
> @@ -314,6 +314,9 @@
> { .pci_subvendor = PCI_VENDOR_ID_INTEL,
> .pci_subdevice = 0x0417,
> .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */
> + { .pci_subvendor = 0x8384,
> + .pci_subdevice = 0x7680,
> + .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */
> {} /* terminator */
> };
>
|
|
From: Thomas G. <sit...@st...> - 2006-03-13 12:19:19
|
Hello Erik,
* Erik Osheim <er...@pl...> [060313 04:56]:
> So, the new patch available from the sourceforge site for rc6 seems to
> lack the mini support, as well as the 'height' and 'width' options.
> Based on the diff between the previous version of
> drivers/video/imacfb.c and the new, one, it seems like the only
> difference is the mini support.
> Here is a patch I have produced using the mini modifications
> (including my own) to imacfb.c as well as the current rc6 patch.
did you try to start X on the mini (does it work with fb or even the
nativ driver)? Does the Network Interface work with the driver in the
Linux kernel?
Thomas [ I am waiting to get mine shipped ]
|
|
From: Erik O. <er...@pl...> - 2006-03-13 14:39:54
|
On Mon, Mar 13, 2006 at 01:18:29PM +0100, Thomas Glanzmann wrote: > did you try to start X on the mini (does it work with fb or even the > nativ driver)? Does the Network Interface work with the driver in the > Linux kernel? I haven't booted anything except a very minimal initrd, so I haven't tried X yet. Today I am going to try to modify the ubuntu live CD by adding a new kernel with mini support. I'll email the list if that happens to let people know what I find. The ethernet card definitely does work; I was able to get an IP address and ping stuff on my internal network (and connect to services). I have heard the wireless can work also but I haven't tried that yet. -- Erik |