summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drmP.h4
-rw-r--r--linux-core/drm_bo_move.c5
-rw-r--r--linux-core/drm_vm.c1
3 files changed, 6 insertions, 4 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 7b8f2c66..55035210 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -608,9 +608,6 @@ typedef enum {
} drm_object_type_t;
-
-
-
/*
* A user object is a structure that helps the drm give out user handles
* to kernel internal objects and to keep track of these objects so that
@@ -647,6 +644,7 @@ typedef struct drm_ref_object {
drm_ref_t unref_action;
} drm_ref_object_t;
+struct drm_buffer_object;
#include "drm_ttm.h"
diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c
index b7a49299..4ed3392d 100644
--- a/linux-core/drm_bo_move.c
+++ b/linux-core/drm_bo_move.c
@@ -243,6 +243,11 @@ int drm_bo_move_memcpy(drm_buffer_object_t *bo,
}
mb();
out2:
+ if (old_mem->mm_node) {
+ mutex_lock(&dev->struct_mutex);
+ drm_mm_put_block(old_mem->mm_node);
+ mutex_unlock(&dev->struct_mutex);
+ }
*old_mem = *new_mem;
new_mem->mm_node = NULL;
old_mem->mask = save_mask;
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 25779eca..5afa9800 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -732,7 +732,6 @@ struct page *drm_bo_vm_fault(struct vm_area_struct *vma,
{
unsigned long address = data->address;
drm_buffer_object_t *bo = (drm_buffer_object_t *) vma->vm_private_data;
- drm_local_map_t *map;
unsigned long page_offset;
struct page *page = NULL;
drm_ttm_t *ttm;