i915/gtt: fix ordering issues with status setup and DMAR
authorDave Airlie <airlied@gmail.com>
Wed, 12 Jan 2011 01:38:37 +0000 (11:38 +1000)
committerDave Airlie <airlied@gmail.com>
Wed, 12 Jan 2011 01:38:37 +0000 (11:38 +1000)
This code was setting up the status page before setting the DMAR-is-on-bit,
so we were getting DMAR errors on the status page. Reverse the two bits
of init code to the correct result.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/char/agp/intel-gtt.c

index da8161806f39c16b2e1e4f2959aa785de4c103d7..b7c0c7ee67c87f5fc5d4ed6f51f4c44735fa5175 100644 (file)
@@ -688,14 +688,14 @@ static int intel_gtt_init(void)
 
        intel_private.base.stolen_size = intel_gtt_stolen_size();
 
+       intel_private.base.needs_dmar = USE_PCI_DMA_API && INTEL_GTT_GEN > 2;
+
        ret = intel_gtt_setup_scratch_page();
        if (ret != 0) {
                intel_gtt_cleanup();
                return ret;
        }
 
-       intel_private.base.needs_dmar = USE_PCI_DMA_API && INTEL_GTT_GEN > 2;
-
        return 0;
 }