From patchwork Mon Dec 21 09:58:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 346398 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4331224jai; Mon, 21 Dec 2020 02:08:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdHDtb8xK1h2Dr2KJvnAazLIqmNc1TqgWqHzvtap1iDhwd/mQCGpruMHi2qiCyg6uDTqiZ X-Received: by 2002:a17:906:55d0:: with SMTP id z16mr14671116ejp.466.1608545325792; Mon, 21 Dec 2020 02:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608545325; cv=none; d=google.com; s=arc-20160816; b=zlcF8KFIKwEKoV0rEtMmLbbH0e3CQD+k4oIGBnBUoGchcIwyspQPNFo9+9dEIjXp6V xNbR3nm/3gcJYSUt5yoW7oL9hy/XFrDkB9MbfE4Sa0p2EeZ+4Me+wq4fPx0lnyDLQ3zc Vxj+/WYFZ8EDXO8wjl/6IdQs6GLwr02rHxykN/rhTGCzS5Q10p6dbzumG7K86Pq+ENkq PletmMr0bJskFgXn5duanRMYJ+PF2wdXhFmPuqa8t6w+NJF2LlRc1ZU4AjvqhXw/MmD9 h1hrplx5fzUygPG7igWMEXsGui2+mXfh3L/pGbhuio3eNqNu5S2O6/dnmkWFlqvZtWmg ygDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=U8dIwUpOcM3a85wJXVVTJLuQjf8sprpVk53MYVi4/fg=; b=vooDHiYk8GZ/w9IMaOsAGNQHAzZBsXurxEGoWbveIVskf3H/ZwAEau+dbGz8PEQgml sqTOBNUCCG8iNzFCLh4LKajcEfYbUfo5gqjlP2LZRrM3fqOIYa/F84YMiNDvVcaQIkwc O16jX7fs75bpNn+NlHvLrhrY18c1EpRyzccZwiZ7QWqIlPjLHQPCMCZoqREMJMQYhx8J JskNTESfnNAabhSFGKTpvRqIUDS56QSdGsLc6NJzCHwq/btPrdRatPn5H9KTx09jflSs A6h7VB7Yp76qJDzaQK/kbqYbV74qjvpd9sJCHNaRWL5aTELy+J3dSjD+0/6DXdfYxshx Teig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SEinuPXc; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-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 h8si9736737ejj.587.2020.12.21.02.08.45; Mon, 21 Dec 2020 02:08:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-media-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=SEinuPXc; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-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 S1726363AbgLUKHc (ORCPT + 4 others); Mon, 21 Dec 2020 05:07:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbgLUKHS (ORCPT ); Mon, 21 Dec 2020 05:07:18 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F2EDC0611D0 for ; Mon, 21 Dec 2020 02:06:17 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id p22so8978408edu.11 for ; Mon, 21 Dec 2020 02:06:17 -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; bh=U8dIwUpOcM3a85wJXVVTJLuQjf8sprpVk53MYVi4/fg=; b=SEinuPXcvuPCdvW0MRn13fwCWRVS8mO4UxgqBsLX5e46XSnK0CooK8WOIgDm6o0onN EWzNTifuBApc+G8kCehTcxsGQOL8gVRIVOWDNDXpf+lNk6Iib9EdWAtBtbfpsExC6A5/ dQhV5pFnOIwnVPz+bhE2SRGZMEFgIhFgrAgkIqqsypM7tIBdbzEqkZWxQwEbgD2M54do VMoSkAlQfGnDPQMsSyhUYJW4gNfjC1JFJvYsCdpIWz4NpRJp30ovrv1wQn1SyUlHu9zh +dIeLO8iCtEFEC7p5tOlM8KbO+U3322ZPSUtlRcLU0EtUJn4u3sI2ANAzgVoRGBUNNFQ Do2Q== 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; bh=U8dIwUpOcM3a85wJXVVTJLuQjf8sprpVk53MYVi4/fg=; b=Je9+Oi8OYaErUgFORotTX3OfGx3e98zDr46iuaeReDWl28obRblgItLA4Gr6eBU8vA kzdJzf9k5zxTKhVFgGM0PjwZCUdbQIfr/TyTzLd541jO2t1PLY+8VVnC34Tal+ra2BWb egmcjIah1nmAEC8Yp/SgY+Q4T1LoGfHA4MysPjTWJfCpXTp+ofXAtNzDDT23eyK4LHJo m//ie1CQwZNsIUVBuEj8b2bSivJ9MpNe+FRSBxUr1TDnoFuj74WIhl7vX/lClY8kKWRO ggQmrvkjijButOEHPzfa6P79NlInhJVLVGZy0997MSh/FHq33CcilYtCdmk0N3wNtM4L zvoA== X-Gm-Message-State: AOAM530YgxOgbScewlE8mtr7RYLAWQ1uycNRRGS62OdxHIvWc0NlnjJs 9xWbZS71JTDClWEaWOurNutUVhUHZdBIutAQ X-Received: by 2002:a50:bac4:: with SMTP id x62mr14940862ede.59.1608544719284; Mon, 21 Dec 2020 01:58:39 -0800 (PST) Received: from localhost.localdomain (hst-221-55.medicom.bg. [84.238.221.55]) by smtp.gmail.com with ESMTPSA id e21sm28118581edv.96.2020.12.21.01.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 01:58:38 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bjorn Andersson , Shawn Guo , vgarodia@codeaurora.org, Mansur Alisha Shaik , Stanimir Varbanov Subject: [PATCH] venus: core: Fix platform driver shutdown Date: Mon, 21 Dec 2020 11:58:20 +0200 Message-Id: <20201221095820.27192-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org With TZ system reboot cannot finish successfully. To fix that enable core clocks by runtime pm before TZ calls and disable clocks after that. Fixes: 7399139be6b2 ("media: venus: core: add shutdown callback for venus") Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 Tested-by: Shawn Guo diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index bdd293faaad0..7233a7311757 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -349,8 +349,10 @@ static void venus_core_shutdown(struct platform_device *pdev) { struct venus_core *core = platform_get_drvdata(pdev); + pm_runtime_get_sync(core->dev); venus_shutdown(core); venus_firmware_deinit(core); + pm_runtime_put_sync(core->dev); } static __maybe_unused int venus_runtime_suspend(struct device *dev)