From: Thomas Hellstrom <[email protected]>

This is needed to fix a vmwgfx memory usage bug.

Signed-off-by: Thomas Hellstrom <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>

 drivers/gpu/drm/ttm/ttm_bo.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=0eaddb28d3460f13102cd82cf58af875bfb1bd53

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 8036b6e..1a3e909 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -943,6 +943,14 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
                ttm_flag_masked(&cur_flags, placement->busy_placement[i],
                                ~TTM_PL_MASK_MEMTYPE);
 
+
+               if (mem_type == TTM_PL_SYSTEM) {
+                       mem->mem_type = mem_type;
+                       mem->placement = cur_flags;
+                       mem->mm_node = NULL;
+                       return 0;
+               }
+
                ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem,
                                                interruptible, no_wait);
                if (ret == 0 && mem->mm_node) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to