summaryrefslogtreecommitdiff
path: root/include/uapi/drm/lima_drm.h
diff options
context:
space:
mode:
authorQiang Yu <yuq825@gmail.com>2020-01-16 16:11:55 +0300
committerQiang Yu <yuq825@gmail.com>2020-01-27 17:01:09 +0300
commit6aebc51d7aeff5a30d86485f320f0c871b5f23a4 (patch)
tree66067f933e78b142401d6cd985fa225514b37c6e /include/uapi/drm/lima_drm.h
parentdc76cb7a1fd195348100c2a87eb1d55d2a7ddd09 (diff)
downloadlinux-6aebc51d7aeff5a30d86485f320f0c871b5f23a4.tar.xz
drm/lima: support heap buffer creation
heap buffer is used as output of GP and input of PP for Mali Utgard GPU. Size of heap buffer depends on the task so is a runtime variable. Previously we just create a large enough buffer as heap buffer. Now we add a heap buffer type to be able to increase the backup memory dynamically when GP fail due to lack of heap memory. Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Tested-by: Andreas Baierl <ichgeh@imkreisrum.de> Signed-off-by: Qiang Yu <yuq825@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200116131157.13346-4-yuq825@gmail.com
Diffstat (limited to 'include/uapi/drm/lima_drm.h')
-rw-r--r--include/uapi/drm/lima_drm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/uapi/drm/lima_drm.h b/include/uapi/drm/lima_drm.h
index 95a00fb867e6..1ec58d652a5a 100644
--- a/include/uapi/drm/lima_drm.h
+++ b/include/uapi/drm/lima_drm.h
@@ -32,12 +32,19 @@ struct drm_lima_get_param {
__u64 value; /* out, parameter value */
};
+/*
+ * heap buffer dynamically increase backup memory size when GP task fail
+ * due to lack of heap memory. size field of heap buffer is an up bound of
+ * the backup memory which can be set to a fairly large value.
+ */
+#define LIMA_BO_FLAG_HEAP (1 << 0)
+
/**
* create a buffer for used by GPU
*/
struct drm_lima_gem_create {
__u32 size; /* in, buffer size */
- __u32 flags; /* in, currently no flags, must be zero */
+ __u32 flags; /* in, buffer flags */
__u32 handle; /* out, GEM buffer handle */
__u32 pad; /* pad, must be zero */
};