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).
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.