Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1517140

Re: [PATCH v7 0/3] drm: add explict fencing

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH v7 0/3] drm: add explict fencing
Date Tue, 08 Nov 2016 13:50:02 +0100
Message-ID <sBe0G-Zj-29@gated-at.bofh.it> (permalink)
References <sB8xX-5U7-7@gated-at.bofh.it> <sBcid-8hA-5@gated-at.bofh.it> <sBcUW-iC-5@gated-at.bofh.it> <sBd4C-lV-9@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aP//G56EY+bGmxe+pjYhA+9OQJg8ezREakrggL5Ru7A=; b=d8tR2ZSs7io7nZLhp4hZLpwHlSioTGv9t8tFZkuWJm9M3Ufbv4l2GhWaGU+mmrir7/ VZuSAdIUS0igAH6ox43TxVPtid1jFQtB91nNXvRFBI63llG+QOA6wUODpPrLevCWLe1k RFo8+CmD+tejKACZ9IEZ5vE8iIZNxsVcc9/yE=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=aP//G56EY+bGmxe+pjYhA+9OQJg8ezREakrggL5Ru7A=; b=Lqa3r7Uw7KnLl2fMjQ8UBLv0TH+SBrNhBhp8dtzGhrZ9CylP4tyqxANX7hgPb1KsFx IdSz1nhGF53Y3A8Ha40xLdJYQIFADmNEnzkcSFom3mSuVyh6K/DpkYKiG6mpQ4XnYyUS dgTjHhHhNJNWyhTOWeBHyMAo8liMAVI/xOVCfh5JSmNx3bE4iNcXX2lEianm+siiRv7X u1e/E4RHzaRmNqzVyK3LjZ7szrmc69gfFRmuhNztxlO6nRY0hb52bWTxSWU1jFqufGL1 OBsDF/Ahr0zNDGG+9RrAnDcNpvnY/Iwb8nTgdy9iAOIwkntgcfl6s9wk6CGx11uHVpT9 6jBw==
X-Gm-Message-State ABUngvcmdW1BEiMHLhWRSxb09CvClCyPxzhEXb+caf9u+uQ5DXKiIhqyFceDo3+ORxilDQ==
X-Received by 10.28.28.206 with SMTP id c197mr11806432wmc.36.1478609023748; Tue, 08 Nov 2016 04:43:43 -0800 (PST)
Mail-Followup-To Chris Wilson <chris@chris-wilson.co.uk>, Gustavo Padovan <gustavo@padovan.org>, dri-devel@lists.freedesktop.org, marcheu@google.com, Daniel Stone <daniels@collabora.com>, seanpaul@google.com, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, Gustavo Padovan <gustavo.padovan@collabora.co.uk>, John Harrison <John.C.Harrison@Intel.com>, m.chehab@samsung.com
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-Operating-System Linux phenom 4.6.0-1-amd64
User-Agent NeoMutt/20161014 (1.7.1)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 50
Organization linux.* mail to news gateway
X-Original-Date Tue, 8 Nov 2016 13:43:40 +0100
X-Original-Message-ID <20161108124340.de4gqcuhkwn3uq2u@phenom.ffwll.local>
X-Original-References <1478588090-8664-1-git-send-email-gustavo@padovan.org> <20161108103508.GH18604@nuc-i3427.alporthouse.com> <20161108113256.q52243qihb6kwe2h@phenom.ffwll.local> <20161108114551.GL18604@nuc-i3427.alporthouse.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1517140

Show key headers only | View raw


On Tue, Nov 08, 2016 at 11:45:51AM +0000, Chris Wilson wrote:
> On Tue, Nov 08, 2016 at 12:32:56PM +0100, Daniel Vetter wrote:
> > On Tue, Nov 08, 2016 at 10:35:08AM +0000, Chris Wilson wrote:
> > > On Tue, Nov 08, 2016 at 03:54:47PM +0900, Gustavo Padovan wrote:
> > > > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > > > 
> > > > Hi,
> > > > 
> > > > This is yet another version of the DRM fences patches. Please refer
> > > > to the cover letter[1] in a previous version to check for more details.
> > > 
> > > Explicit fencing is not a superset of the implicit fences. The driver
> > > may be using implicit fences (on a reservation object) to serialise
> > > asynchronous operations wrt to each other (such as dispatching threads
> > > to flush cpu caches to memory, manipulating page tables and the like
> > > before the flip).  Since the user doesn't know about these operations,
> > > they are not included in the explicit fence they provide, at which point
> > > we can't trust their fence to the exclusion of the implicit fences...
> > 
> > My thoughts are that in atomic_check drivers just fill in the fence from
> > the reservation_object (i.e. the uapi implicit fencing part). If there's
> > any additional work that's queued up in ->prepare_fb then I guess the
> > driver needs to track that internally, but _only_ for kernel-internally
> > queued work.
> 
> That's not a trivial task to work out which of the fence contexts within
> the reservation object are required and which are to be replaced by the
> explicit fence, esp. when you have to consider external fences.

Hm, what kind of async kernel tasks are you thinking off? Atm I don't know
of anyone who does e.g. clflush through the gpu. And ttm bo placement
moves for display should be explicit enough that drivers will deal with
them correctly. At least that seems to have been the conclusion from the
long amdgpu thread.

> > The reason for that is that with explicit fencing we want to allow
> > userspace to overwrite any existing implicit fences that might hang
> > around.
> 
> I'm just suggesting the danger of that when userspace doesn't know
> everything and the current interfaces do not allow for userspace to know,
> we only tell userspace about its own action (more or less).

tools for fools, but yes userspace is expected to get this 100% right (for
any userspace-issued cs at least), and eat the fallout if it doesn't.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 0/3] drm: add explict fencing  Gustavo Padovan <gustavo@padovan.org> - 2016-11-08 08:00 +0100
  Re: [PATCH v7 0/3] drm: add explict fencing Chris Wilson <chris@chris-wilson.co.uk> - 2016-11-08 12:00 +0100
    Re: [PATCH v7 0/3] drm: add explict fencing Daniel Vetter <daniel@ffwll.ch> - 2016-11-08 12:40 +0100
      Re: [PATCH v7 0/3] drm: add explict fencing Chris Wilson <chris@chris-wilson.co.uk> - 2016-11-08 12:50 +0100
        Re: [PATCH v7 0/3] drm: add explict fencing Daniel Vetter <daniel@ffwll.ch> - 2016-11-08 13:50 +0100
          Re: [PATCH v7 0/3] drm: add explict fencing Chris Wilson <chris@chris-wilson.co.uk> - 2016-11-08 14:00 +0100
        Re: [PATCH v7 0/3] drm: add explict fencing Daniel Vetter <daniel@ffwll.ch> - 2016-11-08 14:00 +0100
  Re: [PATCH v7 0/3] drm: add explict fencing Daniel Vetter <daniel@ffwll.ch> - 2016-11-08 14:20 +0100

csiph-web