From patchwork Mon Sep 23 03:51:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13809250 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91A0E79D0; Mon, 23 Sep 2024 03:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727062882; cv=none; b=Ak2pseg/+rSUZJFP1n8a+NjgbU2TWJcG2arJ3cp4i+bH2Dir8qlwHDzDxQFH284+8rT/S8TYzTIAzJ3GAKL/ygehmt2BmN6m5bs2y4mJT1TDYYCG11DdWpZHuyv7TEs4gyPzOGYnMrGvA0TA2PLoJT5olSewo7BbA0D5b9/AqtA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727062882; c=relaxed/simple; bh=hVUsNSZG+X0PBH4IQwTyPL+6UyoVzsFwiNCZrdnw8n4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=G6ti2OCQ9HKXg/v0lXRtkodicq1Y+4gI08lZgC+C27ZVwaLoRPTt2rJmXj9HUMc73zJIPYp1WYpQxdpQtXGXU4WOTEjt7OGYioEKiGve+xudgGP7vIvDrkviKntYunoHf3qaQ+8rfxklSig6qTnT+VD6jOeEka++kBa2wOczIeQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XBpfp1YByz2QTtY; Mon, 23 Sep 2024 11:40:34 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 6680D1A016C; Mon, 23 Sep 2024 11:41:18 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 23 Sep 2024 11:41:17 +0800 From: Jinjie Ruan To: , , , , , , , , , , CC: Subject: [PATCH 3/3] media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled Date: Mon, 23 Sep 2024 11:51:15 +0800 Message-ID: <20240923035115.3008900-4-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240923035115.3008900-1-ruanjinjie@huawei.com> References: <20240923035115.3008900-1-ruanjinjie@huawei.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemh500013.china.huawei.com (7.202.181.146) It is not valid to call pm_runtime_set_suspended() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, call pm_runtime_disable() before to fix it. Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Jinjie Ruan --- drivers/media/platform/qcom/venus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 165c947a6703..2d5966f5ce97 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -412,8 +412,8 @@ static int venus_probe(struct platform_device *pdev) of_platform_depopulate(dev); err_runtime_disable: pm_runtime_put_noidle(dev); - pm_runtime_set_suspended(dev); pm_runtime_disable(dev); + pm_runtime_set_suspended(dev); hfi_destroy(core); err_core_deinit: hfi_core_deinit(core, false);