On Tue, Dec 07, 2021 at 01:33:53PM +0100, Christian König wrote: > We can get the excl fence together with the shared ones as well. > > Signed-off-by: Christian König <christian.koenig@xxxxxxx> Pls cc driver maintainers. dim add-missing-cc is your friend if you're lazy can even combine that with git rebase -x. Same for all the other driver patches, some acks/testing would be good to avoid fallout (we had a bit much of that with all these I think). > --- > drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 - > drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 14 +++++--------- > drivers/gpu/drm/etnaviv/etnaviv_sched.c | 10 ---------- > 3 files changed, 5 insertions(+), 20 deletions(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h > index 98e60df882b6..f596d743baa3 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h > @@ -80,7 +80,6 @@ struct etnaviv_gem_submit_bo { > u64 va; > struct etnaviv_gem_object *obj; > struct etnaviv_vram_mapping *mapping; > - struct dma_fence *excl; > unsigned int nr_shared; > struct dma_fence **shared; > }; > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c > index 64c90ff348f2..4286dc93fdaa 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c > @@ -188,15 +188,11 @@ static int submit_fence_sync(struct etnaviv_gem_submit *submit) > if (submit->flags & ETNA_SUBMIT_NO_IMPLICIT) > continue; > > - if (bo->flags & ETNA_SUBMIT_BO_WRITE) { > - ret = dma_resv_get_fences(robj, true, &bo->nr_shared, > - &bo->shared); > - if (ret) > - return ret; > - } else { > - bo->excl = dma_fence_get(dma_resv_excl_fence(robj)); > - } > - > + ret = dma_resv_get_fences(robj, > + !!(bo->flags & ETNA_SUBMIT_BO_WRITE), Afaik the cast to bool !! here is overkill, compiler will do that for you or something like that. With that dropped: Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > + &bo->nr_shared, &bo->shared); > + if (ret) > + return ret; > } > > return ret; > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_sched.c b/drivers/gpu/drm/etnaviv/etnaviv_sched.c > index 180bb633d5c5..8c038a363d15 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_sched.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_sched.c > @@ -39,16 +39,6 @@ etnaviv_sched_dependency(struct drm_sched_job *sched_job, > struct etnaviv_gem_submit_bo *bo = &submit->bos[i]; > int j; > > - if (bo->excl) { > - fence = bo->excl; > - bo->excl = NULL; > - > - if (!dma_fence_is_signaled(fence)) > - return fence; > - > - dma_fence_put(fence); > - } > - > for (j = 0; j < bo->nr_shared; j++) { > if (!bo->shared[j]) > continue; > -- > 2.25.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch