View Single Post
Old 07-27-07, 01:19 AM   #88
ebsi
Registered User
 
Join Date: Jul 2007
Posts: 10
Default Re: crazy colors! 100.14.09 with 8600m on macbook pro

diff -uNr nv.orig/nv.c nv/nv.c
--- nv.orig/nv.c 2007-07-26 08:35:00.000000000 +0200
+++ nv/nv.c 2007-07-26 12:40:11.000000000 +0200
@@ -1555,6 +1555,39 @@

__nv_init_sp = sp;

+ {
+ for (i = 0; i < num_nv_devices; i++) {
+ printk("Macbook Hack\n");
+ struct pci_dev *dev = nv_linux_devices[i].dev;
+ #define NV_WR32(p,i,d) (__raw_writel((d), (void __iomem *)(p) + (i)))
+
+ unsigned long mmio_start;
+ __u32 mmio_len;
+
+ mmio_start = pci_resource_start(dev, 0);
+ mmio_len = pci_resource_len(dev, 0);
+ volatile u32 __iomem *REGS;
+
+ REGS = ioremap(mmio_start, mmio_len);
+
+ if(REGS) {
+ NV_WR32(REGS, 0x1708, 0);
+ NV_WR32(REGS, 0x1900, 0);
+ NV_WR32(REGS, 0x1901, 0);
+ NV_WR32(REGS, 0x1902, 0);
+ NV_WR32(REGS, 0x1903, 0);
+ NV_WR32(REGS, 0x1904, 0);
+ NV_WR32(REGS, 0x1905, 0);
+ NV_WR32(REGS, 0x1906, 0);
+ NV_WR32(REGS, 0x1907, 0);
+
+ iounmap(REGS);
+ } else {
+ printk("Error mapping memory\n");
+ }
+ }
+ }
+
return 0;

failed:

This is a patch for the kernel driver as a temporary workaround.
So there is no need to start the X server with the nv driver and then
with the nvidia driver. The macbook pro suspends and wakes up, but
the screen stays black.

cu

ebsi
ebsi is offline   Reply With Quote