diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-01-09 21:26:57 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-01-09 21:26:57 +0800 |
commit | 139e9affdd49dcbe08e260a0a2bd001de16566e6 (patch) | |
tree | 2881a0030d94afcfbdbfb46f9fc5c714fd559eb5 /src | |
parent | 4f288ff2d1e7d28bf49167f073fbce21492a7c32 (diff) |
GTT access change for new integrated graphics device
Diffstat (limited to 'src')
-rw-r--r-- | src/i810_reg.h | 3 | ||||
-rw-r--r-- | src/i830_driver.c | 22 |
2 files changed, 21 insertions, 4 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h index a6663a44..26f9db48 100644 --- a/src/i810_reg.h +++ b/src/i810_reg.h @@ -539,6 +539,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PGETBL_SIZE_512KB (0 << 1) #define PGETBL_SIZE_256KB (1 << 1) #define PGETBL_SIZE_128KB (2 << 1) +#define PGETBL_SIZE_1MB (3 << 1) +#define PGETBL_SIZE_2MB (4 << 1) +#define PGETBL_SIZE_1_5MB (5 << 1) #define G33_PGETBL_SIZE_MASK (3 << 8) #define G33_PGETBL_SIZE_1M (1 << 8) #define G33_PGETBL_SIZE_2M (2 << 8) diff --git a/src/i830_driver.c b/src/i830_driver.c index eeb5ed03..2183b1d3 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -455,6 +455,15 @@ I830DetectMemory(ScrnInfoPtr pScrn) case PGETBL_SIZE_128KB: gtt_size = 128; break; + case PGETBL_SIZE_1MB: + gtt_size = 1024; + break; + case PGETBL_SIZE_2MB: + gtt_size = 2048; + break; + case PGETBL_SIZE_1_5MB: + gtt_size = 1024 + 512; + break; default: FatalError("Unknown GTT size value: %08x\n", (int)INREG(PGETBL_CTL)); } @@ -509,11 +518,11 @@ I830DetectMemory(ScrnInfoPtr pScrn) memsize = MB(64) - KB(range); break; case G33_GMCH_GMS_STOLEN_128M: - if (IS_G33CLASS(pI830)) + if (IS_I9XX(pI830)) memsize = MB(128) - KB(range); break; case G33_GMCH_GMS_STOLEN_256M: - if (IS_G33CLASS(pI830)) + if (IS_I9XX(pI830)) memsize = MB(256) - KB(range); break; } @@ -599,8 +608,13 @@ I830MapMMIO(ScrnInfoPtr pScrn) if (IS_I965G(pI830)) { - gttaddr = pI830->MMIOAddr + (512 * 1024); - pI830->GTTMapSize = 512 * 1024; + if (IS_IGD_GM(pI830)) { + gttaddr = pI830->MMIOAddr + MB(2); + pI830->GTTMapSize = MB(2); + } else { + gttaddr = pI830->MMIOAddr + KB(512); + pI830->GTTMapSize = KB(512); + } } else { |