Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp355243imu; Fri, 25 Jan 2019 03:36:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Mf2qHBYfg93pQVY+qXhZXy2cgsMV8TRaQdzzptysTys2L3XmEnQT1j/CEG2Xo78Jj3MGK X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr10143436plq.275.1548416186365; Fri, 25 Jan 2019 03:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548416186; cv=none; d=google.com; s=arc-20160816; b=Btl/QFmr103/t3aCMugy/lOXV10vk2VNGX3XltlP0toYYYVwB8xFCedHXD6QMTB6et ZDLK3udyzztMSNdUyERs64rgwIrycXz27X5K8GEnBVmyC86FhScxereWM3a1FqYyOybm XRbV3K7f6qYSm64mTt6um84F69fVeayR81yRanDzlgkd0dLs7Vm3yo9AJyLkrGDfdtto w8EEE0GCj17YTSlzTufONkWpx5ImXbdLYEtjP35RSFAlBT0HjFiVGVxG+b7RbqJG+R08 muNS5P22XA1+8LPbPG6ZjgBjndrMiPbS9YvpHQzDnA45PNVhBDe+Qoxfsmq0K+xR0B04 /IGg== 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=nn+Y4BDli85gEwW52CB+Hh6jofOIMP62VBfWfG1RY9g=; b=N499kKgtjYTMSFKI++01jFq38l2cAB1LR/k59mvYj2FEQin+QDxYh1d0W8VPFAxqKI DbvJ+Q2fbh7oXku69NhiKja+f0WA5diiR0BLgAJM0RJNmYvh6ewwVMNI+4IIb44zG1le AjDpR3m5apIi8xqyQXVgtZZxMd6XSgZAHurVf99Ogm9adrXgXnUOFYP/FQw5IwAeh1fk FvdH3rst4S93ABJYtOW9CiLurHI5/Ive28ZEpCN00h8lCcF235BA9GwZMT0js5HDY2RC cNAKIHFnYbk265MXVlhcpAcf+DoDFa0ek8HlPL0ZMJ09RDtrFF4sRG8Pwv2xNiib+/MQ /Yaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emJ9u6a1; 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 b13si4373793pgw.472.2019.01.25.03.36.09; Fri, 25 Jan 2019 03:36:26 -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=emJ9u6a1; 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 S1727043AbfAYLf1 (ORCPT + 99 others); Fri, 25 Jan 2019 06:35:27 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:34606 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbfAYLf1 (ORCPT ); Fri, 25 Jan 2019 06:35:27 -0500 Received: by mail-io1-f67.google.com with SMTP id b16so7506464ior.1 for ; Fri, 25 Jan 2019 03:35: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=nn+Y4BDli85gEwW52CB+Hh6jofOIMP62VBfWfG1RY9g=; b=emJ9u6a13A1rLyU0WB9Ua7welEclT08Ok0zJAa5ovpuR4OGeA9w+klGPXVUpRilk9e jIYOle+39wjrJ2PJ37FRtNBb4IAy0USytvFjJiCApRje4XXsXePBbR6Q1pRIIPH/pHbB 5110GDt00gVgX9gBRsSdpZvNKYp7owFOJLGl4= 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=nn+Y4BDli85gEwW52CB+Hh6jofOIMP62VBfWfG1RY9g=; b=HG3h9bnPMdzVOu0mVUxN2VA4bKI8HoSIUA2gzXWA4VIYpj/qwBVNxOEj/ucxrZ3NTT WiPaJXtKQquxfTd3LuHE3wOuSS2zltcOdRhp9vgYjdpeHqJoch/XE3blIRJN/mdpJ81d kdRMjamwo47/glAuvQOsoXeC6YJeC7bf1vjOQ9gbdm6dQUefauZO2VzIKYv7nC8HccOR jIDfNIRbIKEnuoTIs+AhBCFTyEE4Ocngb72DE0BdDZmbMlt/gWCpTAbIvbxRCnyNcRMN 0T3xuPwHIeqbIiMXVqkQRx8segkE6rJi/CLdIV57zTnxHbLqK7A41fzkWUQZO5AkULAQ i1uA== X-Gm-Message-State: AHQUAuaoK2MLORwU3ZH13jxhU32TFHBFcksQKHEmpoBOvuHyp8W8y26T p6wqmej1f4Rdwdq7aljd3QvQ5HfS5Xav545jxOAffA== X-Received: by 2002:a5e:c206:: with SMTP id v6mr1776787iop.60.1548416126221; Fri, 25 Jan 2019 03:35:26 -0800 (PST) MIME-Version: 1.0 References: <20190124120658.30288-1-ard.biesheuvel@linaro.org> <3cca35a9-c71c-a100-b29d-31ba0d1d10b1@amd.com> <961e758d-b0a0-8f6c-a8fa-c3047e058706@gmail.com> In-Reply-To: <961e758d-b0a0-8f6c-a8fa-c3047e058706@gmail.com> From: Ard Biesheuvel Date: Fri, 25 Jan 2019 12:35:15 +0100 Message-ID: Subject: Re: [PATCH] drm: enable uncached DMA optimization for ARM and arm64 To: "Koenig, Christian" Cc: Alex Deucher , "Daenzer, Michel" , Carsten Haitzler , Maxime Ripard , "linux-kernel@vger.kernel.org" , dri-devel , "Zhang, Jerry" , Christoph Hellwig , David Airlie , "Huang, Ray" , amd-gfx list , Michael Ellerman , Will Deacon , "Deucher, Alexander" , Sean Paul , "linux-arm-kernel@lists.infradead.org" , Robin Murphy 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 Fri, 25 Jan 2019 at 12:30, Christian K=C3=B6nig wrote: > > Am 25.01.19 um 09:43 schrieb Ard Biesheuvel: > > On Thu, 24 Jan 2019 at 15:01, Alex Deucher wrot= e: > >> On Thu, Jan 24, 2019 at 9:00 AM Ard Biesheuvel > >> wrote: > >>> 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 device= s > >>>>> only, but permits an optimization to be enabled in some cases, wher= e > >>>>> 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 implementati= on > >>>>> of the PCIe NoSnoop TLP attribute by the platform, otherwise the GP= U > >>>>> will use cached mappings nonetheless. On x86 platforms, this does n= ot > >>>>> seem to matter, as uncached CPU mappings will snoop the caches in a= ny > >>>>> case. However, on ARM and arm64, enabling this optimization on a > >>>>> platform where NoSnoop is ignored results in loss of coherency, whi= ch > >>>>> 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 > >>>> . > >>>> > >> Same: > >> Reviewed-by: Alex Deucher > >> > > Thanks all > > > > Should I resend the patch with the subject corrected? > > I will update the subject line and push it upstream through > drm-misc-next if nobody objects. > Wonderful, thanks.