diff options
author | Eric Anholt <eric@anholt.net> | 2006-11-29 15:06:32 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2006-11-29 15:06:32 -0800 |
commit | b6fc8df9a52f5fe1b4d26ae06bc4d48235b44a67 (patch) | |
tree | f900773d3c287c46f7f879a72630de03b236b65e /src/i810_reg.h | |
parent | 359dc81c07901665da0f86c573c096fa1661cdd2 (diff) |
Properly detect the GTT size on the G965.
In the past, the GTT has always been sized just large enough to map the whole
graphics aperture. However, apparently on the G965 that isn't the case, and
it is actually 512KB on hardware with a 256MB aperture. This resulted in X
not bothering to allocate memory for 256KB that it thought was already mapped
into stolen memory, and thus garbage rendering (particularly visible in large
video modes that displayed this unallocated memory). The kernel happens to
get the right answer by hardwiring a 512KB GTT size already, but that may not
be true on future hardware.
Instead, we use a convenient field in PGETBL_CTL that's specifically for the
GTT size rather than the aperture size, which gets us the answer we want.
Diffstat (limited to 'src/i810_reg.h')
-rw-r--r-- | src/i810_reg.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h index 53a063fc..9c6e0dd2 100644 --- a/src/i810_reg.h +++ b/src/i810_reg.h @@ -499,6 +499,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PGETBL_ADDR_MASK 0xFFFFF000 #define PGETBL_ENABLE_MASK 0x00000001 #define PGETBL_ENABLED 0x00000001 +/** Added in 965G, this field has the actual size of the global GTT */ +#define PGETBL_SIZE_MASK 0x0000000e +#define PGETBL_SIZE_512KB (0 << 1) +#define PGETBL_SIZE_256KB (1 << 1) +#define PGETBL_SIZE_128KB (2 << 1) /* Register containing pge table error results, p276 */ |