From patchwork Wed Jun 13 15:07:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138502 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp855344lji; Wed, 13 Jun 2018 08:15:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIZThpw/UQ3oqOtsgWAiXf3vNAf+ztZeEVOGImcnXtvykK70dN+W2J0BJesowtbx+JR52I0 X-Received: by 2002:a62:a6dd:: with SMTP id r90-v6mr5358301pfl.60.1528902909018; Wed, 13 Jun 2018 08:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902909; cv=none; d=google.com; s=arc-20160816; b=yG6nelTwZH1sM7fTLthNs9SDSSXatYMPDV9k4+j3rDqko96pOPAeKXsIqRihOtIOBj QdWKHY3pIMY2xzVjIA9/vtgL05Cuav9xfh/ajKQRz+UTigboVVytfUy2MEKnoqVUjBKJ 6KpBhKgbAcyYZvoZqORoO1kR//yz9b0eVFC0rtvsKCw/8hEaeQq64/UlcE/p05unM+ev sGFY1Fj8QmDEMTKJTgs/P01AihUUh1ld15i77OVtecPpa60Qj157eAqxJFS1Bgf2FC9g w3yy+cRdTNvQX7kSFDklo8Hlk1vt/fnvHlU6eDfEp9MWm0q6ko+OGMnAc+OmEXRCJpuR c7Rg== 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=I6Vt4AsmyfraPFdDRKtDK18+2744WinUyJ1pW+GlWlo=; b=D6H6nPmob1YRBeu368BKKtW0gp20Jacyh852KV9JqRy6muOg6Z6yVfM6bQitOki9s5 a3CRDmE3yOR6XTe1qPdkUR074lTV/hGdOLUarKHDm4IUgyBOUXkvgvEzUSsoAmTmGr1c l/DSSSBo0TUzndlLhRumtNsoIOo0B2gV13bnKjvKa0vPXgfc89kdwmiSKROZXE0Fo5uj iFUZAezLZWEDRtxzyBvBetT4pv5qP2KCgsoV0L9ihiNH+6Fa+4BOTi/emfpmJW5R73+r DSnGRUrLZUD57SDsCkjGbkArEq3URr2Im2CmkCYwFNdBHU6BVT7bfwv3obqQObEMfCUC xerg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IZSQqhk5; 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 l190-v6si2654716pgl.198.2018.06.13.08.15.08; Wed, 13 Jun 2018 08:15:09 -0700 (PDT) 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=IZSQqhk5; 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 S935956AbeFMPJV (ORCPT + 13 others); Wed, 13 Jun 2018 11:09:21 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54940 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935998AbeFMPJU (ORCPT ); Wed, 13 Jun 2018 11:09:20 -0400 Received: by mail-wm0-f68.google.com with SMTP id o13-v6so5320502wmf.4 for ; Wed, 13 Jun 2018 08:09:19 -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=IZSQqhk5croRiez/q3h2TX1sKS+RYjVRd8n/uuYbuYWdX44k/XyiddD+uigw30icW3 rpD5FW+0IKVZJvgygJQKkM3x314H6elaik0Yb3v6v24eDC/kfZ8AnnxKcvdWc616E8qr mbmLf6NraRqLm/Lk9O7hGJvsKQawAFgJfmyhk= 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=ERBHbjKGbqeTFzdavFTvCrzdPIY7Pgqu9Bcj9T28d0TJR/73AzqeRl9S6oSSCvFKUd cVBoxzhrHcajKr2crF6vJ6mc1hwO3US5ulU/qs9+luemS6mmYqhotA0UwShk5CvD7Jbb EGHqQo+KJvnhdyntR+LnWL3SzJBJkvtlQH2gWDrZcOdzJBR4CIaQ6q1Zqd8bU4W9j4iD H1A9XPlaQuexioXp5HQQ3Q08iK8j8Xxzsk06M+KrkLElBc/BzTmuzlhbTw/tsH4BLHIF 6GnUTwNdnunPW+wZ8Rc6Jz/WuxY2BGnx0374KbjHSREpakacAe2Mce71E6hdt5sWEPxg uEXg== X-Gm-Message-State: APt69E2N4sZXjl7SZJCbMGkdRGTORM+ebPLRrsIxMtWDLgB6p0k0aOJO AnhZep7yfi6MFJRnU8sCmsI9Bg== X-Received: by 2002:a1c:9e95:: with SMTP id h143-v6mr3542325wme.105.1528902558857; Wed, 13 Jun 2018 08:09:18 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id e13-v6sm2886548wrm.45.2018.06.13.08.09.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:18 -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 v3 09/27] venus: hfi_venus: move set of default properties to core init Date: Wed, 13 Jun 2018 18:07:43 +0300 Message-Id: <20180613150801.11702-10-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180613150801.11702-1-stanimir.varbanov@linaro.org> References: <20180613150801.11702-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 -- 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/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;