Skip to content
Commit 07c2a416 authored by Melissa Wen's avatar Melissa Wen Committed by Melissa Wen
Browse files

drm/v3d: alloc and init job in one shot



Move job memory allocation to v3d_job_init function. This aim to facilitate
error handling in job initialization, since cleanup steps are similar for
all (struct v3d_job)-based types of job involved in a command submission.
To generalize v3d_job_init(), this change takes into account that all job
structs have the first element a struct v3d_job (bin, render, tfu, csd) or
it is a v3d_job itself (clean_job) for pointer casting.

v3:
- explicitly init job as NULL (Iago)
- fix pm failure handling on v3_job_init (Iago)

Suggested-by: default avatarIago Toral Quiroga <itoral@igalia.com>
Signed-off-by: default avatarMelissa Wen <mwen@igalia.com>
Reviewed-by: default avatarIago Toral Quiroga <itoral@igalia.com>
Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4d12e07bd334d2cddb51cabd359e99edde595619.1633016479.git.mwen@igalia.com
parent 223583dd
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