Chameleon

Chameleon Commit Details

Date:2012-08-01 15:36:10 (2 years 19 days ago)
Author:MacMan
Commit:2036
Parents: 2035
Message:Chimera 1.11.0: Cleaned up gma.c code for HD 3000 and HD 4000. Added injecting AAPL,ig-platform-id for HD 4000. Thanks to proteinshake for finding that.
Changes:
M/branches/Chimera/Release/version
M/branches/Chimera/Release/CHANGES
M/branches/Chimera/Release/i386/libsaio/gma.c

File differences

branches/Chimera/Release/version
1
1
1.10.0
1.11.0
branches/Chimera/Release/i386/libsaio/gma.c
156156
157157
158158
159
160
161
159
160
161
162
163
164
165
162166
163167
164168
......
185189
186190
187191
188
192
189193
190194
191195
......
227231
228232
229233
234
235
236
237
238
239
240
241
230242
231243
232244
245
233246
247
248
249
250
251
234252
235253
236254
......
239257
240258
241259
242
243
244
245
246
247
260
248261
249
250262
263
264
265
266
267
268
269
270
271
251272
252273
253274
275
254276
277
278
279
280
281
255282
256283
257284
......
260287
261288
262289
263
264
265
266
267
268
290
269291
270
271292
272
293
273294
274295
275296
276
297
277298
278
279
299
280300
281
301
282302
283303
284304
285
286
287305
288
289
306
290307
291
292
293
294
295
296
297
298
299
300
308
301309
302310
303311
volatile uint8_t*regs;
uint32_tbar[7];
char*model;
uint8_t BuiltIn =0x00;
uint8_t ClassFix[4] ={ 0x00, 0x00, 0x03, 0x00 };
unsigned intdevice_id;
unsigned intdevice_id;
uint8_t BuiltIn = 0x00;
uint8_t ClassFix[4] = { 0x00, 0x00, 0x03, 0x00 };
uint8_t hd3k_device_id[4] = { 0x26, 0x01, 0x00, 0x00 };
uint8_t hd4k_device_id[4] = { 0x66, 0x01, 0x00, 0x00 };
uint8_t ig_id[4] = { 0x09, 0x00, 0x66, 0x01 };
uint8_t ig_id_mobile[4] = { 0x09, 0x00, 0x66, 0x01 };
devicepath = get_pci_dev_path(gma_dev);
}
devprop_add_value(device, "model", (uint8_t*)model, (strlen(model) + 1));
devprop_add_value(device, "device_type", (uint8_t*)"display", 8);
//devprop_add_value(device, "device_type", (uint8_t*)"display", 8);
if ((model == (char *)"Mobile GMA950")
|| (model == (char *)"Mobile GMA3150"))
devprop_add_value(device, "AAPL01,Stretch",GMAX3100_vals[21], 4);
devprop_add_value(device, "class-code",ClassFix, 4);
}
else if (model == (char *)"Intel HD Graphics 2000")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20);
}
else if (model == (char *)"Intel HD Graphics 2000 Mobile")
{
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "graphic-options", HD2000_vals[13], 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4);
devprop_add_value(device, "AAPL00,Dither", HD2000_vals[11], 4);
devprop_add_value(device, "AAPL00,DualLink", HD2000_vals[10], 4);
devprop_add_value(device, "AAPL00,LinkFormat", HD2000_vals[9], 4);
devprop_add_value(device, "AAPL00,LinkType", HD2000_vals[8], 4);
devprop_add_value(device, "AAPL00,PixelFormat", HD2000_vals[0], 4);
devprop_add_value(device, "AAPL00,T1", HD2000_vals[1], 4);
devprop_add_value(device, "AAPL00,T2", HD2000_vals[2], 4);
devprop_add_value(device, "AAPL00,T5", HD2000_vals[5], 4);
devprop_add_value(device, "AAPL00,T6", HD2000_vals[6], 4);
devprop_add_value(device, "AAPL00,T7", HD2000_vals[7], 4);
devprop_add_value(device, "AAPL00,LinkType", HD2000_vals[8], 4);
devprop_add_value(device, "AAPL00,LinkFormat", HD2000_vals[9], 4);
devprop_add_value(device, "AAPL00,DualLink", HD2000_vals[10], 4);
devprop_add_value(device, "AAPL00,Dither", HD2000_vals[11], 4);
devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4);
devprop_add_value(device, "graphic-options", HD2000_vals[13], 4);
devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20);
devprop_add_value(device, "AAPL,tbl-info", HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20);
}
else if (model == (char *)"Intel HD Graphics 3000")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "device-id", hd3k_device_id, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
}
else if (model == (char *)"Intel HD Graphics 3000 Mobile")
{
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "graphic-options", HD3000_vals[13], 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4);
devprop_add_value(device, "AAPL00,Dither", HD3000_vals[11], 4);
devprop_add_value(device, "AAPL00,DualLink", HD3000_vals[10], 4);
devprop_add_value(device, "AAPL00,LinkFormat", HD3000_vals[9], 4);
devprop_add_value(device, "AAPL00,LinkType", HD3000_vals[8], 4);
devprop_add_value(device, "AAPL00,PixelFormat", HD3000_vals[0], 4);
devprop_add_value(device, "AAPL00,T1", HD3000_vals[1], 4);
devprop_add_value(device, "AAPL00,T2", HD3000_vals[2], 4);
devprop_add_value(device, "AAPL00,T5", HD3000_vals[5], 4);
devprop_add_value(device, "AAPL00,T6", HD3000_vals[6], 4);
devprop_add_value(device, "AAPL00,T7", HD3000_vals[7], 4);
devprop_add_value(device, "AAPL00,LinkType", HD3000_vals[8], 4);
devprop_add_value(device, "AAPL00,LinkFormat", HD3000_vals[9], 4);
devprop_add_value(device, "AAPL00,DualLink", HD3000_vals[10], 4);
devprop_add_value(device, "AAPL00,Dither", HD3000_vals[11], 4);
devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4);
devprop_add_value(device, "graphic-options", HD3000_vals[13], 4);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
}
else if (model == (char *)"Intel HD Graphics 2000")
else if (model == (char *)"Intel HD Graphics 4000")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "device-id", (uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "device-id", hd4k_device_id, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20);
devprop_add_value(device, "AAPL,ig-platform-id", ig_id, 4);
}
else if (model == (char *)"Intel HD Graphics 3000")
else if (model == (char *)"Intel HD Graphics 4000 Mobile")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
device_id = 0x00000126;// Inject a valid mobile GPU device id instead of patching kexts
devprop_add_value(device, "device-id", (uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
devprop_add_value(device, "AAPL,ig-platform-id", ig_id_mobile, 4);
}
else if (model == (char *)"Intel HD Graphics 4000")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
device_id = 0x00000166;// Inject a valid mobile GPU device id instead of patching kexts
devprop_add_value(device, "device-id", (uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
}
stringdata = malloc(sizeof(uint8_t) * string->length);
if (!stringdata)
branches/Chimera/Release/CHANGES
1
12
23
34
- Fixed HD4000 graphicsenabler code. Thanks to proteinshake for AAPL,ig-platform-id info.
- Added AtiPorts option to GraphicsEnabler, so users can override the default number of ports. It proved
to be useful when used to limit the number of ports that a framebuffer registers, which seems to be a
requirement on laptops that can only use 2 ports at the same time.

Archive Download the corresponding diff file

Revision: 2036