Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9205665 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Enable secure buffers via memalloc packets



This is to allow GMU to request secure gpu global buffers.

Change-Id: Iacef726ee3abe02b56178f475ebe9835649a868c
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 83db7b27
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -545,6 +545,9 @@ static struct mem_alloc_entry *get_mem_alloc_entry(
	if (!(desc->flags & MEMFLAG_GFX_WRITEABLE))
		flags |= KGSL_MEMFLAGS_GPUREADONLY;

	if (desc->flags & MEMFLAG_GFX_SECURE)
		flags |= KGSL_MEMFLAGS_SECURE;

	entry->gpu_md = kgsl_allocate_global(device, desc->size, flags, priv,
		memkind_string);
	if (IS_ERR(entry->gpu_md)) {
+3 −0
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ enum mem_kind {
/* Host initializes the buffer */
#define MEMFLAG_HOST_INIT       BIT(9)

/* Gfx buffer needs to be secure */
#define MEMFLAG_GFX_SECURE      BIT(12)

struct mem_alloc_entry {
	struct hfi_mem_alloc_desc desc;
	struct kgsl_memdesc *gpu_md;