From patchwork Thu Feb 15 12:25:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 128413 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1691075ljc; Thu, 15 Feb 2018 04:27:45 -0800 (PST) X-Google-Smtp-Source: AH8x225Ct/2wd2G17c3d5tN5naSDr+zo/k+kidJsswXqZ7FADDIrLEGeK3ZnYSiA99zWVXM7bfA7 X-Received: by 2002:a17:902:594c:: with SMTP id e12-v6mr2435523plj.323.1518697665795; Thu, 15 Feb 2018 04:27:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518697665; cv=none; d=google.com; s=arc-20160816; b=Pj+HGkbexV+4BKYIgQioeeixs1eUaNApls6cQCuwQJP71fk6+XQN+SONWjvxey7+m2 bEIb0INeHuLNMkKyyWtH94jFfPIEJbfyicSmzZOP5FDnhSIixI6aveJXtnosJYHiOFZj gGijrRTHppiRmI9gxeswFPbGxkWxYTVABxguvLWkGGcwDSvpQrA6UvG3FRS/6VIAe2/O 8UqDEVJ6U3RZrEILgoZ6hfjLvlu74b/KareauGXUFkq58Vx07VokzyLHGRcMCreHRBjL qOuABdAt4bVtAUkO9y812IbMiQBrStLW8FL8Bbw88CXdU8Fanep78ONtRNpD91BUehTw G/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4ZlIQ38WWFNWXdMWjv1X/ZLJHQuCfH1spYj7+sCRZWY=; b=xxWiii/FvnnMmHY/4idV5Tx5QxTySb2NnIxyoVmuwh1iLb/uBD+4Kp9vsVpocktRbp 6VE26E2em9qo0tGeJMcQ8J/Ddh1GkGkV68fmxHVqtYtF0Jn+bZV65T0DCzczf6NQH0FO 4jH4lDRJ+XNDpcryqAAw1RfXfrpoJOWttjBIQ2wf3n0DOfWWKZkFYeWDdv2L+mweET8p 97jGfmQa4+M2cB/uFi5TZAms28stlsrSEeRn0ZFUVGs52CUrjXu7CDwO2rVcSXL1yU25 REz43IDo6tQX/B0oNOHJmbZEHFClABuDOVarhKeuYjUczF2lVe+WDUBeAOV8XlK5mMJZ QwTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bya7RMud; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si10573451pld.162.2018.02.15.04.27.45; Thu, 15 Feb 2018 04:27:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bya7RMud; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031726AbeBOM1n (ORCPT + 10 others); Thu, 15 Feb 2018 07:27:43 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37090 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031525AbeBOM1X (ORCPT ); Thu, 15 Feb 2018 07:27:23 -0500 Received: by mail-wm0-f68.google.com with SMTP id v71so501334wmv.2 for ; Thu, 15 Feb 2018 04:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mitw7QQlF05ZYn5f+YltPDyfGcQqCth4+uO7SALBKmE=; b=bya7RMudFAEbRE5wIofJurrWuRNp0PtX8aox4paa3+eKKHPTN/T+g7UhVgzd2R+BDI cpe5Fr75tjEREiAFtVP4IvG1F2GQgIo7Ds0uXgDdsLsbJwWwPXQWbIrSxUDC1I6RG9Ju g3S8SMVgRFdQG31gTiZda2/zdxg/zLPQ4ApRQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mitw7QQlF05ZYn5f+YltPDyfGcQqCth4+uO7SALBKmE=; b=tVjq2zhZaJLtaOaJgaTEVB9Z+P6Tkrm+lxmHMt9fifhBM6lJPvK3MLUvRMBz6ByrqK UkAyM4F/1+vdFJxI7H8ZzWnehBQzXAGlI2zPLpZBWbuQD9r0HXrQilcXX7a1E8S9wKAH I60q4O8JddCNw0Ria/p1I/zhBFhzK7a8UTAzvxTMkO9Oy+zEvr3aJzemomUVQI9u0ZNB vMpB2OuTR79gbrfW4N5HkslPoyn6SGL8LKjtEaQW2nTD1RIgi2lSaIVZREDRatAhnhLb wr/BM2Np/GHqdROrtPzHrRqEHJ0exHX7o4ioxWTPE93zgvFtXlKRJH3TrVa/1izT4gU5 YMig== X-Gm-Message-State: APf1xPAbY1sM+FWCAuRJ6dEU/vPXTpVk4hONeL+kFseIs7v/PNhbfxU2 DPfDlPQOOOHP4O6mjpVUQUK7jg== X-Received: by 10.28.150.139 with SMTP id y133mr1926655wmd.142.1518697642093; Thu, 15 Feb 2018 04:27:22 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id s9sm15632778wra.4.2018.02.15.04.27.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 04:27:21 -0800 (PST) From: srinivas.kandagatla@linaro.org To: vinod.koul@intel.com, andy.gross@linaro.org, dmaengine@vger.kernel.org Cc: robh+dt@kernel.org, mark.rutland@arm.com, david.brown@linaro.org, dan.j.williams@intel.com, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-soc@vger.kernel.org, yanhe@quicinc.com, ramkri@qti.qualcomm.com, sdharia@quicinc.com, Srinivas Kandagatla Subject: [PATCH v3 5/5] dmaengine: qcom: bam_dma: disable runtime pm on remote controlled Date: Thu, 15 Feb 2018 12:25:11 +0000 Message-Id: <20180215122511.13517-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180215122511.13517-1-srinivas.kandagatla@linaro.org> References: <20180215122511.13517-1-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Srinivas Kandagatla Remotely controlled BAM instance should not do any power management from CPU side, as cpu can not reliably say if the BAM is busy or not. Disable it for such instances. Signed-off-by: Srinivas Kandagatla --- drivers/dma/qcom/bam_dma.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 6919f501b9f3..d29275b97e84 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1333,6 +1333,11 @@ static int bam_dma_probe(struct platform_device *pdev) if (ret) goto err_unregister_dma; + if (bdev->controlled_remotely) { + pm_runtime_disable(&pdev->dev); + return 0; + } + pm_runtime_irq_safe(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY); pm_runtime_use_autosuspend(&pdev->dev); @@ -1416,7 +1421,8 @@ static int __maybe_unused bam_dma_suspend(struct device *dev) { struct bam_device *bdev = dev_get_drvdata(dev); - pm_runtime_force_suspend(dev); + if (!bdev->controlled_remotely) + pm_runtime_force_suspend(dev); clk_unprepare(bdev->bamclk); @@ -1432,7 +1438,8 @@ static int __maybe_unused bam_dma_resume(struct device *dev) if (ret) return ret; - pm_runtime_force_resume(dev); + if (!bdev->controlled_remotely) + pm_runtime_force_resume(dev); return 0; }