aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-14 13:21:21 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-14 15:09:17 -0700
commit4f03728fb7edad3e8f62dbe9f9326a216eecea85 (patch)
treed12c20cc32a9866c24b857e40f60ff65aab0073e /src
parent6c84a2665c619ca8dd0c4c64617b87ae1e5565e3 (diff)
pan/decode: Prefer uint64_t to mali_ptr
This removes an unwanted dependency on panfrost-job.h Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/pandecode/cmdline.c6
-rw-r--r--src/panfrost/pandecode/common.c8
-rw-r--r--src/panfrost/pandecode/decode.h14
3 files changed, 14 insertions, 14 deletions
diff --git a/src/panfrost/pandecode/cmdline.c b/src/panfrost/pandecode/cmdline.c
index 0ac952fa6d5..256b532f314 100644
--- a/src/panfrost/pandecode/cmdline.c
+++ b/src/panfrost/pandecode/cmdline.c
@@ -44,7 +44,7 @@ pandecode_read_filename(const char *base, const char *name)
}
static void
-pandecode_read_memory(const char *base, const char *name, mali_ptr gpu_va)
+pandecode_read_memory(const char *base, const char *name, uint64_t gpu_va)
{
FILE *fp = pandecode_read_filename(base, name);
@@ -70,7 +70,7 @@ pandecode_read_mmap(const char *base, const char *line)
{
assert(strlen(line) < 500);
- mali_ptr addr;
+ uint64_t addr;
char name[512];
sscanf(line, "MMAP %" PRIx64 " %s", &addr, name);
@@ -80,7 +80,7 @@ pandecode_read_mmap(const char *base, const char *line)
static void
pandecode_read_job_submit(const char *base, const char *line)
{
- mali_ptr addr;
+ uint64_t addr;
unsigned core_req;
unsigned is_bifrost;
diff --git a/src/panfrost/pandecode/common.c b/src/panfrost/pandecode/common.c
index 0cefdb89957..6154b3cd505 100644
--- a/src/panfrost/pandecode/common.c
+++ b/src/panfrost/pandecode/common.c
@@ -37,7 +37,7 @@
static struct pandecode_mapped_memory mmaps;
struct pandecode_mapped_memory *
-pandecode_find_mapped_gpu_mem_containing(mali_ptr addr)
+pandecode_find_mapped_gpu_mem_containing(uint64_t addr)
{
list_for_each_entry(struct pandecode_mapped_memory, pos, &mmaps.node, node) {
if (addr >= pos->gpu_va && addr < pos->gpu_va + pos->length)
@@ -48,7 +48,7 @@ pandecode_find_mapped_gpu_mem_containing(mali_ptr addr)
}
void
-pandecode_inject_mmap(mali_ptr gpu_va, void *cpu, unsigned sz, const char *name)
+pandecode_inject_mmap(uint64_t gpu_va, void *cpu, unsigned sz, const char *name)
{
struct pandecode_mapped_memory *mapped_mem = NULL;
@@ -73,7 +73,7 @@ pandecode_inject_mmap(mali_ptr gpu_va, void *cpu, unsigned sz, const char *name)
}
char *
-pointer_as_memory_reference(mali_ptr ptr)
+pointer_as_memory_reference(uint64_t ptr)
{
struct pandecode_mapped_memory *mapped;
char *out = malloc(128);
@@ -89,7 +89,7 @@ pointer_as_memory_reference(mali_ptr ptr)
/* Just use the raw address if other options are exhausted */
- snprintf(out, 128, MALI_PTR_FMT, ptr);
+ snprintf(out, 128, "0x%" PRIx64, ptr);
return out;
}
diff --git a/src/panfrost/pandecode/decode.h b/src/panfrost/pandecode/decode.h
index 3db0c0d7091..293203b1472 100644
--- a/src/panfrost/pandecode/decode.h
+++ b/src/panfrost/pandecode/decode.h
@@ -29,7 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
-#include <panfrost-job.h>
+#include <inttypes.h>
#include "util/list.h"
struct pandecode_mapped_memory {
@@ -38,23 +38,23 @@ struct pandecode_mapped_memory {
size_t length;
void *addr;
- mali_ptr gpu_va;
+ uint64_t gpu_va;
char name[32];
};
void pandecode_initialize(void);
-char *pointer_as_memory_reference(mali_ptr ptr);
+char *pointer_as_memory_reference(uint64_t ptr);
-struct pandecode_mapped_memory *pandecode_find_mapped_gpu_mem_containing(mali_ptr addr);
+struct pandecode_mapped_memory *pandecode_find_mapped_gpu_mem_containing(uint64_t addr);
void
-pandecode_inject_mmap(mali_ptr gpu_va, void *cpu, unsigned sz, const char *name);
+pandecode_inject_mmap(uint64_t gpu_va, void *cpu, unsigned sz, const char *name);
static inline void *
__pandecode_fetch_gpu_mem(const struct pandecode_mapped_memory *mem,
- mali_ptr gpu_va, size_t size,
+ uint64_t gpu_va, size_t size,
int line, const char *filename)
{
if (!mem)
@@ -88,6 +88,6 @@ __pandecode_fetch_gpu_mem(const struct pandecode_mapped_memory *mem,
__LINE__, __FILE__)
/* Common entrypoint */
-int pandecode_jc(mali_ptr jc_gpu_va, bool bifrost);
+int pandecode_jc(uint64_t jc_gpu_va, bool bifrost);
#endif /* __MMAP_TRACE_H__ */