> Better, but I was hoping we can mostly delete panfrost_ioctl_submit(), > leaving something along the lines of: > > static int panfrost_ioctl_submit(struct drm_device *dev, void *data, > struct drm_file *file) > { > struct panfrost_submitqueue *queue; > struct drm_panfrost_submit *args = data; > struct drm_panfrost_job submit_args = { > .head = args->jc, > .bos = args->bo_handles, > .in_syncs = args->in_syncs, > .out_syncs = &args->out_sync, // FIXME > .in_sync_count = args->in_sync_count, > .out_sync_count = args->out_sync > 0 ? 1 : 0, > .bo_count = args->bo_handle_count, > .requirements = args->requirements > }; > int ret; > > queue = panfrost_submitqueue_get(file->driver_priv, 0); > > ret = panfrost_submit_job(dev, file, queue, &submit_args, > sizeof(u32), ...); > > return ret; > } > > But obviously the out_sync part needs special handling as we can't just > pass a kernel pointer in like that ;) This, a dozen times this.