From patchwork Wed Jun 27 15:27:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 140353 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1032805ljj; Wed, 27 Jun 2018 08:35:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUOtfr9zUXhiaexivHZGdoB8gmWBSP0i/9D2Bbi0iFYuLydLxk3fkq6gs6bw8o+FwPYT3f X-Received: by 2002:a62:84e:: with SMTP id c75-v6mr6399869pfd.35.1530113716919; Wed, 27 Jun 2018 08:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530113716; cv=none; d=google.com; s=arc-20160816; b=bID3g/KBouXbgyR/cqJdo75BjYy7az66E7Pi0XAZBdhltllp2G4h+v/wbOr1MFqsQB 901PGYP7zwdvRVO/7vp9hhe0VsW+/0FVDPfRZt3GcM0gk/rl0l7ZNzjYzfHDKwMOhUaT BelF1S6pvlRhEJjrxusiWboaz+O/pjWbPS1KISznxaTcEdRjToF7SdOClCZ7G0apovcw eX3wvI1pHzuXvzYwaVKWmGmPc6+4tOPFO56Gp1s4kaLFmfghp0uVjOmMr579ApyeT3Fd Xqws9BEx4D0lODV+K5vZ8l1cLS0RfoOGXYwTgJMTotPZq6G9RLfIJUIT17z2eYPSyuF/ 9weg== 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=iP3OBq3KmmkdIHc4ClU6RmJI5t+xyWo9eNZ9y9WZFKg=; b=pRL1XoHxfnYxEOwJP6OpT7PJmwetA3UPV/NcYs5kH8pBULKq3DWDkVHFsMmnX53y0S /UefQxTDXePG2dg448Kw0mshX6BLEZT9EAWgGcDOp+JbxKRt6L13hA1s0NhPXcNRem51 GN2cfyQqA4yQ2pOJpjh381N7d8iBFIFRvqD2/YTMQCOQ/4m/A9vt9FqsSfPlSdE9FZvX UzTo1o7POpKxB42VNhxPStnxJghO0I0ABMlK+SToa8UhJRzeuP9TKkpEW6nGSwQzEVaS cG95uYISK9xU+JG1xGlr9u8fqbvoSeAvjchBwJLo00AQzyDSL+njqDJQY0uXj3BEUQK+ 1uhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAu+UGG+; 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; dmarc=pass (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 f8-v6si4666232plb.381.2018.06.27.08.35.16; Wed, 27 Jun 2018 08:35:16 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=QAu+UGG+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965193AbeF0Pes (ORCPT + 31 others); Wed, 27 Jun 2018 11:34:48 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37090 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932147AbeF0P2J (ORCPT ); Wed, 27 Jun 2018 11:28:09 -0400 Received: by mail-wr0-f196.google.com with SMTP id k6-v6so2478469wrp.4 for ; Wed, 27 Jun 2018 08:28:08 -0700 (PDT) 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=iP3OBq3KmmkdIHc4ClU6RmJI5t+xyWo9eNZ9y9WZFKg=; b=QAu+UGG+Kzcc915ZKNuhrLTocXs6qRLejPoTmNT4GfKzpIVQsDzz+OSgbT8adIPHfR igWEQyoHFwGXQR3MlIqMJHbmVIpfmS9WwFCYVB5NgfcPVS3/HBkDf82rKpuXxIhQ52UV j23TB05DJiq12ksZxvIckvxaSqLIVHamCZISw= 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=iP3OBq3KmmkdIHc4ClU6RmJI5t+xyWo9eNZ9y9WZFKg=; b=LV3bTD9v7FiazKn+Vs2EkHXUDcQvZkkK+loxuxHAP/SlSoTeB667O41GHOtQ+w4NxY spN0Q9fGNhEd0WtcVPfVwJKGHDYTboaPMnfjkauFx36B5Mr+N1zaIq6Iy3XuGQxP/J/T zogMQGkkRUwXtDH8NSdI38x6falt3FfMF+dplELdZ1RcOQzJxXmYpKkvER5f8eDlrmnK coxaa1tPv73MvAusj3FUJ7KKIj0bk4UGNRTmg2ORPcqlnG8bQGI6hxquZTrbb7NZaQHJ Wx0XVbmoSVEROc3Y3fYREakThm/QDjk45KrhgMiku31MzNSjYnxRuIVr0dsC8ZoNS0ef 55Ow== X-Gm-Message-State: APt69E0I8N2Y3XlspYEXAodQSn0QmZjVba0O4WtaqG0196ov/g7PxHcE HPAIdFMmvx+V0BxfzYaQQl2ZSA== X-Received: by 2002:adf:e881:: with SMTP id d1-v6mr2407375wrm.43.1530113288238; Wed, 27 Jun 2018 08:28:08 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id o203-v6sm2916075wmd.30.2018.06.27.08.28.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 08:28:07 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Stanimir Varbanov Subject: [PATCH v4 09/27] venus: hfi_venus: move set of default properties to core init Date: Wed, 27 Jun 2018 18:27:07 +0300 Message-Id: <20180627152725.9783-10-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180627152725.9783-1-stanimir.varbanov@linaro.org> References: <20180627152725.9783-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This moves setting of default properties (firmware debug, idle indicator and low power mode) from session init to core init. All of those properties are need to be enabled/disabled early so that they could be used before the clients are even initialized. The other reason is to set idle indicator property early before we enter into venus_suspend function where we need to check for ARM9 WFI. Signed-off-by: Stanimir Varbanov Reviewed-by: Tomasz Figa --- drivers/media/platform/qcom/venus/hfi_venus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 72a8547eab39..7a83e967a8ea 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -1091,6 +1091,10 @@ static int venus_core_init(struct venus_core *core) if (ret) dev_warn(dev, "failed to send image version pkt to fw\n"); + ret = venus_sys_set_default_properties(hdev); + if (ret) + return ret; + return 0; } @@ -1135,10 +1139,6 @@ static int venus_session_init(struct venus_inst *inst, u32 session_type, struct hfi_session_init_pkt pkt; int ret; - ret = venus_sys_set_default_properties(hdev); - if (ret) - return ret; - ret = pkt_session_init(&pkt, inst, session_type, codec); if (ret) goto err;