diff options
author | Michal Srb <msrb@suse.com> | 2013-08-06 17:26:50 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-08-07 04:00:45 +0400 |
commit | 109a51598869a39fdcec2d49672a9a39b6d89481 (patch) | |
tree | 33cddbdca7e436510c6e453b55d64f0b0006be47 /drivers/gpu/drm/cirrus | |
parent | adfb8e51332153016857194b85309150ac560286 (diff) | |
download | linux-109a51598869a39fdcec2d49672a9a39b6d89481.tar.xz |
drm/cirrus: Invalidate page tables when pinning a BO
This is a cirrus version of Egbert Eich's patch for mgag200.
Without bo.bdev->dev_mapping set, the ttm_bo_unmap_virtual_locked
called from ttm_bo_handle_move_mem returns with no effect. If any
application accessed the memory before it was moved, it will
access wrong memory next time. This causes crashes when changing
resolution down.
Signed-off-by: Michal Srb <msrb@suse.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/cirrus')
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_ttm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 0047012045c2..69fd8f1ac8df 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -328,6 +328,7 @@ int cirrus_bo_create(struct drm_device *dev, int size, int align, cirrusbo->gem.driver_private = NULL; cirrusbo->bo.bdev = &cirrus->ttm.bdev; + cirrusbo->bo.bdev->dev_mapping = dev->dev_mapping; cirrus_ttm_placement(cirrusbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM); |