Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11163957ybi; Thu, 25 Jul 2019 11:05:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlBwD/QN/HxMokfjLOBtVGnmasY3FhI321mbsxxStTukOi3y5/BDVjSVkCeah4/Ow9YH5J X-Received: by 2002:a63:c006:: with SMTP id h6mr53729422pgg.290.1564077951996; Thu, 25 Jul 2019 11:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564077951; cv=none; d=google.com; s=arc-20160816; b=tk5BoIhD1qgOq74LGa54hw8FNxk+S0sNnxNmkppboPKWItkmR3h4uQLFR1f0MpA8F0 MWkUElH0iAsdFZP3erGa007YFJjYgFcMl9lOcd8DKKuY3XoKJRRHVwhc+uKTJIF7Dwf5 CtMIyEvWLDvGPaucy+15qcYBU6YS4Lo2na9sAuFw0JMEGrCB4RlWJAenZX1jcR7J8PWo Z02suCdOqm233ywZp4jlQY0FpyWVVBYAuUwde4c1R1xSizFaSaBm51tT3iorLQDJKWiu Oxm4PzHUuW4GVVMxVC5v2zDzFoBfXFyu8AI6U7I0gExPEH3FLtaolwt1C8CacOjoXqJ2 pLBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MNkXECJCwZrlY0TNH7A1b2lGWt3otavBoyZrTznJtcA=; b=MCN0s7YQ0+/5ikBT6wny8ZPHvRq53gVoTTW7X/P0VmKJFBt1AzPRS2rcf+6Jek+J+/ a1HkhYw2owtKXM0fjH4f6MsfLtT+V7HM0P3k6LD70hq07ZKa5Xi2rpEKRrR0N/LnrEk8 6MEI24I9Q+UCzEHTkh8P6BsfV6FxBV0DZJtuiRXQRE8wBi35/AG3xI47Q+RZNvS4JYfk BjSY6Zcfy7E/aW3Zqqh/dRlTowGfOh3avxC3tK8f5zrx9UM877AFlfjQ6zK2dQBM1QVr MHtLZdOM9hFXISUIqqrzcGPHPPzJRsM6c478/e4pwEL2wp6dnGzmyaKgoxs13qojxArL YS1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jI+NycjU; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si2876132pgp.405.2019.07.25.11.05.36; Thu, 25 Jul 2019 11:05:51 -0700 (PDT) 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=@chromium.org header.s=google header.b=jI+NycjU; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389362AbfGYPmG (ORCPT + 99 others); Thu, 25 Jul 2019 11:42:06 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38685 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389265AbfGYPmF (ORCPT ); Thu, 25 Jul 2019 11:42:05 -0400 Received: by mail-ed1-f67.google.com with SMTP id r12so15846227edo.5 for ; Thu, 25 Jul 2019 08:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MNkXECJCwZrlY0TNH7A1b2lGWt3otavBoyZrTznJtcA=; b=jI+NycjUP6dxobiyu7dooewJyiMPSKnZuEAR9QAAdHorsKKv9zQty8Zi/e3mTuuwTw f+5REnTryYYRy7SGL9GubSQdxHJJASl9Ylgtuj/XQKjHnxc3LR3PA0ZTh3KESVVHAP0l b+ZmbxdwQ8OgMxYul7lgpNzEHZXSO/mmnFCbw= 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; bh=MNkXECJCwZrlY0TNH7A1b2lGWt3otavBoyZrTznJtcA=; b=sBq/WxA9IQ86NGuFc/wwKY1Le9tysCZ2ZNBWrlOnYKlFEkrdAkC0fxiPZt9OpC7q3g Xhb196ZvEChmMjxLxuvoBnlh5Fdr3renYqH1zHdjGaCpNsKf4uBYG7V0yhU4BiFhXqfn fLkzAs6a2/4pDCRf6dZuBICV5r7HtF9NOT6p+nXv+gEtaXGcKW1/xDk9PyIjGBdjiVG4 siUDhxmyTGGUjSKnvZ0c0rkngdQfD3HrspIaL6F7KzcIRy9ctbeYNe5FgBuHDIrnA8k7 zvrJzoqIp0io2wGMVggm9OqRnJANkMjVgE+/6YsIg5V9lcAzaUq60jVdTlLRGhmqcYh+ p6Iw== X-Gm-Message-State: APjAAAXf2t+ujfaNx5bK5L4cxlpSGx+k7DCdTwEO8688py9lW5Gexobh zzfOzCyTVTkDDp8PsYNoGKen6rOvxrRL5A== X-Received: by 2002:a50:c081:: with SMTP id k1mr77138843edf.19.1564069323506; Thu, 25 Jul 2019 08:42:03 -0700 (PDT) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com. [209.85.128.50]) by smtp.gmail.com with ESMTPSA id uz27sm9849717ejb.24.2019.07.25.08.42.02 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 08:42:02 -0700 (PDT) Received: by mail-wm1-f50.google.com with SMTP id f17so45152875wme.2 for ; Thu, 25 Jul 2019 08:42:02 -0700 (PDT) X-Received: by 2002:a1c:343:: with SMTP id 64mr77603832wmd.116.1564069321964; Thu, 25 Jul 2019 08:42:01 -0700 (PDT) MIME-Version: 1.0 References: <20190725141756.2518-1-ezequiel@collabora.com> <20190725141756.2518-2-ezequiel@collabora.com> <1564069001.3006.1.camel@pengutronix.de> In-Reply-To: <1564069001.3006.1.camel@pengutronix.de> From: Tomasz Figa Date: Fri, 26 Jul 2019 00:41:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/7] media: hantro: Set DMA max segment size To: Philipp Zabel Cc: Ezequiel Garcia , Linux Media Mailing List , Hans Verkuil , kernel@collabora.com, Nicolas Dufresne , "open list:ARM/Rockchip SoC..." , Heiko Stuebner , Jonas Karlman , Boris Brezillon , Paul Kocialkowski , Alexandre Courbot , fbuergisser@chromium.org, Linux Kernel Mailing List , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 12:36 AM Philipp Zabel wrote: > > On Thu, 2019-07-25 at 11:17 -0300, Ezequiel Garcia wrote: > > From: Francois Buergisser > > > > The Hantro codec is typically used in platforms with an IOMMU, > > so we need to set a proper DMA segment size. > > ... to make sure the DMA-mapping subsystem produces contiguous mappings? > > > Devices without an > > IOMMU will still fallback to default 64KiB segments. > > I don't understand this comment. The default max_seg_size may be 64 KiB, > but if we are always setting it to DMA_BUT_MASK(32), there is no falling > back. > DMA mask and segment size are two completely orthogonal parameters. Please check https://elixir.bootlin.com/linux/v5.3-rc1/source/drivers/iommu/dma-iommu.c#L740 for an example of how the latter is used. Best regards, Tomasz