• Jack Zhang's avatar
    drm/amd/amdgpu embed hw_fence into amdgpu_job · c530b02f
    Jack Zhang authored
    Why: Previously hw fence is alloced separately with job.
    It caused historical lifetime issues and corner cases.
    The ideal situation is to take fence to manage both job
    and fence's lifetime, and simplify the design of gpu-scheduler.
    
    How:
    We propose to embed hw_fence into amdgpu_job.
    1. We cover the normal job submission by this method.
    2. For ib_test, and submit without a parent job keep the
    legacy way to create a hw fence separately.
    v2:
    use AMDGPU_FENCE_FLAG_EMBED_IN_JOB_BIT to show that the fence is
    embedded in a job.
    v3:
    remove redundant variable ring in amdgpu_job
    v4:
    add tdr sequence support for this feature. Add a job_run_counter to
    indicate whether this job is a resubmit job.
    v5
    add missing handling in amdgpu_fence_enable_signaling
    Signed-off-by: default avatarJingwen Chen <Jingwen.Chen2@amd.com>
    Signed-off-by: default avatarJack Zhang <Jack.Zhang7@hotmail.com>
    Reviewed-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
    Reviewed by: Monk Liu <monk.liu@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    c530b02f
amdgpu_job.h 3.1 KB