From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> At least on my MGM the last 128KB of, what I assume is the stolen memory region, contains the GTT entries. Let's assume that holds for all gen2 platforms. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/char/agp/intel-gtt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 99ff699..35788a2 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -430,6 +430,10 @@ static unsigned int intel_gtt_stolen_size(bool *has_local_memory) } } + /* Assume GTT entries occupy the last 128KB of stolen/local memory. */ + if (stolen_size > 0 && INTEL_GTT_GEN == 2) + stolen_size -= KB(128); + if (stolen_size > 0) { dev_info(&intel_private.bridge_dev->dev, "detected %dK %s memory\n", stolen_size / KB(1), *has_local_memory ? "local" : "stolen"); -- 1.8.3.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx