Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2081605ybk; Mon, 11 May 2020 11:27:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlHWKBYIHweB5tEKGzadVaf1xnA76rikICxMjd6g6c0Os9Ju4fKgJa/axi6t/ioeor8h4C X-Received: by 2002:a17:906:dd8:: with SMTP id p24mr154949eji.93.1589221670211; Mon, 11 May 2020 11:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589221670; cv=none; d=google.com; s=arc-20160816; b=I9XYHbpgC+iu8K4otYKHKFf1PvxZ/64JCs7LnXjj4JIOD70ek5S2x+3XaKMQG1II00 Qamp0S9B+p1lgxB8pw5K9ucGSK5DcWwe5zLU7d7L4tPlUI3JEQuwB+QN26SQihCX1Py4 rUnJwIK/VoRoxzGzyu+MlMUeHhFqCenJX6hKVVxvchQ7Au32Y+rvxuhClUnQ7zI76h2A Q0/mIIRE9dTvM+V9Lvkri3zDtHXzLGl0DjYNVo+0+xDpWUVH50SALWrvBLjOcUebAHSn x+gGEROS09UWMcnJvw6XNZduUwQlZMkj03LeBa03/gZNuh934jdsvmI/xOfs2n++WNU5 5klw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=GvqkAjzaQlY5EFbuKwCVRui4asqXhwU/c+wBTMHWYg8=; b=yUA4DBwVrdnQMRGcMFKMFClyxMB8+K45SSH7vo4y8x3KKBwibme8EgTuvoxLjtGkKs vTn57gSODLR+MnKSFsF6yObhDM/2lsqly9+pG1BytwUb/xcMiXVUc7wyWS4h/4VUD3lp gjLSLUaHpcterRTKc224Zn3edoEeygn+ZWti+a6wHm8q5g2Mn+mhqKgAc+q9VvvgWhVs d1tf/7DpxDkqX7BrNzVfnztfiZB4+2/KwIxNMLWYb2OKopcgMChS0JWUfRWz9d1RjXwV qm1mxMMyGwp5imj2McTHZBoSZgNRC9fJhNW/x3f//MRxyRPE8//N9oY70bImgmELXkIH ZVug== 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 y4si6352745edv.549.2020.05.11.11.27.26; Mon, 11 May 2020 11:27:50 -0700 (PDT) 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 S1731081AbgEKSZl (ORCPT + 99 others); Mon, 11 May 2020 14:25:41 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:49720 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729678AbgEKSZl (ORCPT ); Mon, 11 May 2020 14:25:41 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id 4B329803080A; Mon, 11 May 2020 18:25:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vze97ONxmtmJ; Mon, 11 May 2020 21:25:36 +0300 (MSK) Date: Mon, 11 May 2020 21:25:35 +0300 From: Serge Semin To: Mark Brown CC: Serge Semin , Andy Shevchenko , Andy Shevchenko , Vinod Koul , Viresh Kumar , Dan Williams , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , , devicetree , dmaengine , Linux Kernel Mailing List Subject: Re: [PATCH v2 4/6] dmaengine: dw: Print warning if multi-block is unsupported Message-ID: <20200511182535.uvijbdjreqw2zsfc@mobilestation> References: <20200306131048.ADBE18030797@mail.baikalelectronics.ru> <20200508105304.14065-1-Sergey.Semin@baikalelectronics.ru> <20200508105304.14065-5-Sergey.Semin@baikalelectronics.ru> <20200508112604.GJ185537@smile.fi.intel.com> <20200508115334.GE4820@sirena.org.uk> <20200511021016.wptcgnc3iq3kadgz@mobilestation> <20200511115813.GG8216@sirena.org.uk> <20200511134502.hjbu5evkiuh75chr@mobilestation> <20200511174800.GM8216@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200511174800.GM8216@sirena.org.uk> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 06:48:00PM +0100, Mark Brown wrote: > On Mon, May 11, 2020 at 04:58:53PM +0300, Andy Shevchenko wrote: > > On Mon, May 11, 2020 at 4:48 PM Serge Semin > > > > So the question is of how to export the multi-block LLP flag from DW DMAc > > > driver. Andy? > > > I'm not sure I understand why do you need this being exported. Just > > always supply SG list out of single entry and define the length > > according to the maximum segment size (it's done IIRC in SPI core). > > If there's a limit from the dmaengine it'd be a bit cleaner to export > the limit from the DMA engine (and it'd help with code reuse for clients > that might work with other DMA controllers without needing to add custom > compatibles for those instantiations). Right. I've already posted a patch which exports the max segment size from the DW DMA controller driver. The SPI core will get the limit in the spi_map_buf() method by calling the dma_get_max_seg_size() function. The problem I described concerns of how to determine whether to apply the solution Andy suggested, since normally if DW DMA controller has true multi-block LLP supported the workaround isn't required. So in order to solve the problem in a generic way the easiest way would be to somehow get the noLLP flag from the DW DMAC private data and select a one-by-one SG entries submission algorithm instead of the normal one... On the other hand we could just implement a flag-based quirks in the DW APB SSI driver and determine whether the LLP problem exists for the platform-specific DW APB SSI controller. -Sergey