Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6600510imm; Wed, 27 Jun 2018 10:05:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLAqx0ZvqIGbvHSVKypTD532k21sytZePLWHpKiDJbyKXZv0BnZ8SWF8QVwSTn+2TAJWyDL X-Received: by 2002:a65:6252:: with SMTP id q18-v6mr6029912pgv.106.1530119145083; Wed, 27 Jun 2018 10:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530119145; cv=none; d=google.com; s=arc-20160816; b=U8R3pVrXYLSWzzt8lFDp3VA97y4xvpjAdFiHDQ5CBRYGWPWaMTSdArXQzysglT86hE X+TA2RXGIZURrGiR60qhmxhFnMaWlDSkWREFh+fsJUFJLfZ5oSfx3PWJAhW+bECxf/ik AZnvcjBXV9q2hel0pdIFvrl4QrS5cl0S3uJEeV7EX7YD1uoG4GLCQlg6bUScs+bFSFgn +QlBLrAfnIEW87v+pnUD6G74Qv/vG3HPBazECDreJFhzoLraLtKPyAuXf2+H3QeVLIXM PUBvBY8w9d4xg1MO14k9pJCOf2N487hv4Fnd57kG5BRbHlgtRPJ4Whqee8PWeS1UbpoC UXCw== 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 j10-v6si3803922pgq.503.2018.06.27.10.05.29; Wed, 27 Jun 2018 10:05:45 -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 S934759AbeF0Pes (ORCPT + 99 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(-) 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; -- 2.14.1