Skip to content

Commit 8a3bdfe

Browse files
Thomas Gerlachtorvalds
authored andcommitted
drivers/video/efifb.c: support framebuffer for NVIDIA 9400M in MacBook Pro 5,1
Description of patch: --------------------- This is a patch for the EFI framebuffer driver to enable the framebuffer of the NVIDIA 9400M as found in MacBook Pro (MBP) 5,1 and up. The framebuffer of the NVIDIA graphic cards are located at the following addresses in memory: 9400M: 0xC0010000 9600M GT: 0xB0030000 The patch delivered right here only provides the memory location of the framebuffer of the 9400M device. The 9600M GT is not covered. It is assumed that the 9400M is used when powered up the MBP. The information which device is currently powered and in use is stored in the 64 bytes large EFI variable "gpu-power-prefs". More specifically, byte 0x3B indicates whether 9600M GT (0x00) or 9400M (0x01) is online. The PCI bus IDs are the following: 9400M: PCI 03:00:00 9600M GT: PCI 02:00:00 The EFI variables can be easily read-out and manipulated with "rEFIt", an MBP specific bootloader tool. For more information on how handle rEFIt and EFI variables please consult "http://refit.sourceforge.net" and "http://ubuntuforums.org/archive/index.php/t-1076879.html". IMPORTANT NOTE: The information on how to activate the 9400M device given at "ubuntuforums.org" is not correct, since it states gpu-power-prefs[0x3B] = 0x00 -> 9400M (PCI 02:00:00) gpu-power-prefs[0x3B] = 0x01 -> 9600M GT (PCI 03:00:00) Actually, the assignment of the values and the PCI bus IDs are swapped. Suggestions: ------------ To cover framebuffers of both 9400M and 9600M GT, I would suggest to implement a conditional on "gpu-power-prefs". Depending on the value of byte 0x3B, the according framebuffer is selected. However, this requires kernel access to the EFI variables. [[email protected]: rename optname, per Peter Jones] Signed-off-by: Thomas Gerlach <[email protected]> Acked-by: Peter Jones <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9bd14a8 commit 8a3bdfe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/video/efifb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ enum {
4949
M_MBP_2, /* MacBook Pro 2nd gen */
5050
M_MBP_SR, /* MacBook Pro (Santa Rosa) */
5151
M_MBP_4, /* MacBook Pro, 4th gen */
52+
M_MBP_5_1, /* MacBook Pro, 5,1th gen */
5253
M_UNKNOWN /* placeholder */
5354
};
5455

@@ -70,6 +71,7 @@ static struct efifb_dmi_info {
7071
[M_MBP_2] = { "mbp2", 0, 0, 0, 0 }, /* placeholder */
7172
[M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900 },
7273
[M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200 },
74+
[M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900 },
7375
[M_UNKNOWN] = { NULL, 0, 0, 0, 0 }
7476
};
7577

@@ -106,6 +108,7 @@ static struct dmi_system_id __initdata dmi_system_table[] = {
106108
EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR),
107109
EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR),
108110
EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4),
111+
EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,1", M_MBP_5_1),
109112
{},
110113
};
111114

0 commit comments

Comments
 (0)