OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb42df4
)
drm/ttm: remove the backing store if no placement is given
author
Christian König
<christian.koenig@amd.com>
Thu, 15 Mar 2018 15:48:20 +0000
(16:48 +0100)
committer
Christian König
<christian.koenig@amd.com>
Thu, 27 Feb 2020 13:58:00 +0000
(14:58 +0100)
Pipeline removal of the BOs backing store when no placement is given
during validation.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link:
https://patchwork.freedesktop.org/patch/353994/?series=73646&rev=1
drivers/gpu/drm/ttm/ttm_bo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_bo.c
b/drivers/gpu/drm/ttm/ttm_bo.c
index
151edfd
..
6d1e91b
100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_bo.c
+++ b/
drivers/gpu/drm/ttm/ttm_bo.c
@@
-1196,6
+1196,18
@@
int ttm_bo_validate(struct ttm_buffer_object *bo,
uint32_t new_flags;
dma_resv_assert_held(bo->base.resv);
+
+ /*
+ * Remove the backing store if no placement is given.
+ */
+ if (!placement->num_placement && !placement->num_busy_placement) {
+ ret = ttm_bo_pipeline_gutting(bo);
+ if (ret)
+ return ret;
+
+ return ttm_tt_create(bo, false);
+ }
+
/*
* Check whether we need to move buffer.
*/