Voodooprojects
Chameleon => DevTalk => Patches => Topic started by: Gringo Vermelho on October 08, 2010, 05:13:27 PM
-
Patch by Jingu is here in the NVEnabler release thread:
http://www.projectosx.com/forum/index.php?s=&showtopic=370&view=findpost&p=10461
Please consider adding this to Chameleon 2.0 RC5. There's more info specifically about display-cfg in the first post:
http://www.projectosx.com/forum/index.php?showtopic=370
At present I'm using the DSDT code below to inject a suitable display-cfg value. It works together with Chameleon Graphics Enabler and gives me working analog TV-out on my 9800GTX+. Having this configurable via com.apple.Boot.plist would be very convenient.
Device (GFX0)
{
Name (_ADR, Zero)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x12)
{
"@0,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@0,device_type",
Buffer (0x08)
{
"display"
},
"@0,display-cfg",
Buffer (0x04)
{
0x03, 0x01, 0x00, 0x00
},
"@0,name",
Buffer (0x0F)
{
"NVDA,Display-A"
},
"@1,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@1,device_type",
Buffer (0x08)
{
"display"
},
"@1,display-cfg",
Buffer (0x04)
{
0xFF, 0xFF, 0x00, 0x01
},
"@1,name",
Buffer (0x0F)
{
"NVDA,Display-B"
},
"NVCAP",
Buffer (0x18)
{
/* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
/* 0008 */ 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
/* 0010 */ 0x00, 0x00, 0x00, 0x00
}
}, Local0)
MCDP (Arg2, RefOf (Local0))
Return (Local0)
}
-
hi Gringo,
just to tell u that I (at least) would be interested in implementing this into my branch. So far, I added this to nvidia.c:
static uint8_t default_dcfg_0[] = {0xff, 0xff, 0xff, 0xff};
static uint8_t default_dcfg_1[] = {0xff, 0xff, 0xff, 0xff};
static uint8_t default_NVPM[]= {
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
#define DCFG0_LEN ( sizeof(default_dcfg_0) / sizeof(uint8_t) )
#define DCFG1_LEN ( sizeof(default_dcfg_1) / sizeof(uint8_t) )
...
if (getValueForKey(kdcfg0, &value, &len, &bootInfo->bootConfig) && len == DCFG0_LEN * 2) {
uint8_t new_dcfg0[DCFG0_LEN];
if (hex2bin(value, new_dcfg0, DCFG0_LEN) == 0) {
verbose("Using user supplied @0,display-cfg\n");
memcpy(default_dcfg_0, new_dcfg0, DCFG0_LEN);
}
}
#if DEBUG_dcfg0
printf("@0,display-cfg: %02x%02x%02x%02x\n",
default_dcfg_0[0], default_dcfg_0[1], default_dcfg_0[2], default_dcfg_0[3], default_dcfg_0[4]);
#endif
if (getValueForKey(kdcfg1, &value, &len, &bootInfo->bootConfig) && len == DCFG1_LEN * 2) {
uint8_t new_dcfg1[DCFG1_LEN];
if (hex2bin(value, new_dcfg1, DCFG1_LEN) == 0) {
verbose("Using user supplied @1,display-cfg\n");
memcpy(default_dcfg_1, new_dcfg1, DCFG1_LEN);
}
}
#if DEBUG_dcfg1
printf("@1,display-cfg: %02x%02x%02x%02x\n",
default_dcfg_1[0], default_dcfg_1[1], default_dcfg_1[2], default_dcfg_1[3], default_dcfg_1[4]);
#endif
...
devprop_add_value(device, "@0,display-cfg", default_dcfg_0, DCFG0_LEN);
devprop_add_value(device, "@1,display-cfg", default_dcfg_1, DCFG1_LEN);
devprop_add_value(device, "NVPM", default_NVPM, 28);
What I did here, is clone how NVCAP injection is done ;D Next I added these keys to boot.h:
#define kdcfg0 "display_0" /* nvidia.c */
#define kdcfg1 "display_1" /* nvidia.c */
That's, user adds the keys to boot.plist. But, I don't seem to get it to work (not sure in which format the value should be input :-[).
-
Cool, thanks for looking at it valv.
The discussion continues in the thread over at ProjectOSX but I got lost trying to make sense of it.
-
just to tell u that I (at least) would be interested in implementing this into my branch.
Hi, Did you have the chance to implement it in your branch? Any progress on this subject?
Cheers!
-
Yes...not yet online though :P
-
I implemented this patch and have good reports.