Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1930633imu; Thu, 24 Jan 2019 04:33:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN47+PfRpCpH56bOf4TMIsrhA8Q+CEJ4LAhjazQrTChcieVTid7597ocUu/TtXazdh+jlXsg X-Received: by 2002:a17:902:42e4:: with SMTP id h91mr6518197pld.18.1548333191386; Thu, 24 Jan 2019 04:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548333191; cv=none; d=google.com; s=arc-20160816; b=P3eW+xbEobbLYo87kwrDEapN8+fM0YLisN6KChfp33QroPjxXqV1cyrHx5U05nCwrU IuDsSNMcy0nCTMURuH22iDvA6JM+uVD+8ik408TZPpDu+VpN3NQpxKoPFgjVdm+XY85P of9xfgQq7BgucDTERLUQV7yihfuu084B/RMpepDcy5jl08TFFOiYxPqvwueg8t4GkLm1 /rYRJa8Xzc4VbwOGGVcjmkaciLfHj2hS1vbJUu4l6I4fSlEZq1iWcH/549e8nbjzJrLW OiLyGmXbE5yk0BibM4Sdian3nHmiz0PaQAAkH6HeuQ2tLcYjkbfZjZNgg7fKItrJJKCq vOmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=F3VCMZYQHk+dES8GD4GKOvmgry3BxujfQ36g2qotYKM=; b=mCcIpu92CCzZEtoVSnRrPO+RjuPbtDDv2JcmQPKCgag+pCcuxW7MTqsKaxGYsUKPku AEKRjUFAuExEkua1ihhaiQwLP5kpORd3eSe8eYbStyB482DA0X/YouFV5OGaTs9i88OW WitBGScqc7o3AssYlwvzW2bmDZwkrMYKr2tmzlSlJAtBaWuzNJKxbG41lZBB6vFctiM6 kB/kOijPFtCSymBS2ayzyrY+eG8/u9VRapVDFxsLKWkHKc73PndM4FYYjFMS3lQWC2Uq WOC5mk6psXfHC21q80TmH4jOEL5lhsAv5Vt6X/xvmdW4HIDuRZhEsyqKdJT7pSVJzirf iUNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IkPXeLhb; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si18610195pgc.85.2019.01.24.04.32.56; Thu, 24 Jan 2019 04:33:11 -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=@linaro.org header.s=google header.b=IkPXeLhb; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbfAXMc2 (ORCPT + 99 others); Thu, 24 Jan 2019 07:32:28 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:40893 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727596AbfAXMc1 (ORCPT ); Thu, 24 Jan 2019 07:32:27 -0500 Received: by mail-it1-f196.google.com with SMTP id h193so4094236ita.5 for ; Thu, 24 Jan 2019 04:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=F3VCMZYQHk+dES8GD4GKOvmgry3BxujfQ36g2qotYKM=; b=IkPXeLhb1v9yYKDcPuLTMPUQj9ccjp3XoBOC2aHGBCMCfYCC0dV8d86WGbJdw5cd+1 E9lplTFs8WOUx58H8eY27S56/H0ij+Tvs29ymM8MDuYh7ayaZcEF0J//J67I4gNuK848 IHNOmRCQU3kIRZepoSy7DiZDrh55MyfMtNSJY= 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:cc:content-transfer-encoding; bh=F3VCMZYQHk+dES8GD4GKOvmgry3BxujfQ36g2qotYKM=; b=NMWQ1veARbwgeVx1l9BGgcEA7i1NszO7009Y9qFUxD3HKuml5Z6b5QpRHGbEBx0R4O dqnTS24kDo3ARLwko9EZegOycutfcVgw3snCmLFnaHlLpGeQqczDkpM9/qkHIsHGsnI+ nUodLIE4Tj68bf68GxVmd/0yz+VNbVmzHyA0EIpnr41pS2KjAaROH+4yKtbCG1YIn8UH kJWNIvXzRsoSVV/JGu5dUF/rVsrJFoz8PrMe2P38206E6d/wUruM8jNtiHkcFIprg0YB wYbcYayu48aWtQ/7oxySBA+PkS4k+PgDVZPcwK9SwgB6P3JmAcfEubfk0iOQL5Gni/rk c8SA== X-Gm-Message-State: AJcUukcSQgQ1t+LMoyf1d7brFrm75sl25FHHhVRkSIwBRpkQlLU32EIP yPiuZHSwSgMo+zqiajYZejmriozZaSw1D9uU2Ll5CA== X-Received: by 2002:a05:660c:4b:: with SMTP id p11mr1298530itk.71.1548333146518; Thu, 24 Jan 2019 04:32:26 -0800 (PST) MIME-Version: 1.0 References: <20190124120658.30288-1-ard.biesheuvel@linaro.org> <3cca35a9-c71c-a100-b29d-31ba0d1d10b1@amd.com> In-Reply-To: <3cca35a9-c71c-a100-b29d-31ba0d1d10b1@amd.com> From: Ard Biesheuvel Date: Thu, 24 Jan 2019 13:32:15 +0100 Message-ID: Subject: Re: [PATCH] drm: enable uncached DMA optimization for ARM and arm64 To: "Koenig, Christian" Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "Deucher, Alexander" , "Zhou, David(ChunMing)" , "Huang, Ray" , "Zhang, Jerry" , "Daenzer, Michel" , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Sean Paul , Michael Ellerman , Benjamin Herrenschmidt , Will Deacon , Christoph Hellwig , Robin Murphy , amd-gfx list , dri-devel , Carsten Haitzler Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Jan 2019 at 13:31, Koenig, Christian wrote: > > Am 24.01.19 um 13:06 schrieb Ard Biesheuvel: > > The DRM driver stack is designed to work with cache coherent devices > > only, but permits an optimization to be enabled in some cases, where > > for some buffers, both the CPU and the GPU use uncached mappings, > > removing the need for DMA snooping and allocation in the CPU caches. > > > > The use of uncached GPU mappings relies on the correct implementation > > of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU > > will use cached mappings nonetheless. On x86 platforms, this does not > > seem to matter, as uncached CPU mappings will snoop the caches in any > > case. However, on ARM and arm64, enabling this optimization on a > > platform where NoSnoop is ignored results in loss of coherency, which > > breaks correct operation of the device. Since we have no way of > > detecting whether NoSnoop works or not, just disable this > > optimization entirely for ARM and arm64. > > > > Cc: Christian Koenig > > Cc: Alex Deucher > > Cc: David Zhou > > Cc: Huang Rui > > Cc: Junwei Zhang > > Cc: Michel Daenzer > > Cc: David Airlie > > Cc: Daniel Vetter > > Cc: Maarten Lankhorst > > Cc: Maxime Ripard > > Cc: Sean Paul > > Cc: Michael Ellerman > > Cc: Benjamin Herrenschmidt > > Cc: Will Deacon > > Cc: Christoph Hellwig > > Cc: Robin Murphy > > Cc: amd-gfx list > > Cc: dri-devel > > Reported-by: Carsten Haitzler > > Signed-off-by: Ard Biesheuvel > > The subject line should probably read "disable uncached...". > Ugh, of course ... > With that fixed the patch is Reviewed-by: Christian K=C3=B6nig > . > Thanks.