drm/scheduler for vc5

Eric Anholt eric at anholt.net
Tue Apr 3 23:08:41 UTC 2018


Christian König <christian.koenig at amd.com> writes:

> Hi Eric,
>
> nice to see that the scheduler gets used more and more.
>
> The feature your need to solve both your binning/rendering as well as 
> your MMU problem is dependency handling. See the "dependency" callback 
> of the backend operations.
>
> With this callback the driver can return dma_fences which need to signal 
> (or at least be scheduled if it targets the same ring buffer/fifo).
>
> Now you need dma_fences as result of your run_job callback for the 
> binning step anyway. So when you return this fence from the binning step 
> as dependency for your rendering step the scheduler does exactly what 
> you want, e.g. not start the rendering before the binning is finished.

It looks like in order to use the bin's fence returned from run_job,
render first needs to depend on exec->bin.base.s_fence->scheduled so
that run_job has been called.  Is there any reason not to just depend on
exec->bin.base.s_fence->finished, instead?  Finished will be signaled
basically immediately after the run_job fence completes, right?

Also, I hadn't quite followed your suggestion about MMU switching
before.  Your trick was that you return a newly-generated dependency on
MMU switching as the final dependency, so that you only decide on
serializing the MMU switch once you're ready to run and the scheduler
was about to pick your job anyway.  This seems good to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180403/0893bbee/attachment.sig>


More information about the dri-devel mailing list