Patchwork [3.5.y.z,extended,stable] Patch "drm/cirrus: Invalidate page tables when pinning a BO" has been added to staging queue

mail settings
Submitter Luis Henriques
Date Aug. 13, 2013, 1:59 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/266822/
State New
Headers show


Luis Henriques - Aug. 13, 2013, 1:59 p.m.
This is a note to let you know that I have just added a patch titled

    drm/cirrus: Invalidate page tables when pinning a BO

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 1220cb2681204c40972e9a793f4826f9e20d1ed1 Mon Sep 17 00:00:00 2001
From: Michal Srb <>
Date: Tue, 6 Aug 2013 15:26:50 +0200
Subject: [PATCH] drm/cirrus: Invalidate page tables when pinning a BO

commit 109a51598869a39fdcec2d49672a9a39b6d89481 upstream.

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 <>
Signed-off-by: Dave Airlie <>
Signed-off-by: Luis Henriques <>
 drivers/gpu/drm/cirrus/cirrus_ttm.c | 1 +
 1 file changed, 1 insertion(+)



diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c
index d4b1b1d..d57bcc8 100644
--- a/drivers/gpu/drm/cirrus/cirrus_ttm.c
+++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c
@@ -353,6 +353,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);