On Mon, Feb 9, 2015 at 10:49 PM, Matt DeVillier matt.devillier@gmail.com wrote:
Greetings!
I'm looking to adjust the amount of system memory allocated to the GPU on panther (Haswell mobile), since certain applications (eg, Steam) report a suboptimal amount of GPU memory. lspci reports the following:
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller]) Subsystem: Intel Corporation Haswell-ULT Integrated Graphics Controller Flags: bus master, fast devsel, latency 0, IRQ 43 Memory at e0000000 (64-bit, non-prefetchable) [size=4M] Memory at d0000000 (64-bit, prefetchable) [size=256M] I/O ports at 3000 [size=64] Expansion ROM at <unassigned> [disabled] Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [d0] Power Management version 2 Capabilities: [a4] PCI Advanced Features Kernel driver in use: i915
Looking at src/northbridge/intel/haswell/early_init.c, the 256M appears to correlate to the MSAC register, and going by Intel's datasheet, setting the MSAC to 0x6 (from the current value of 0x2) should increase the allocation to 512MB, yet doing so appears to have no affect (at least as far as lspci is concerned).
I also looked at the GMS portion of the GGC register, which is currently set to 32MB, but changing it, either in conjunction with or separately from MSAC, has no discernible effect either.
Obviously there's something else I'm missing, so would appreciate any help.
The MSAC is the aperture window while the GGC is the stolen memory for the graphics. The aperture just gives a contiguous window into memory mapped by GPU (which could be the stolen memory). The stolen memory for graphics really just makes displaying things in firmware easier since there's a set aside piece of memory to use as a framebuffer.
I'm not familiar with Steam's complaints about suboptimal GPU memory (or any other apps). Can you quote the complaint so further research can be done into what it's actually looking at.
All that said, I looked into the reference code you're running. It sets a fixed 256MiB aperture. You should be able to change MSAC after the memory training is done in romstage. You can confirm this by keeping your 0x6 value in early_init.c and reading that register back after memory init has been done. Additionally, the 32MiB of stolen memory is also fixed in the MRC, but you can't just change that after the fact because that affects the physical address space directly.
Hope that helps.
-Aaron