intel_agp: fix stolen mem range on G33
authorZhenyu Wang <zhenyu.z.wang@intel.com>
Tue, 11 Sep 2007 22:23:57 +0000 (15:23 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 12 Sep 2007 00:21:20 +0000 (17:21 -0700)
G33 GTT stolen memory is below graphics data stolen memory and be seperate,
so don't subtract it in stolen mem counting.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Acked-by: Dave Airlie <airlied@linux.ie>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/agp/intel-agp.c

index 2c9ca2c64628dd178ca6ae489e5d129e5139f119..581f9222a9d11cc43dfef9482f4fee65acb804f7 100644 (file)
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
                        break;
                }
        } else {
+               /* G33's GTT stolen memory is separate from gfx data
+                * stolen memory.
+                */
+               if (IS_G33)
+                       size = 0;
                switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
                case I855_GMCH_GMS_STOLEN_1M:
                        gtt_entries = MB(1) - KB(size);