From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: drm/scheduler for vc5 Date: Tue, 03 Apr 2018 16:08:41 -0700 Message-ID: <87zi2jhoqu.fsf@anholt.net> References: <87o9j572il.fsf@anholt.net> <75063f31-e26d-54a8-ebc7-409b3978560d@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1958995309==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id D643D6E565 for ; Tue, 3 Apr 2018 23:08:45 +0000 (UTC) In-Reply-To: <75063f31-e26d-54a8-ebc7-409b3978560d@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Christian =?utf-8?Q?K=C3=B6nig?= , dri-devel@lists.freedesktop.org Cc: Alex Deucher List-Id: dri-devel@lists.freedesktop.org --===============1958995309== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Christian K=C3=B6nig 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=20 > your MMU problem is dependency handling. See the "dependency" callback=20 > of the backend operations. > > With this callback the driver can return dma_fences which need to signal= =20 > (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=20 > binning step anyway. So when you return this fence from the binning step= =20 > as dependency for your rendering step the scheduler does exactly what=20 > 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlrECXkACgkQtdYpNtH8 nugSXRAAhVkiO5Rhd6Yl78osZ4x6payB8K2S9uMESux0rc3fQXMoAe6VmuYKeHEH hBjY2I1Q3rlOSsid7WOzcwLhsCHEL28wAa+aXg6hMT8KJ9eXcVX1QEeDND/WRCbV c2zFK4rCJnBna5GsNEejHQ2IY4SaxnGFExSfe8bFmuWXmLgQhr8dJOdxOE0pC7X6 /F26jM0zwbgQPCUWswjrQj8tdpTaF10pXEoF3OJ9Oz5hD5x2cAOLDxWR4V0tOZm9 aO8aK+0Ox+m/VxtoVF0AQjNBYY0KS8gKGMKhE4zwFlHKRFUR/YUuOZR4SfL4ZnbS rAi8wX9489hXyHXiQiDN/ej24+rpDDEfIKRHUdzDde5S3PQAYUhSSGohxjGP+8k2 pvXVrN4i5j0N7gqs0ZshPyuxLjijrUlrzLRjY+Qq4rUcXRm4YYT8QW3pF6empQFy PVPFLCrkeBbaiHUuAmB4oGO/M7hBKi9k7wGibKCAl6mQhN5udTPC2SRc25wtyWKZ aOMKkXxwvN629kmFh3UwlgnxqThfOWSgbn56Kq0Hm/K39PzB5hDkp7idTBOM5ofy Sbc5HKLaIwQ7tDD4baozl1BpDikd6WruVyeaUsdkT7VCrwpAz/9mn77NKA0WdS1r 7hBanqgy4/s1I82aqaD9wZyHi4g2FNwF3FKIvkWbD4Hxgp5ohgo= =8gAC -----END PGP SIGNATURE----- --=-=-=-- --===============1958995309== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1958995309==--