Commit aff101df authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig

Remove _commit and _sync

parent fd3dd559
......@@ -519,30 +519,6 @@ struct mali_ioctl_mem_import {
} __attribute__((packed));
ASSERT_SIZEOF_TYPE(struct mali_ioctl_mem_import, 48, 48);
struct mali_ioctl_mem_commit {
union mali_ioctl_header header;
/* [in] */
mali_ptr gpu_addr;
u64 pages;
/* [out] */
u32 result_subcode;
u32 :32;
} __attribute__((packed));
ASSERT_SIZEOF_TYPE(struct mali_ioctl_mem_commit, 32, 32);
struct mali_ioctl_sync {
union mali_ioctl_header header;
mali_ptr handle;
PAD_CPU_PTR(void* user_addr);
u64 size;
enum {
MALI_SYNC_TO_DEVICE = 1,
MALI_SYNC_TO_CPU = 2,
} type :8;
u64 :56;
} __attribute__((packed));
ASSERT_SIZEOF_TYPE(struct mali_ioctl_sync, 40, 40);
struct mali_ioctl_set_flags {
union mali_ioctl_header header;
u32 create_flags; /* [in] */
......@@ -573,8 +549,6 @@ typedef struct {
#define MALI_IOCTL_GET_VERSION (_IOWR(0x80, 0, struct mali_ioctl_get_version))
#define MALI_IOCTL_MEM_ALLOC (_IOWR(0x82, 0, struct mali_ioctl_mem_alloc))
#define MALI_IOCTL_MEM_IMPORT (_IOWR(0x82, 1, struct mali_ioctl_mem_import))
#define MALI_IOCTL_MEM_COMMIT (_IOWR(0x82, 2, struct mali_ioctl_mem_commit))
#define MALI_IOCTL_SYNC (_IOWR(0x82, 8, struct mali_ioctl_sync))
#define MALI_IOCTL_GET_VERSION_NEW (_IOWR(0x82, 16, struct mali_ioctl_get_version))
#define MALI_IOCTL_SET_FLAGS (_IOWR(0x82, 18, struct mali_ioctl_set_flags))
#define MALI_IOCTL_JOB_SUBMIT (_IOWR(0x82, 28, struct mali_ioctl_job_submit))
......
......@@ -70,8 +70,6 @@ static struct device_info mali_info = {
IOCTL_TYPE(0x82) {
IOCTL_INFO(MEM_ALLOC),
IOCTL_INFO(MEM_IMPORT),
IOCTL_INFO(MEM_COMMIT),
IOCTL_INFO(SYNC),
IOCTL_INFO(GET_VERSION_NEW),
IOCTL_INFO(SET_FLAGS),
IOCTL_INFO(JOB_SUBMIT),
......@@ -400,40 +398,6 @@ ioctl_decode_pre_mem_import(unsigned long int request, void *ptr)
panwrap_log_cont(",\n");
}
static inline void
ioctl_decode_pre_mem_commit(unsigned long int request, void *ptr)
{
const struct mali_ioctl_mem_commit *args = ptr;
panwrap_prop("gpu_addr = " MALI_PTR_FMT, args->gpu_addr);
panwrap_prop("pages = %" PRId64, args->pages);
}
static inline void
ioctl_decode_pre_sync(unsigned long int request, void *ptr)
{
const struct mali_ioctl_sync *args = ptr;
struct panwrap_mapped_memory *mem =
panwrap_find_mapped_gpu_mem(args->handle);
panwrap_prop("size = %" PRId64, args->size);
if (!mem) {
panwrap_msg("ERROR! Unknown handle specified\n");
panwrap_prop("handle = " MALI_PTR_FMT, args->handle);
panwrap_prop("user_addr = %p", args->user_addr);
return;
}
char *a = pointer_as_memory_reference(mem->gpu_va);
panwrap_prop("handle = %s", a);
free(a);
panwrap_prop("user_addr = %s + %zd", mem->name, args->user_addr - mem->addr);
panwrap_prop("type = %s", args->type == MALI_SYNC_TO_DEVICE ? "MALI_SYNC_TO_DEVICE" : "MALI_SYNC_TO_CPU");
}
static inline void
ioctl_decode_pre_set_flags(unsigned long int request, void *ptr)
{
......@@ -573,12 +537,6 @@ ioctl_decode_pre(unsigned long int request, void *ptr)
case IOCTL_CASE(MALI_IOCTL_MEM_IMPORT):
ioctl_decode_pre_mem_import(request, ptr);
break;
case IOCTL_CASE(MALI_IOCTL_MEM_COMMIT):
ioctl_decode_pre_mem_commit(request, ptr);
break;
case IOCTL_CASE(MALI_IOCTL_SYNC):
ioctl_decode_pre_sync(request, ptr);
break;
case IOCTL_CASE(MALI_IOCTL_SET_FLAGS):
ioctl_decode_pre_set_flags(request, ptr);
break;
......@@ -874,12 +832,6 @@ int ioctl(int fd, int _request, ...)
if (!panwrap_indent)
ignore = true;
/* Syncs -are-, but we sometimes disable caching */
#ifdef DISABLE_CPU_CACHING
if (IOCTL_CASE(request) == IOCTL_CASE(MALI_IOCTL_SYNC))
ignore = true;
#endif
lname = panwrap_lower_string(name);
number = ioctl_count++;
......@@ -943,22 +895,6 @@ int ioctl(int fd, int _request, ...)
panwrap_track_allocation(args->gpu_va, args->flags, number, args->va_pages * 4096);
}
/* Replay synced memory if that's an issue */
#ifndef DISABLE_CPU_CACHING
if (IOCTL_CASE(request) == IOCTL_CASE(MALI_IOCTL_SYNC)) {
const struct mali_ioctl_sync *args = ptr;
if (args->type == MALI_SYNC_TO_DEVICE) {
struct panwrap_mapped_memory *mem = panwrap_find_mapped_mem_containing(args->user_addr);
if (mem)
replay_memory_specific(mem, args->user_addr - mem->addr, args->size);
else
panwrap_msg("Bad synced memory\n");
}
}
#endif
if (IOCTL_CASE(request) == IOCTL_CASE(MALI_IOCTL_GPU_PROPS_REG_DUMP)) {
const struct mali_ioctl_gpu_props_reg_dump *dump = ptr;
unsigned product_id = dump->core.product_id;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment