From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0907FC169C4 for ; Wed, 6 Feb 2019 18:38:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB6C22175B for ; Wed, 6 Feb 2019 18:38:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H1XRxbRw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbfBFSio (ORCPT ); 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-Google-Smtp-Source: AHgI3IbiyIjOuNw8QTjdk18aVp2glLugGCAMBpzpPvstKZLHP58L23nP4fiH/iuwPY5Xk4B5ckpFuQ== 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