Issue 303: HD4000 support

Reported by Mark Langovoi, Nov 26, 2012

Hello. I found patch to enable HD4000 Intel,
Can you apply it to next release?

Comment 1 by Mark Langovoi, Nov 28, 2012

A don't see gma.c in source, why?
Can you add HD4000 support to latest chameleon.

Comment 2 by zenith432, Nov 28, 2012

This patch also works for HD2500.  The HD4000 & HD2500 are both 
Intel Gen7 GPU.
Attached is an up-to-date variant I use.  The diff is from 
gma.c is in i386/libsaio/gma.c.
If I get permission from admins, I'm willing to incorporate this 
It adds a plist entry
<string>(number 0-11)</string>
to be used with GraphicsEnabler for this GPU.

Comment 3 by zenith432, Nov 28, 2012

Here's the attachment

Comment 4 by MacMan, Dec 3, 2012

I added HD4000 support to my branch (Chimera version 1.11) back in 
July 2012. I don't know why it was never added to the trunk.

Comment 5 by ErmaC , Dec 16, 2012

ok applied on a temp trunk (2142) w8 for admin revision.

Comment 6 by zenith432, Dec 16, 2012

Forgot about this, please add the following line to doc/BootHelp.txt 
documenting the plist key IOPlatformId

===Begin Patch===
diff --git a/doc/BootHelp.txt b/doc/BootHelp.txt
index 56503f4..a23ee13 100644
--- a/doc/BootHelp.txt
+++ b/doc/BootHelp.txt
@@ -86,6 +86,7 @@ Options useful in the org.chameleon.Boot.plist 
     display_0=<value>     Inject alternate value of 
display-cfg into NVDA,Display-A@0 (HEX).
     display_1=<value>     Inject alternate value of 
display-cfg into NVDA,Display-B@1 (HEX).
     EnableHDMIAudio=Yes	  Inject HDMI audio for NVIDIA
+    IGPlatformId=<value>  For Intel Gen7 graphics, range 
0-11, see
   EthernetBuiltIn=Yes|No  Automatic "built-in"=yes 
device-properties generation
                           for ethernet interfaces.
===End Patch===

Comment 7 by ErmaC , Dec 16, 2012

done. temp trunk 2146

Comment 8 by Cosmosis Jones, Feb 1, 2013

if ((model == (char *)&"Mobile GMA950")
 		|| (model == (char *)&"Mobile GMA3150"))
@@ -285,7 +289,36 @@ bool setup_gma_devprop(pci_dt_t *gma_dev)
 		devprop_add_value(device, "AAPL,tbl-info", 
HD3000_tbl_info, 18);
 		devprop_add_value(device, "AAPL,os-info", 
HD3000_os_info, 20);
+	else if (!strncmp(model, "Intel HD Graphics 2500", 12U) 
+			 !strncmp(model, "Intel HD Graphics 4000", 12U))

WHy is this an else if.
SHouldn't this just be at the end of all the model checking in a 
separate if so that the key can be parsed for those 2 models?

Anyway i've committed a modified version that does what i said 
above. please let me know if it's inccorect as i dont' have on of 
Status: Fixed
Owner: cosmo1t

Comment 9 by zenith432, Feb 1, 2013

Just for the record:
- The 12 in the strncmp is a BUG, it should be 22 :)
- Meklort checked in a better fix for this at r2152, but didn't 
close the issue.
- I noticed the bug with the 12 after r2152, so I didn't think it 
mattered anymore, and didn't bother to update.
- In r2152, the patch was only applied to HD4000.  In r2179 it's now 
also applied to HD2500 - which it should.
- The issue is fixed :)
- FWIW, there's a memory-leak in gma.c in the allocation of the 
local variable 'device' in setup_gma_devprop.  This was fixed in the 
version I uploaded, but it's back in r2179.

Created: 8 years 4 months ago by Mark Langovoi

Updated: 8 years 2 months ago

Status: Fixed

Owner: Cosmosis Jones

Followed by: 3 persons