Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4351474pxu; Mon, 21 Dec 2020 10:11:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFnxwXam1GpNPh4NtFsy6hXQXqs0MQRBQmnTVVeVuFyd0EnhmC0KEw0STKE0S3iChFD+o2 X-Received: by 2002:aa7:d784:: with SMTP id s4mr16853255edq.215.1608574319046; Mon, 21 Dec 2020 10:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608574319; cv=none; d=google.com; s=arc-20160816; b=Vr27Hjt/A245Hiokz9gtWhOt+lQDa2XPqod09kjM8sDvVq0YEy9RJZg+YCMk57Gha5 47OaRCjvd+Ez32O7bzj9fz4CeloTdvjh8kGeZJLAY5GynayjAPAo0oRka6M7wxDE3tJZ oGL17W1y3FoiXjFr5qU/XAG2755P4jjIL9QJ7jt134pzFkNQXo9QHRVMlrrzqzbV2aNn w9InbEWlhuIBpaSTr1yOTAUvDugw1ugQwfp1qHMQ5VMTVIcbsHKkvVPzP2YlYJxYytyd 2FL+cMGmGituCcu91S8T91Mx4Is1lLfqE/W4+4FHXBNdW4ZrWdN+n/FggG9+58EyVxI7 AIaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=oKzr3FPkUPe+aYLEEdAws7uUObKGbIl98KSfBYhptN8=; b=pW8irrfyrUQE7i59gMcaC+n/uUfFUEJuYZ6ca5bapvOXHyGdgpaE+avxmqNp67MIGf 9tZD1m1H5C/RHjlmcaqGOZrWjM9KEES/0p2E7umQ179gg6i3A7DeXdrX4+hguZcyYnvJ 5nCrSPTy0I3E6NQjtwBer29EyGbgv5GREqpgSBYk5YV2hGKUDN2Wvze9Ac7Fu16HHQuc By1ag9bgQHuU9l4E2eknKkHhRFabZgPBLk2niCJNpXZ/cTD2qDfnT284DA8DcbbfSXVG hrYch8GBlEMCKO2wV1uJ17rjGOScvW1DJ+83thxz3SRVU3LGlqXN4vHfeNRoyV29ZC5J WwbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="soNsn/OE"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 33si11023927edq.375.2020.12.21.10.11.12; Mon, 21 Dec 2020 10:11:59 -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; dkim=pass header.i=@linaro.org header.s=google header.b="soNsn/OE"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726048AbgLUSKf (ORCPT + 99 others); Mon, 21 Dec 2020 13:10:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbgLUSKe (ORCPT ); Mon, 21 Dec 2020 13:10:34 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D918AC0613D6 for ; Mon, 21 Dec 2020 10:09:53 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id j13so6892822pjz.3 for ; Mon, 21 Dec 2020 10:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oKzr3FPkUPe+aYLEEdAws7uUObKGbIl98KSfBYhptN8=; b=soNsn/OEkcxcg3tdMLUK8S9ZfkM2t2yqDVZhgO18mjV+PiB93rs9nVs4/WOxCehg/l Zg1AKon2Kp22DOxk79DHwR6nf3NMY2EigMyBBHYEATgEmmoIAESPB5ryNAeJdcC/ABow gu2QCIJsK3kY5FV0rUzPAZKM+Vu5PA9N1h2mZkoKFe5opMbOQqNy5Nv+ZylxufnFJNgp M9n+UFZYYDVCrgxz1RYf1f7reW9o1Uj/tCIUJeJghbf4yqPqoHRS6HDcSsdLMgXS3j5C il7Nm9zO2lJUTh3QxS6ymYW9gn3wf4DgrEL+jOFyt3bn8Bjnh1bYfSBVesfBWDPaEQ27 tqcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oKzr3FPkUPe+aYLEEdAws7uUObKGbIl98KSfBYhptN8=; b=RbpO2MWMJDufaMyZIqHd58pjXIt+NeNjnLBsU/zNxudEXwIgzdRBZebX3kNZRgPzdX XbeQ6WMmnahiEHziofYZcOXtpUoCzEz8R1G0PB9jAZ80gsiv3g8ehKtZxgbj/kGS8BN2 1rGGhQGkDMjVJn9GFASBLNZ7ucN1mOGYrm3siNCF/2r0TNLwTLzxM81gPfJiyuvt93OJ UVOGsZ8z/njikTgmI7VVukU7GhwkwzhXVM1ohJ45S/pMJ9i6uWsSAv7lnUHDFoK8HOok dkmo71Ng/iMkS+gTWY45TO9oC/kdaSrFrdEicSBd/9nleoNkKSqsDmAj3/k8eDWEMWH2 Yfcg== X-Gm-Message-State: AOAM530rXWlsyCK38ajezoa+AFznZNaox56P+CEv7EtKj0FJ8MKwFkFO sGGgtKYf1zpa+UYm7+lboU+4TQ== X-Received: by 2002:a17:902:5581:b029:da:a817:1753 with SMTP id g1-20020a1709025581b02900daa8171753mr17030542pli.76.1608574193380; Mon, 21 Dec 2020 10:09:53 -0800 (PST) Received: from [192.168.1.70] (ip72-195-250-206.ph.ph.cox.net. [72.195.250.206]) by smtp.gmail.com with ESMTPSA id w63sm17017843pfc.20.2020.12.21.10.09.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Dec 2020 10:09:52 -0800 (PST) Subject: Re: [PATCH] dmaengine: qcom: bam_dma: Add LOCK and UNLOCK flag bit support To: mdalam@codeaurora.org Cc: vkoul@kernel.org, corbet@lwn.net, agross@kernel.org, bjorn.andersson@linaro.org, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, sricharan@codeaurora.org References: <1608215842-15381-1-git-send-email-mdalam@codeaurora.org> <6c85436d-e064-367e-736b-951af82256c8@linaro.org> <9769c54acf54617a17346fea60ee38b6@codeaurora.org> From: Thara Gopinath Message-ID: <8c86f4db-9956-10d1-b380-a207137b50ef@linaro.org> Date: Mon, 21 Dec 2020 13:09:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9769c54acf54617a17346fea60ee38b6@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/21/20 2:35 AM, mdalam@codeaurora.org wrote: > On 2020-12-19 09:05, Thara Gopinath wrote: >> On 12/17/20 9:37 AM, Md Sadre Alam wrote: >>> This change will add support for LOCK & UNLOCK flag bit support >>> on CMD descriptor. >>> >>> If DMA_PREP_LOCK flag passed in prep_slave_sg then requester of this >>> transaction wanted to lock the DMA controller for this transaction so >>> BAM driver should set LOCK bit for the HW descriptor. >>> >>> If DMA_PREP_UNLOCK flag passed in prep_slave_sg then requester of this >>> transaction wanted to unlock the DMA controller.so BAM driver should set >>> UNLOCK bit for the HW descriptor. >> Hi, >> >> This is a generic question. What is the point of LOCK/UNLOCK with >> allocating LOCK groups to the individual dma channels? By default >> doesn't all channels fall in the same group. This would mean that >> a lock does not prevent the dma controller from not executing a >> transaction on the other channels. >> > > The Pipe Locking/Unlocking will be only on command-descriptor. > Upon encountering a command descriptor with LOCK bit set, the BAM > will lock all other pipes not related to the current pipe group, and keep > handling the current pipe only until it sees the UNLOCK set then it will > release all locked pipes. So unless you assign pipe groups, this will not work as intended right? So this patch is only half of the solution. There should also be a patch allowing pipe groups to be assigned. Without that extra bit this patch does nothing , right ? -- Warm Regards Thara