Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5475387ybl; Tue, 14 Jan 2020 09:31:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwcOrJeQN90T1kJmFw5wQdMaFewuDxa4NIilYEUsk8xOSzeJjnn1k85rPheIyeTirlmFVLI X-Received: by 2002:a05:6830:154c:: with SMTP id l12mr17851215otp.275.1579023094883; Tue, 14 Jan 2020 09:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579023094; cv=none; d=google.com; s=arc-20160816; b=jDJDAl9FDJy8R744fczfXXb4mkZQ8JgNOoZDpWdkQY/nYe69A4Qi1rnbsQYfbfpYNI Kjujwd601la4IYDJXHPckNx4+fMSG5/7p66QO4n/u0ztII/KTnZuUmRHPbgexpWFGPNo NGc05fOuez5L1kujcF+fAOC14gZAbKsPNLm14s9HHIXJUXiK+w6HImHTMZXdefm/4Kj0 WdlMZZ1VbUUowpxC9EO8IJCzqESRg27lE9FvKnXHXr64njic7Z+7/mIvp07vn5/hnct6 yIZlrBMfq3YknfLGWJU3yPgLJeLXFQ3LCkg6C0GB3qO9d2Zpu1UEfescVlSjmnPOjQrb FgwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=08Szw5rYnIOLShLCG3gwbLPH4sjtaB7lisEPfvsjIZY=; b=cn2yeP4CSSnl7FzW9uFZyV1S4sf65V0idypPJCX3sYndS0mQ+BG3/jWYPV0BIYuHow p6quKH1VSXVF3QczgLKO4DRziRHk8t6nVvMVB560htvmipA+wPOJyNYv/2voW8vT5Krs garWOZSjMWlIZwgzKg7YmR/qRT4G6TwSrU5IfhoP+OCMqFvzSEMQsV8toWGEYZGuoF8w 9EAwqrqGsd23wNi01RRMipd7QX+flUHYEt/g4ow11jAnQqm93+R8CnHs77g+mPGXNTJb 7Xp7IeFBkB02Fcy3V9iBQSQYq1TYr4cLEvovYXJ62o0F+7UbxJetNKeSiOZ3n5hx/2pt FgCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LnbKflAs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si7677192oin.93.2020.01.14.09.31.23; Tue, 14 Jan 2020 09:31:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LnbKflAs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728794AbgANRaN (ORCPT + 99 others); Tue, 14 Jan 2020 12:30:13 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:41386 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728516AbgANRaN (ORCPT ); Tue, 14 Jan 2020 12:30:13 -0500 Received: by mail-ua1-f66.google.com with SMTP id f7so5116929uaa.8 for ; Tue, 14 Jan 2020 09:30:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=08Szw5rYnIOLShLCG3gwbLPH4sjtaB7lisEPfvsjIZY=; b=LnbKflAscr1aUly+5WmN1eTnDSd4zt+Zd8UQCGHbkHm+nM2N5IIqWO4+/Een5M7jPM DyV2DCDIffyeoT6z3Txamx03jePku6m6flVc/UGCYaN2ZMpIPOGS6xQjmA1Wg+ep/KjC mJtufklgX42r0nEj5CCyYom8QmILBecLtonzgHa5DjXNTtWtk4McRaKE9QtElWd1LIc2 mWb67uny0umZAbK4iGqhCLy+rFcZfCMpNENzoxKTWFNXQo5sy9lEhW48XfdY3NdS6GTF 1Ia7vyt5yOIUkZgxal/imNBERl7A8o1njV2/Y51Bs3caiyftIfojJGdBgkTAuSdHFH/h LrEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=08Szw5rYnIOLShLCG3gwbLPH4sjtaB7lisEPfvsjIZY=; b=RchLNy4Fup2VSLIpkhbdBU9+7YazyYu7VnqPGHQ2bY5n09nwfvxJslKR9797yG8NtQ x67slSwYT+Rus0uSGSyyiZjTuJvTciDUfhKI3AdfqmHBXaNgDZHHovZM0lD3VUqSf9gG sJMOzOnjlDbhp3Uyf7X0/XHpWatoTLPxZIVTKuvD97OuqDGEp+nZ0NOkXnW3n/nPx6Xh s4RXlJxcstn4/BiGjXj84jBjk/wYDVQS7QmoTAfeeK8Ixr6wMzjCdLuCBVYL7++EoSRJ qcNADOi05gxN9XcdJsb/a1EL/lbPAZwlWKImHIxO9QPppfY+nvr1wyBkSG1+ZhprKrRO MBDg== X-Gm-Message-State: APjAAAXjjTSyj7LrE/vywAIp3IfM8T22EjCaN0lElr1sFus+yM+tWgaz cnX9DeGNtfvAZFBs6Chc3rjmDP9XQl9R352cu4A3cA== X-Received: by 2002:ab0:2a0c:: with SMTP id o12mr11322534uar.72.1579023011862; Tue, 14 Jan 2020 09:30:11 -0800 (PST) MIME-Version: 1.0 References: <20200113153605.52350-1-brian@brkho.com> <20200113153605.52350-3-brian@brkho.com> <20200113175148.GC26711@jcrouse1-lnx.qualcomm.com> <20200114172319.GA2371@jcrouse1-lnx.qualcomm.com> In-Reply-To: <20200114172319.GA2371@jcrouse1-lnx.qualcomm.com> From: Kristian Kristensen Date: Tue, 14 Jan 2020 09:30:00 -0800 Message-ID: Subject: Re: [Freedreno] [PATCH 2/2] drm/msm: Add MSM_WAIT_IOVA ioctl To: Rob Clark , Brian Ho , freedreno , David Airlie , "open list:DRM DRIVER FOR MSM ADRENO GPU" , open list , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Rob Clark , Daniel Vetter , Kristian Kristensen , Sean Paul Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 14, 2020 at 9:23 AM Jordan Crouse wrote: > > On Tue, Jan 14, 2020 at 08:52:43AM -0800, Rob Clark wrote: > > On Mon, Jan 13, 2020 at 9:51 AM Jordan Crouse wrote: > > > > > > On Mon, Jan 13, 2020 at 10:36:05AM -0500, Brian Ho wrote: > > > > + > > > > + vaddr = base_vaddr + args->offset; > > > > + > > > > + /* Assumes WC mapping */ > > > > + ret = wait_event_interruptible_timeout( > > > > + gpu->event, *vaddr >= args->value, remaining_jiffies); > > > > > > I feel like a barrier might be needed before checking *vaddr just in case you > > > get the interrupt and wake up the queue before the write posts from the > > > hardware. > > > > > > > if the gpu is doing posted (or cached) writes, I don't think there is > > even a CPU side barrier primitive that could wait for that? I think > > we rely on the GPU not interrupting the CPU until the write is posted > > Once the GPU puts the write on the bus then it is up to the whims of the CPU > architecture. If the writes are being done out of order you run a chance of > firing the interrupt and making it all the way to your handler before the writes > catch up. > > Since you are scheduling and doing a bunch of things in between you probably > don't need to worry but if you start missing events and you don't know why then > this could be why. A rmb() would give you piece of mind at the cost of being > Yet Another Barrier (TM). Doesn't the fence case do the same thing without a barrier? > Jordan > > > BR, > > -R > > _______________________________________________ > > Freedreno mailing list > > Freedreno@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/freedreno > > -- > The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > a Linux Foundation Collaborative Project