From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Subject: Re: [RFC] Host1x/TegraDRM UAPI (sync points) Date: Mon, 29 Jun 2020 22:33:23 +0300 Message-ID: <8e78c18a-59da-a72f-e04a-ef6c23a49830@gmail.com> References: <9b06b7ec-f952-2561-7afb-5653514cd5d3@kapsi.fi> <5b1edaad-ba36-7b0f-5b02-457ae5b6d91e@gmail.com> <62859775-514c-2941-75ed-6905e9282a6f@kapsi.fi> <623c1eaa-31fb-8dff-f6c0-d8cd0be60070@gmail.com> <827c92a6-7fed-a81c-ba8e-6c69416c4ab9@kapsi.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <827c92a6-7fed-a81c-ba8e-6c69416c4ab9-/1wQRMveznE@public.gmane.org> Content-Language: en-US Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mikko Perttunen , Thierry Reding , Jon Hunter , David Airlie , Daniel Vetter , sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , dri-devel , talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, bhuntsman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, Erik Faye-Lund List-Id: linux-tegra@vger.kernel.org 29.06.2020 13:27, Mikko Perttunen пишет: ... >>>> 3. Sync points should be properly refcounted. Job's sync points >>>> shouldn't be re-used while job is alive. >>>> >>>> 4. The job's sync point can't be re-used after job's submission (UAPI >>>> constraint!). Userspace must free sync point and allocate a new one for >>>> the next job submission. And now we: >>>> >>>>     - Know that job's sync point is always in a healthy state! >>>> >>>>     - We're not limited by a number of physically available hardware >>>> sync >>>> points! Allocation should block until free sync point is available. It also occurred to me that if allocation is blocking and if there is a need to allocate multiple sync points for a job, then the IOCTL should be able to allocate multiple sync points at once. This will prevent interlock situation where two context could block on each other.