Received: by 10.223.148.5 with SMTP id 5csp7094486wrq; Thu, 18 Jan 2018 00:33:05 -0800 (PST) X-Google-Smtp-Source: ACJfBouWdH/JsbFaZlW10yS3eiJ4moo8VC0d+qcX8OKV2mdbrmVbUJPYX/5yJkzpuS72Lr+4cM77 X-Received: by 10.99.95.20 with SMTP id t20mr13592904pgb.79.1516264385168; Thu, 18 Jan 2018 00:33:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516264385; cv=none; d=google.com; s=arc-20160816; b=DOPnt8CPFGEP8LHLKfgtiSswW9Nm3IdiPI4uQKne1pN0jNcN88UbtKCcPkWWGLC+IM 8He4hJllN5LUOU3H8UDw+VStiYbglhH2CZhRsBSFNLA41dot2+NcX/+kccXMaBaSsQ4M veXOI9bv+196eAogbgMaIhdG/DylBooxc8GLnAN/bw8JjGW9mmp+nZ1wW4Ay+XAf+jia u8xmcUl8sEPRSRmEJo2OFv4vZfO36J+tpIokFWP/kYgTf27CbKgrr+cjNcBOG3jzZniF 1+4CgHVX8lqfhHmWPlkgwOms4ZU5dwbybeeWlv4RypRS93tWGmi5RD/OG5NxPJvwv0Ok QCQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=oQeAmwPrju9xQAcsAHbb+FfuwGJSxzmJ5V+xJuBG+wY=; b=Oy/TmDyS92DehVfJgh7kpXruZZQc/LUtdAGWVuZ1nQm5vTJf3Np+KG20//ZVp9taMD d9EIZjsdOQ39Xth32+CEbZeeu79Qo9WJ2x8MvhsS5CS2J8cWen1Q+H6UuT7CFEBtwMac CwZV9gexywytRPS7X76W3e7PgE7X8ELUTOXxWjwIv5Fn98hgMbLTheKF/4cHmtfSXole 05PKac5u84AlT1GTCZXY53s25QEZHP85UFeO3hscAuKIH4wme+rSCR8DOnthbE69It0H xfKshfI5f0s2g25og4M1n+ohJTJQ1uM0eLABttKcjGuUsw7ixZnKMu15P6mDBLUHEng8 m8yA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si6184100pfk.293.2018.01.18.00.32.50; Thu, 18 Jan 2018 00:33:05 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754762AbeARIcC (ORCPT + 99 others); Thu, 18 Jan 2018 03:32:02 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:29710 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750841AbeARIcA (ORCPT ); Thu, 18 Jan 2018 03:32:00 -0500 X-UUID: 0348ae69059e42c885093198338a88d6-20180118 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1917157854; Thu, 18 Jan 2018 16:31:57 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 18 Jan 2018 16:31:55 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 18 Jan 2018 16:31:54 +0800 Message-ID: <1516264313.16602.30.camel@mhfsdcap03> Subject: Re: FW: [PATCH v20 2/4] mailbox: mediatek: Add Mediatek CMDQ driver From: houlong wei To: Jassi Brar CC: Rob Herring , Matthias Brugger , Daniel Kurtz , "Sascha Hauer" , Devicetree List , Linux Kernel Mailing List , , , srv_heupstream , Sascha Hauer , Philipp Zabel , Nicolas Boichat , CK Hu =?UTF-8?Q?=28=E8=83=A1=E4=BF=8A=E5=85=89=29?= , "Cawa Cheng =?UTF-8?Q?=28=E9=84=AD=E6=9B=84=E7=A6=A7=29?=" , Bibby Hsieh =?UTF-8?Q?=28=E8=AC=9D=E6=BF=9F=E9=81=A0=29?= , YT Shen =?UTF-8?Q?=28=E6=B2=88=E5=B2=B3=E9=9C=86=29?= , Daoyuan Huang =?UTF-8?Q?=28=E9=BB=83=E9=81=93=E5=8E=9F=29?= , Damon Chu =?UTF-8?Q?=28=E6=9C=B1=E5=B3=BB=E8=B3=A2=29?= , Josh-YC Liu =?UTF-8?Q?=28=E5=8A=89=E8=82=B2=E8=AA=A0=29?= , Glory Hung =?UTF-8?Q?=28=E6=B4=AA=E6=99=BA=E7=91=8B=29?= , Jiaguang Zhang =?UTF-8?Q?=28=E5=BC=A0=E5=8A=A0=E5=B9=BF=29?= , Dennis-YC Hsieh =?UTF-8?Q?=28=E8=AC=9D=E5=AE=87=E5=93=B2=29?= , Monica Wang =?UTF-8?Q?=28=E7=8E=8B=E5=AD=9F=E5=A9=B7=29?= , Hs Liao =?UTF-8?Q?=28=E5=BB=96=E5=AE=8F=E7=A5=A5=29?= , Date: Thu, 18 Jan 2018 16:31:53 +0800 In-Reply-To: References: <1483499169-16329-1-git-send-email-hs.liao@mediatek.com> <1483499169-16329-3-git-send-email-hs.liao@mediatek.com> <1485419833.990.1.camel@mtksdaap41> <1486359476.11424.33.camel@mtksdaap41> <1487733150.15869.11.camel@mtksdaap41> <1487854104.17813.1.camel@mtksdaap41> <497f8e4ef7ae4c8a9b7b4ab259801306@mtkmbs01n1.mediatek.inc> <1515400735.21044.35.camel@mhfsdcap03> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jassi, There is one request for one GCE h/w buffer which contains a list of registers operation. I will resubmit a version and please review again. Thanks, Houlong On Thu, 2018-01-18 at 16:01 +0800, Jassi Brar wrote: > On Mon, Jan 8, 2018 at 2:08 PM, houlong wei wrote: > > Hi Jassi, > > > > Sorry for reply so late. > > According to previous discussion, there are two methods to move > > dma_map_single() outside of spin_lock. > > (1) put in mtk-cmdq-helper.c, as described by HS on 2017-02-09. > > > I think a trade-off solution is to put in mtk-cmdq-helper.c. > > > Although it is a mailbox client, it is not a CMDQ client. > > > We can include mailbox_controller.h in mtk-cmdq-helper.c (instead of > > mtk-cmdq.h), and then map dma at cmdq_pkt_flush_async before > > mbox_send_message. > > > > > pkt->pa_base = dma_map_single(client->chan->mbox->dev, pkt->va_base, > > > pkt->cmd_buf_size, DMA_TO_DEVICE); > > (2) schedule a tasklet in send_data(). > > > > After internal discussion with HS and other experts, now we prefer > > method (1). > > How do you think about it? > > > I don't exactly see how you mean but please remember send_data() > callback is supposed to be atomic ... it is protected by > spin_lock_irqsave/restore in drivers/mailbox/mailbox.c:msg_submit() > > BTW, how many requests max can be queued in the GCE h/w buffer? > And since it's been over a year now, could you please resubmit after > checking for checkpatch with the --strict option? > > Thanks.