Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1970042pxb; Sat, 14 Nov 2020 08:25:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJ8vF9rGqys9FSCiRUXbamh6m3A9h8yllxNeKoQlx02jnbczwqrF7o3I6SMTtHIfPCVnG0 X-Received: by 2002:a17:906:1352:: with SMTP id x18mr7011068ejb.476.1605371114529; Sat, 14 Nov 2020 08:25:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605371114; cv=none; d=google.com; s=arc-20160816; b=K27ywEzsYDP8qbM1gq414lqDV6LZY4bI7gudEgUTBOG2Jbba1Ny1ytehMCQSrxrelm QXjauzmzrNyBR9v2PRDnWmWnK+rnJcell7z54k+NLwR+iYcJlBhzQ/7DzkCyfqNCz0of P7Rd3T1dxaX14CK/byLTnkRYz3LRJGndOXI0RRROVQZndQ7ymnk0M0SogfIuUnsAFBD8 Dol++GpuBO9ASvVPYWniv+/nfZupsCyIV+05L/KyCygxY0KgaNNnz5k6LrEfCw/lSKrT wF963jBcn2/h/sPBha7VNcfK+6xw6MZyQZWOEPW/JLtXnnvdMb9cHdGB2jcveCo9MkFZ 5GLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=b3fCq3DImRh7QdlWU42ISRk5NECmd4f7oqmC1/eNo/0=; b=VzhHq/mXNA+LnBqolvBvuHoAMYcbKOrct13dUpx1Zicjqo1QljjiYT5t2o+robfLHO lK/6vrXp61S3Z4QKJYT37m6Ym6tYnf9HVFRBNmR4rrkeyvtV2cIQKhON59w7CoZFNv9l tmSH5taSJtyiAUujViwYqCq2gnYdKtzlquHIyBYYOOvuVl4Dmb41JcSNccg3L1MvhFvk YM4mM/knujOzdKrKeOIs+jnyPJRObhm5RrChtVm4h35rx+ZMI27Ht8TYETIa4dh2/KBz es118XLKfWRQoLA3c1R8ZuAX/ndhSSRT/S5hk0kNXKWDxhvC2kpcIRUBgFeAfu0lPig/ +2Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si8454161edf.417.2020.11.14.08.24.52; Sat, 14 Nov 2020 08:25:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727120AbgKNQWC (ORCPT + 99 others); Sat, 14 Nov 2020 11:22:02 -0500 Received: from verein.lst.de ([213.95.11.211]:50548 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbgKNQWB (ORCPT ); Sat, 14 Nov 2020 11:22:01 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id B112867373; Sat, 14 Nov 2020 17:21:59 +0100 (CET) Date: Sat, 14 Nov 2020 17:21:59 +0100 From: Christoph Hellwig To: Jonathan Marek Cc: freedreno@lists.freedesktop.org, hch@lst.de, Rob Clark , Sean Paul , David Airlie , Daniel Vetter , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , open list Subject: Re: [RESEND PATCH v2 3/5] drm/msm: call dma_direct_bypass() Message-ID: <20201114162159.GB24411@lst.de> References: <20201114151717.5369-1-jonathan@marek.ca> <20201114151717.5369-4-jonathan@marek.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201114151717.5369-4-jonathan@marek.ca> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 14, 2020 at 10:17:11AM -0500, Jonathan Marek wrote: > Always use direct dma ops and no swiotlb. > > Note: arm-smmu-qcom already avoids creating iommu dma ops, but not > everything uses arm-smmu-qcom and this also sets the dma mask. > > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/Kconfig | 1 + > drivers/gpu/drm/msm/msm_drv.c | 8 +++++--- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig > index e5816b498494..07c50405970a 100644 > --- a/drivers/gpu/drm/msm/Kconfig > +++ b/drivers/gpu/drm/msm/Kconfig > @@ -20,6 +20,7 @@ config DRM_MSM > select SND_SOC_HDMI_CODEC if SND_SOC > select SYNC_FILE > select PM_OPP > + select DMA_OPS_BYPASS > help > DRM/KMS driver for MSM/snapdragon. > > diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c > index 49685571dc0e..bae48afca82e 100644 > --- a/drivers/gpu/drm/msm/msm_drv.c > +++ b/drivers/gpu/drm/msm/msm_drv.c > @@ -6,6 +6,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -1288,10 +1289,11 @@ static int msm_pdev_probe(struct platform_device *pdev) > if (ret) > goto fail; > > - /* on all devices that I am aware of, iommu's which can map > - * any address the cpu can see are used: > + /* always use direct dma ops and no swiotlb Again, and implementation detail. Comments should not explain details obvious from the code (especially layers away) but the intent.