Commit 29be5cb6 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Cont

parent 21ae531e
......@@ -184,27 +184,6 @@ static const struct panwrap_flag_info js_feature_info[] = {
};
#undef FLAG_INFO
static int job_count = 0;
static void emit_atoms(void *ptr, bool bifrost) {
const struct mali_ioctl_job_submit *args = ptr;
const struct mali_jd_atom_v2 *atoms = args->addr;
int job_no = job_count++;
int job_numbers[256] = { 0 };
for (int i = 0; i < args->nr_atoms; i++) {
const struct mali_jd_atom_v2 *a = &atoms[i];
if (a->jc) {
int req = a->core_req | a->compat_core_req;
/* TODO: Dump */
}
}
}
/**
* Overriden libc functions start here
*/
......@@ -274,6 +253,7 @@ close(int fd)
/* HW version */
static bool bifrost = false;
int allocation_number = 0;
/* XXX: Android has a messed up ioctl signature */
int ioctl(int fd, int _request, ...)
......@@ -307,7 +287,6 @@ int ioctl(int fd, int _request, ...)
if (IOCTL_CASE(request) == IOCTL_CASE(MALI_IOCTL_JOB_SUBMIT)) {
emit_atoms(ptr, bifrost);
replay_memory();
}
......@@ -317,7 +296,7 @@ int ioctl(int fd, int _request, ...)
if (IOCTL_CASE(request) == IOCTL_CASE(MALI_IOCTL_MEM_ALLOC)) {
const struct mali_ioctl_mem_alloc *args = ptr;
panwrap_track_allocation(args->gpu_va, args->flags, number, args->va_pages * 4096);
panwrap_track_allocation(args->gpu_va, args->flags, allocation_number++, args->va_pages * 4096);
}
if (IOCTL_CASE(request) == IOCTL_CASE(MALI_IOCTL_GPU_PROPS_REG_DUMP)) {
......
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