diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-02-15 13:20:22 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-02-15 13:20:22 +0800 |
commit | 663313559873208c00c3d3748b99d837949ecdf2 (patch) | |
tree | af4dab7ff5724d2f1aea932a1125d97fa74ea86a | |
parent | 8c8ca16120927fc2d3cf8bcd5212a4227a280708 (diff) |
Bug #14440: fix stolen mem size mask on i830M
For i830M stolen mem size mask should always be 0x70.
Use 0xF0 for later chipsets should be ok, so behavior is
identical to kernel agp.
-rw-r--r-- | src/i810_reg.h | 4 | ||||
-rw-r--r-- | src/i830_driver.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h index 2893bc8e..abe5a342 100644 --- a/src/i810_reg.h +++ b/src/i810_reg.h @@ -2146,7 +2146,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define I830_GMCH_MEM_64M 0x1 #define I830_GMCH_MEM_128M 0 -#define I830_GMCH_GMS_MASK 0xF0 +#define I830_GMCH_GMS_MASK 0x70 #define I830_GMCH_GMS_DISABLED 0x00 #define I830_GMCH_GMS_LOCAL 0x10 #define I830_GMCH_GMS_STOLEN_512 0x20 @@ -2157,7 +2157,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define I830_RDRAM_ND(x) (((x) & 0x20) >> 5) #define I830_RDRAM_DDT(x) (((x) & 0x18) >> 3) -#define I855_GMCH_GMS_MASK (0x7 << 4) +#define I855_GMCH_GMS_MASK (0xF << 4) #define I855_GMCH_GMS_DISABLED 0x00 #define I855_GMCH_GMS_STOLEN_1M (0x1 << 4) #define I855_GMCH_GMS_STOLEN_4M (0x2 << 4) diff --git a/src/i830_driver.c b/src/i830_driver.c index 01418ab8..290236ec 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -495,7 +495,7 @@ I830DetectMemory(ScrnInfoPtr pScrn) range = gtt_size + 4; if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I9XX(pI830)) { - switch (gmch_ctrl & I830_GMCH_GMS_MASK) { + switch (gmch_ctrl & I855_GMCH_GMS_MASK) { case I855_GMCH_GMS_STOLEN_1M: memsize = MB(1) - KB(range); break; |