Author Topic: GMA GraphicsEnabler features in Chameleon  (Read 66891 times)

0 Members and 2 Guests are viewing this topic.

andyvand

  • VoodooLabs
  • Posts: 51
Re: GMA GraphicsEnabler features in Chameleon
« Reply #30 on: March 02, 2010, 08:01:07 PM »
OK I will boot soon with OEM DSDT and dump it + make diff...
Could somebody also dump the 0x27A28086 rom with RadeonDump (needs RadeonPCI.kext installed, check InsanelyMac forum)?
It would really help if I could examine some of the cards VBIOS roms (to see how they differ).
Attached below is the X3100 rom BIOS also...

BuildSmart

  • Member
  • Posts: 30
Re: GMA GraphicsEnabler features in Chameleon
« Reply #31 on: March 29, 2010, 06:01:34 PM »
While the concept is good in theory, the implementation is seriously flawed to the point that it does very little correctly and works marginally at best.

    First the attack:
    • all this GMA code is nothing shy of a hack to produce working video rather than doing it properly.
    • the implementation does not consider the variants the actual device is configured with.
    • the implementation does not make the video work correctly.
    • it does not work properly with all GMA-3x00/GMA-X3x00 series controllers.
    • it does not work with GMA-X4500 series controllers. (I know for a fact they can be made to work properly)
    • you require a patched framebuffer kext instead of re-identifying the device as a natively supported device.
    • in most cases it requires modifying the DSDT in some way to make it work. (this should not be required)
      Proposed solution:
      • you should be detecting the actual device.
      • you should retrieve the number of available output ports.
      • you should configure the device as required. (this includes the number of display ports and framebuffers)
      • you should be injecting the updated/patched video rom so the drivers can use the DCB tables for the reconfigured device.
      • you should inject the correct data based on the device and ports.

      If you think I have no clue what I am talking about, consider the following code which shows in part how you can make one device look like another when you want to configure it before you say something stupid (confirmed since I've already done this on a small level to make a GMA-X4500 work for someone).
      Code: [Select]
      struct pci_device_id
      {
      uint16_t vendor; /* should always be Intel */
      uint16_t device; /* Device ID */
      uint16_t subvendor; /* Subsystem ID's or PCI_ANY_ID */
      uint16_t subdevice;
      uint32_t class, class_mask; /* (class,subclass,prog-if) triplet */
      unsigned long driver_data; /* Data private to the driver */
      };

      struct intel_device_info
      {
      uint8_t is_mobile : 1;
      uint8_t is_i9xx : 1;
      uint8_t is_i945gm : 1;
      uint8_t is_i965g : 1;
      uint8_t is_i965gm : 1;
      uint8_t need_gfx_hws : 1;
      uint8_t is_g4x : 1;
      uint8_t has_fbc : 1;
      uint8_t has_rc6 : 1;
      uint8_t has_pipe_cxsr : 1;
      uint8_t has_hotplug : 1;
      uint8_t cursor_needs_physical : 1;
      };

      /* these should be unified for portability */
      const struct intel_device_info intel_i945g_info =
      {
      .is_i9xx = 1,
      .has_hotplug = 1,
      .cursor_needs_physical = 1,
      };

      const struct intel_device_info intel_i945gm_info =
      {
      .is_i945gm = 1,
      .is_i9xx = 1,
      .is_mobile = 1,
      .has_fbc = 1,
      .has_hotplug = 1,
      .cursor_needs_physical = 1,
      };

      const struct intel_device_info intel_i965g_info =
      {
      .is_i965g = 1,
      .is_i9xx = 1,
      .has_hotplug = 1,
      };

      const struct intel_device_info intel_i965gm_info =
      {
      .is_i965g = 1,
      .is_mobile = 1,
      .is_i965gm = 1,
      .is_i9xx = 1,
      .is_mobile = 1,
      .has_fbc = 1,
      .has_rc6 = 1,
      .has_hotplug = 1,
      };

      const struct intel_device_info intel_g45_info =
      {
      .is_i965g = 1,
      .is_g4x = 1,
      .is_i9xx = 1,
      .need_gfx_hws = 1,
      .has_pipe_cxsr = 1,
      .has_hotplug = 1,
      };

      const struct intel_device_info intel_gm45_info =
      {
      .is_i965g = 1,
      .is_mobile = 1,
      .is_g4x = 1,
      .is_i9xx = 1,
      .is_mobile = 1,
      .need_gfx_hws = 1,
      .has_fbc = 1,
      .has_rc6 = 1,
      .has_pipe_cxsr = 1,
      .has_hotplug = 1,
      };

      const struct pci_device_id pciidlist[] = {
      INTEL_GMA_DEVICE(0x2772, &intel_i945g_info),
      INTEL_GMA_DEVICE(0x27a2, &intel_i945gm_info),
      INTEL_GMA_DEVICE(0x27ae, &intel_i945gm_info),
      INTEL_GMA_DEVICE(0x2972, &intel_i965g_info),
      INTEL_GMA_DEVICE(0x2982, &intel_i965g_info),
      INTEL_GMA_DEVICE(0x2992, &intel_i965g_info),
      INTEL_GMA_DEVICE(0x29a2, &intel_i965g_info),
      INTEL_GMA_DEVICE(0x2a02, &intel_i965gm_info),
      INTEL_GMA_DEVICE(0x2a12, &intel_i965gm_info),
      INTEL_GMA_DEVICE(0x2a42, &intel_gm45_info),
      INTEL_GMA_DEVICE(0x2e02, &intel_g45_info),
      INTEL_GMA_DEVICE(0x2e12, &intel_g45_info),
      INTEL_GMA_DEVICE(0x2e22, &intel_g45_info),
      INTEL_GMA_DEVICE(0x2e32, &intel_g45_info),
      INTEL_GMA_DEVICE(0x2e42, &intel_g45_info)
      };


      Since I have recently been working with expansion roms recently I have some experience extracting the required data so I am willing to help (cause I don't have the time to do all the work myself) if someone is willing to undertake the project, of course this requires at least one motherboard with GMA onboard video (a 945 and one non 945 based would be better) and some programming skills.

      Visit me on my IRC (irc.daleenterprise.com) if you wish to discuss it further since I cannot access any IRC this forum uses as a base cause some people are just childish.

      andyvand

      • VoodooLabs
      • Posts: 51
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #32 on: April 05, 2010, 07:46:30 PM »
      I've built a little tool to check wether or not your graphics adapter is working...
      The tool has optimized versions for Tiger, Leopard and Snow Leopard. (sources included)

      This tool will allow in a simple manner to check what version of OpenGL you have supported on your displays + Shading language and wether or not Quartz Extreme is supported.
      I redesigned this tool to also allow you to show display parameters like size and rotation (no rotation check on Tiger though).

      Time to test...

      Download including sources:
      http://rapidshare.com/files/372352874/VideoHardwareInfo_AnV_SL_Leo_Tiger.zip

      BuildSmart

      • Member
      • Posts: 30
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #33 on: April 05, 2010, 10:21:35 PM »
      andyvand, while an interesting side project I fail to see how this helps you improve the GMA solution unless a little diversion was needed for the recollection of thoughts and direction.

        Do you not think it would be better for the GMA solution to work on the following
        • determine the type of GMA
        • determine how many ports are available
        • determine the type of ports (DVI/VGA/S-VIDEO)
        • detect port expansion card (ADD2-N/ADD2-R)
        even if you do nothing with this information for the time being?

      With this information you can configure the number of required framebuffers, the number of available displays and completely remove all DSDT GMA required patching.

      Lord Anubis

      • Member
      • Posts: 74
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #34 on: April 07, 2010, 01:49:46 PM »
      andyvand, while an interesting side project I fail to see how this helps you improve the GMA solution unless a little diversion was needed for the recollection of thoughts and direction.

        Do you not think it would be better for the GMA solution to work on the following
        • determine the type of GMA
        • determine how many ports are available
        • determine the type of ports (DVI/VGA/S-VIDEO)
        • detect port expansion card (ADD2-N/ADD2-R)
        even if you do nothing with this information for the time being?

      With this information you can configure the number of required framebuffers, the number of available displays and completely remove all DSDT GMA required patching.

      I believe your direction is good to go, maybe andyvand, can set up a svn here at voodoo or even at googles code area, and move the tool to the spinoff area. Then, your knowledge and info can put it in there.
      This way the knowledge from you and andyvand can be used in both area's the tool and inside chameleon.

      just a thought

      LA
      Quicksilver 2002 Case - GB EP45-DS3P - 8Gb Kingston mem. - Q6600 - Asus 7300GT Silent 512Mb - 6 SATA drives - 1 IDE drives ( using F12/Chameleon for booting, not visible in OSX ) - 1 external Sata Samsung DVD - OSX 10.6.8 server retail - Chameleon 2.0RC1 + Cartri Bios

      BuildSmart

      • Member
      • Posts: 30
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #35 on: April 08, 2010, 01:46:07 AM »
      Yes, a positive suggestion and I'm sure andyvand will consider it, myself, I'm not interested in joining the project, I was interested in helping someone who is involved however my willingness has unfortunately changed.

      BuildSmart

      • Member
      • Posts: 30
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #36 on: April 09, 2010, 06:28:42 AM »
      I did a little testing, seems this concept allows more than just GMA-950 to work without modification of kexts, when you write enable memory you can change the device ID and then write-protect it which then allows the device to be natively recognized, the GMA-4500 works just like the GMA-X3100 (no surprise).

      The only drawback I can see is that it would not be hard for apple to insert in the kernel or a kext a reset which would dump any changes you made but currently they don't.

      andyvand

      • VoodooLabs
      • Posts: 51
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #37 on: April 16, 2010, 06:24:41 PM »
      Is there any hope for this card:
      Device ID: 0x2A42
      I've added preliminary patching for this as GMAX3100.
      ROM dump shows it to be a "Cantiga" card (1800).
      I've included the Video BIOS ROM as attachment.
      BTW: It's a mobile (laptop) video card

      andyvand

      • VoodooLabs
      • Posts: 51
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #38 on: April 23, 2010, 10:31:22 PM »
      We've finally got possession of a MacBook2,1 rom dump.
      0x27A2 Apple is available now...
      We can compare + device fixes for our computers.
      At current we could make BIOS patches for it.  ;)

      scrax

      • Member
      • Posts: 61
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #39 on: June 21, 2010, 02:28:43 PM »
      I've built a little tool to check wether or not your graphics adapter is working...
      The tool has optimized versions for Tiger, Leopard and Snow Leopard. (sources included)

      This tool will allow in a simple manner to check what version of OpenGL you have supported on your displays + Shading language and wether or not Quartz Extreme is supported.
      I redesigned this tool to also allow you to show display parameters like size and rotation (no rotation check on Tiger though).

      Time to test...

      Download including sources:
      http://rapidshare.com/files/372352874/VideoHardwareInfo_AnV_SL_Leo_Tiger.zip

      If I try to change the Display Unit (but I have only one option) it change the vram size from 4352MB / 4456448KB to 134213888MB /

      srebolledo

      • Entrant
      • Posts: 3
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #40 on: August 20, 2010, 11:12:01 PM »
      Hi  Guys, i've just a week ago updated my SL install to 10.6.4. When i was in 10.6 i have qe/ci recognized by the OS (with some kexts located in /Extra), but when i updated my laptop, i've lost it. Now i have a full resolution of 1280x768 which is not correct (i see a damn white line in the bottom of the screen)
      With the boot for gma, the bootloader recognize my VGA, but still no qe/ci, what im doing wrong? My intel is a 0x27a28086 rev 0003 (maybe the revision isn't correct)
      If you need more info, just ask for it :D

      srebolledo

      • Entrant
      • Posts: 3
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #41 on: August 20, 2010, 11:29:04 PM »
      At last!!! I've managed to get qe/ci with this crappy GMA950 0x27a28086 rev 0003. (1280x768 with that blank line at the bottom though)
      Instructions:
      All kexts from update
      None Graphics Kexts in Extra/Extensions
      The com.apple.Boot.plist from attach
      and finally, the bootloader from the first post.

      Thanks again :D. If somebody knows how to solve the resolution problem, give me a heads up. And thanks again

      bkribbs

      • Entrant
      • Posts: 2
      Re: GMA GraphicsEnabler features in Chameleon
      « Reply #42 on: July 17, 2011, 01:50:26 AM »
      Would this work at all with the GMA900? I can't get it working on 10.6.8 and I can't figure out why.

      EDIT: My gma900 has the same device id as a gma 950 I think. It loads up using the same kexts as a 950 does, just a different framebuffer.

      EDIT2: My device id is [8086:2592]. Is there any support for this?

      EDIT3: It boots to safe mode with QE/CI using GFX enabler. But when I boot regular, it just reboots after it should load desktop. What does that mean?
      « Last Edit: July 17, 2011, 04:51:10 AM by bkribbs »