Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp929936ima; Wed, 6 Feb 2019 10:39:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IYZIbH7owigS5jXWKcwAP0N/3E02YffxwbD9Su4HHMrOUt4qnEsqGmr/9VC/fguyYOMW2Sm X-Received: by 2002:a62:5c1:: with SMTP id 184mr11784810pff.165.1549478354509; Wed, 06 Feb 2019 10:39:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549478354; cv=none; d=google.com; s=arc-20160816; b=lKkTbEf6OViBOMgWBMxLE1FbQT93nukuEszoMEyVX/KEzdojxhs2+H5xSPolGPW7hN uW/eCtwRRlWC/kL+W1ubJcCyky/XHG/OJXUDVLqN/+y5vT3dEfC9OAf/qeuQuxYQbDgZ 975zsuitJ8pmY0it8294ZAd5LKCuOg5TUawqP4Jr70kNokPnLeeN9ZNJIX/JTi7fU1q/ jTkjiU2ML/V4/O+x3LhdfIbfKY/tC64Fh+O+IlAFIbojkv+dp1PeGfoPzk6nZMUzRMmm 1odxlJiqBtjofEUQSSRPhC5gCwZbCeNYQsUWQ/eGiGQ69p4kjX8+M2gWgTqJJGAKBgjO mwwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dkim-signature; bh=MbFwoMgUhiXyNtpcCvwACbIJvZ6c0BECx7NE8js6t78=; b=zTUewo5W9svJP46rAOLyCchfWFHhmdnvcuVXyUbAz2JnGSlKY8CxFKIQL5y3YUCmhk kS+vivTMEvLhepn+kqA1+1vQmaC+kwk88woLxK6HH70miIfGHteWengsIL9PIV7YPOi/ C0hyAom4Z/wFJHPaJ3v/yCFzsCr0O2fIHsQyHitI0qXE/UL9Ma4+f+h0SIUwZ2tUEfjE 0foJd7Ic3OIPZrF2JcED3EzAxA+72Ay6Zgm+PABOUYL/tssKJtAX5KbaeBmM/pc44B7n VwRMCaNl7Suj25t3bLwbhZ+nxf8AQFtRJ9PsMO7jC54XmIDihTdL/tYD+gX22qcplh0W EABw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H1XRxbRw; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si6276807pgj.199.2019.02.06.10.38.58; Wed, 06 Feb 2019 10:39:14 -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=@gmail.com header.s=20161025 header.b=H1XRxbRw; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbfBFSio (ORCPT + 99 others); Wed, 6 Feb 2019 13:38:44 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41187 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbfBFSin (ORCPT ); Wed, 6 Feb 2019 13:38:43 -0500 Received: by mail-wr1-f67.google.com with SMTP id x10so8727851wrs.8 for ; Wed, 06 Feb 2019 10:38:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=MbFwoMgUhiXyNtpcCvwACbIJvZ6c0BECx7NE8js6t78=; b=H1XRxbRwgKVCQ9Ljq7xEvqlKpI9UNcQiipOfDNSMhGASAcMrPpX4Rhm1Uc4kbpT5nw VzjWXdaPNmf+BLQukVHJ6+qlL/K3fv292cTnwDAebRxC7HSdrwt50bPhnZN2YRlquMTV vzU9tGj44JzCdu1G16BNdAYawMGb1oaw1PIj4K+OyJADV3iDYbxfV3fbyW0Zk2jByITh ZRVoQ9O+tArQeKIHy0OR2q4VcdwUfW6rR9Ib9klteFLMduJTWlwpkm0ViogBaHVYjxzT vCDwYFNCCM9WsrvNbfZSxdOCqKgg3jpN8xPC1J2mPVu5a/2IrvrkqpqDAZWlSFL88DLS PtVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=MbFwoMgUhiXyNtpcCvwACbIJvZ6c0BECx7NE8js6t78=; b=gLRD3uCyWSGIB/lrBHTEyVLPvM+NJnPzKLrp1RAbHznmlCiWrNzpOavbjl1Azt9PwQ VPYld+snrZnPsGQjrLnAj7i0+ODFt0TjdOzaYQ9JEcyzh5STUeXQIQWYt4vivHA7LCdr u2shsljCHc91OgPnGInEaZ06hYAAwgsmS/loHIwvCn64FpTOq/ajxtM7/XA9ODBoVTuk jWrDfrdtJqVUWMt3LGnqTmzM/8Q65bLLstJWthcHLk7bx9UF8546wxE4M38+K4Lvp1tc 6GPwMP9xHNz1UuSIlrKbRgDHdh8xKVyCBYYaDx9woR/nKreJ9wCS7L9mqiBofJyJlkoJ bZuA== X-Gm-Message-State: AHQUAuYYG1N+A2uPi68yQZ8q7fIaZVImmbMyzzEELTtOxuiAOIKG8pLl +fa2WMmm/4BRN9nZUu6bwqM= X-Received: by 2002:adf:f9cb:: with SMTP id w11mr8863806wrr.201.1549478321369; Wed, 06 Feb 2019 10:38:41 -0800 (PST) Received: from ?IPv6:2a02:908:1252:fb60:be8a:bd56:1f94:86e7? ([2a02:908:1252:fb60:be8a:bd56:1f94:86e7]) by smtp.gmail.com with ESMTPSA id t12sm9151887wra.63.2019.02.06.10.38.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Feb 2019 10:38:40 -0800 (PST) Reply-To: christian.koenig@amd.com Subject: Re: [PATCH] drm: enable uncached DMA optimization for ARM and arm64 To: Ard Biesheuvel , "Koenig, Christian" Cc: Will Deacon , Carsten Haitzler , Maxime Ripard , Michael Ellerman , David Airlie , "Daenzer, Michel" , "linux-kernel@vger.kernel.org" , dri-devel , Christoph Hellwig , "Zhang, Jerry" , "Huang, Ray" , amd-gfx list , Alex Deucher , "Deucher, Alexander" , Sean Paul , "linux-arm-kernel@lists.infradead.org" , Robin Murphy References: <20190124120658.30288-1-ard.biesheuvel@linaro.org> <3cca35a9-c71c-a100-b29d-31ba0d1d10b1@amd.com> <961e758d-b0a0-8f6c-a8fa-c3047e058706@gmail.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: Date: Wed, 6 Feb 2019 19:38:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 06.02.19 um 18:23 schrieb Ard Biesheuvel: > On Fri, 25 Jan 2019 at 11:35, Ard Biesheuvel wrote: >> On Fri, 25 Jan 2019 at 12:30, Christian König >> wrote: >>> Am 25.01.19 um 09:43 schrieb Ard Biesheuvel: >>>> On Thu, 24 Jan 2019 at 15:01, Alex Deucher wrote: >>>>> 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 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önig >>>>>>> . >>>>>>> >>>>> 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. > Hi Christian, > > Are you still planning to merge this for v5.1? My bad, only pushed this to our internal branch, but forgot out drm-misc-next. Fixed now, thanks for the reminder. Christian. > > Thanks, > Ard. > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx