• Daniel Vetter's avatar
    drm/msm: Improve drm/sched point of no return rules · 357285a2
    Daniel Vetter authored
    Originally drm_sched_job_init was the point of no return, after which
    drivers really should submit a job. I've split that up, which allows
    us to fix this issue pretty easily.
    
    Only thing we have to take care of is to not skip to error paths after
    that. Other drivers do this the same for out-fence and similar things.
    
    v2: It's not really a bugfix, just an improvement, since all
    drm_sched_job_arm does is reserve the fence number. And gaps should be
    fine, as long as the drm_sched_job doesn't escape anywhere at all.
    
    For robustness it's still better to align with other drivers here and
    not bail out after job_arm().
    
    v3: I misplaced drm_sched_job_arm by _one_ line! Thanks to Rob for
    testing and debug help.
    
    Cc: Rob Clark <robdclark@chromium.org>
    Cc: Rob Clark <robdclark@gmail.com>
    Tested-by: default avatarRob Clark <robdclark@gmail.com>
    Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
    Cc: Sean Paul <sean@poorly.run>
    Cc: Sumit Semwal <sumit.semwal@linaro.org>
    Cc: "Christian König" <christian.koenig@amd.com>
    Cc: linux-arm-msm@vger.kernel.org
    Cc: dri-devel@lists.freedesktop.org
    Cc: freedreno@lists.freedesktop.org
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210826093334.1117944-1-daniel.vetter@ffwll.ch
    357285a2
msm_gem_submit.c 22.5 KB