Received: by 2002:ab3:5012:0:b0:1d7:b7fe:f8b7 with SMTP id y18csp3090487ltb; Tue, 9 Aug 2022 12:28:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR53pjnyrSGJW/7dsXdvv+RbsHbmJ7yDeRu74EGrScKKgAx9L65d98l+DdMH2mCfgtKMJecz X-Received: by 2002:a65:57c8:0:b0:41c:fa29:ae1d with SMTP id q8-20020a6557c8000000b0041cfa29ae1dmr19219727pgr.136.1660073321606; Tue, 09 Aug 2022 12:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660073321; cv=none; d=google.com; s=arc-20160816; b=RiWoCOxOKM27xPVF9QZBel2ZTXdUuC97rGbsrNOyQ40LkbdBR5aztZ+HiN0FHb51mW t2Lty+Shup4vMvpu0SFRREvymeg2fSRMUath5ORozXJ73936zhm6Uv/kahDFmBH1I6rw wpXKCZGdsY83QRNZM/apk4tgxXAHrmbFhRxOB9TsiSOquCaodSSdQRqvh/7bitw99kkj V5teyTsPfYUopgXeoYjThrVuwbHaiTZnBKTL5BA33EP5byLvqd4IO9y3cwBwHolSsZj4 cjEAFyItZ2mAK+EAyvOHnfBxlT89MtlMFYgW/2bqj6qqwueIr+lVZdpudz2SQ51PZauo +j5g== 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=3+lSoCqab734YB3WBThOsb6GzU6679ySZzgkur7CoSw=; b=leSzUiIXWtSkimjisKSAMhAGojSpCmk1tGbOHpZziptVQQ9FgXi6zZepKMlOBtBPgM 0fCaUl8CoL3SuSLlNra+1sof8j399llxg3bNu+VeiK9a6rXclTbEtxOz1mBLMy1dsrZX sYv6TFqNvZocnnB0BwXhNPRBCClLgUT2lsKybAUdk2xGWS0PQF0JlNX8Dij0eYHS94bm vrJkaOrfZtL1y6lkLlMP0AAwh2yGUiMRm4jjx8QqJuDztUJhQqWMF926zgAyFYETI1R1 gz9vNjMK7F2JotY4wNaNmvqSDXIdQ6ipisogxWd5iCocb9R4wm6RXB+JQtfFdW0kbQch LTnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a17090ac00600b001dc7b989160si1301146pjt.130.2022.08.09.12.28.28; Tue, 09 Aug 2022 12:28:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345513AbiHITHq (ORCPT + 99 others); Tue, 9 Aug 2022 15:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348377AbiHITGs (ORCPT ); Tue, 9 Aug 2022 15:06:48 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6684286E3 for ; Tue, 9 Aug 2022 11:52:01 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id F0ABB68AA6; Tue, 9 Aug 2022 20:51:57 +0200 (CEST) Date: Tue, 9 Aug 2022 20:51:57 +0200 From: "hch@lst.de" To: "Hellstrom, Thomas" Cc: "daniel@ffwll.ch" , "joonas.lahtinen@linux.intel.com" , "Vivi, Rodrigo" , "bob.beckett@collabora.com" , "tvrtko.ursulin@linux.intel.com" , "jani.nikula@linux.intel.com" , "airlied@linux.ie" , "hch@lst.de" , "Ursulin, Tvrtko" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "kernel@collabora.com" , "Auld, Matthew" , "intel-gfx@lists.freedesktop.org" Subject: Re: [PATCH v5] drm/i915: stop using swiotlb Message-ID: <20220809185157.GA15307@lst.de> References: <20220726153935.2272777-1-bob.beckett@collabora.com> <1160a7c31084ab2259088e4bfe88b41ad61c2bcc.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1160a7c31084ab2259088e4bfe88b41ad61c2bcc.camel@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 08, 2022 at 03:48:02PM +0000, Hellstrom, Thomas wrote: > This whole thing looks a bit strange to me since with SWIOTLB actually > used for i915, the driver should malfunction anyway as it doesn't do > any dma_sync_sg_for_cpu() or dma_sync_sg_for_device(), Yeah, I can't actually see any syncs in i915. > and the driver > assumes all coherent dma. Is that SWIOTLB=force kernel option still > available? Yes, although it is (and always has been) lower case swiotlb for the option. > Also, correct me if I'm wrong, but the original driver segment size > appears to mean "the largest contiguous area that can be handled either > by the device or the dma mapping layer" rather than the total space > available for dma mappings? Not completely sure what > dma_max_mapping_size() is returning, though? dma_max_mapping_size is sort of both. It is is the largest contigous size, but we really should not go above that to avoid starvation.