Skip to content

Commit

Permalink
i915/gtt: fix ordering causing DMAR errors on object teardown.
Browse files Browse the repository at this point in the history
Previous to the last GTT rework we always rewrote the GTT then unmapped the
object, somehow this got reversed in the rework in 2.6.37-rc5 timeframe.

This fix needs to go to stable in an alternate form since the code changed.

This fixes DMAR reports on my Ironlake HP2540p.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Jan 12, 2011
1 parent a46f310 commit d15eda5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,14 +1000,14 @@ static int intel_fake_agp_remove_entries(struct agp_memory *mem,
if (mem->page_count == 0)
return 0;

intel_gtt_clear_range(pg_start, mem->page_count);

if (intel_private.base.needs_dmar) {
intel_gtt_unmap_memory(mem->sg_list, mem->num_sg);
mem->sg_list = NULL;
mem->num_sg = 0;
}

intel_gtt_clear_range(pg_start, mem->page_count);

return 0;
}

Expand Down

0 comments on commit d15eda5

Please sign in to comment.