projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
661a760
)
drm/amd/amdgpu: add amdgpu_bo_gpu_accessible helper function
author
Nicolai Hähnle
<
[email protected]
>
Thu, 15 Dec 2016 16:04:51 +0000
(17:04 +0100)
committer
Alex Deucher
<
[email protected]
>
Fri, 27 Jan 2017 16:13:17 +0000
(11:13 -0500)
Signed-off-by: Nicolai Hähnle <
[email protected]
>
Reviewed-by: Chunming Zhou <
[email protected]
>
Reviewed-by: Christian König <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index 4306b2f2c8f0d57134bf19599d59f0e18c817e5d..15a723adca764903f21ef0f220852c70093b0a36 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@
-114,6
+114,15
@@
static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo)
return drm_vma_node_offset_addr(&bo->tbo.vma_node);
}
+/**
+ * amdgpu_bo_gpu_accessible - return whether the bo is currently in memory that
+ * is accessible to the GPU.
+ */
+static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo)
+{
+ return bo->tbo.mem.mem_type != TTM_PL_SYSTEM;
+}
+
int amdgpu_bo_create(struct amdgpu_device *adev,
unsigned long size, int byte_align,
bool kernel, u32 domain, u64 flags,