Re: [PATCH] dma-buf/fence-array: enable_signaling from wq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 03, 2016 at 07:34:02PM -0400, Rob Clark wrote:
> On Thu, Nov 3, 2016 at 5:41 PM, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> > static bool dma_fence_array_enable_signaling(struct dma_fence *fence)
> > {
> >         struct dma_fence_array *array = to_dma_fence_array(fence);
> >         int num_pending = atomic_read(&array->num_pending);
> >         int i;
> >
> >         for (i = 0; i < array->num_fences; i++)
> >                 if (is_signaled(array->fences[i]) && !--num_pending) {
> >                         atomic_set(&array->num_pending, 0);
> >                         return false;
> >                 }
> >
> >         dma_fence_get(&array->base);
> >         queue_work(system_unbound_wq, &array->enable_signaling_worker);
> > }
> 
> hmm, I guess just to try to avoid the wq?

Yeah, not all fences are capable of reporting the current status, and
some others may only report signaled() after enable_signaling, but for
i915/nouveau even msm can report the current status without the extra
step. For those it seems worth skipping the wq.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux