[PATCH v5 07/10] accel/rocket: Add job submission IOCTL
Jeff Hugo
jeff.hugo at oss.qualcomm.com
Fri May 30 09:33:39 PDT 2025
On 5/20/2025 4:27 AM, Tomeu Vizoso wrote:
> - version = rocket_pc_read(core, VERSION);
> - version += rocket_pc_read(core, VERSION_NUM) & 0xffff;
> + version = rocket_pc_readl(core, VERSION);
> + version += rocket_pc_readl(core, VERSION_NUM) & 0xffff;
This seems weird. Feels like an eariler patch introduced a "bug" and
you are fixing it here. If so, then shouldn't the origional patch be
updated?
> +static int
> +rocket_copy_tasks(struct drm_device *dev,
> + struct drm_file *file_priv,
> + struct drm_rocket_job *job,
> + struct rocket_job *rjob)
> +{
> + struct drm_rocket_task *tasks;
> + int ret = 0;
> + int i;
> +
> + rjob->task_count = job->task_count;
> +
> + if (!rjob->task_count)
> + return 0;
> +
> + tasks = kvmalloc_array(rjob->task_count, sizeof(*tasks), GFP_KERNEL);
> + if (!tasks) {
> + ret = -ENOMEM;
> + drm_dbg(dev, "Failed to allocate incoming tasks\n");
> + goto fail;
> + }
> +
> + if (copy_from_user(tasks,
> + (void __user *)(uintptr_t)job->tasks,
u64_to_user_ptr() ?
Same thing down in rocket_ioctl_submit_job()
More information about the linux-arm-kernel
mailing list