From patchwork Tue May 15 07:58:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 135853 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp680260lji; Tue, 15 May 2018 01:11:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo0KUX+CkVvFCq8EG3Vc6SPDM1hD8tlynHzln0grgzuG63/JL0EGOJuiK1sl3DOEbCFiqkP X-Received: by 2002:a65:64d9:: with SMTP id t25-v6mr10884471pgv.283.1526371906077; Tue, 15 May 2018 01:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526371906; cv=none; d=google.com; s=arc-20160816; b=QEPKJVyu2M2NxJp+HFUjixsdmuRfB6Y6zw9ZIHRLRiwb58zO9nbmqxjngWxfLDv2ce IKXU3mr/arkDhHoNmaNu/2nrfhYyqiCZsmcLkMkCTCET45jH2Ts37bvB2lSSX27rxZ46 7YdrjVxUILhUcFBT/CoolcEDGIIYLLvOhIFn1ZTEh2uPDf5UvuhyR/uxe7sjsGQLh2eO fB9XVSqufD1+zaxnzzQXyH05mmev2m6wdsEodmKAFyChGQEEREvEIDDEdA+dzeLp8dlo kpUS4Kn4+mEdSkmDRI+0Bdh3wbjo0+4nC6/EZa99g9xgkqjMTUu7hBvjhb9KaopoAHeB Y4Ow== 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=avz9T8GOBPABhBmSIsHgU50Z7hweQE1QXsViuQmCEHE=; b=Hr2mFcF2koj42Bvf/PRLZVE/RIOUarFgYnr1s+4s98rfRbkOj0dujQ4PCLUFYz2vS+ rX6TbD6Yt5lc1rzuju1olvaHhluT7Df0Xin3HwmOqnRE2MQi42IhhsNcuanU3Y8EEVEC 0xLjtadp5+TMwV08WEBle94OF8A827RfxRkeh6sFZ2FkjhnSh+d5Dmk2piCETFvW6QDK pmmRwBlE/zZDE4SYpbR6xAsyQ467kOsGx0s7hKVjyAvypvSaqalTsXzLARZGGArg0QtH GZgxgKSE0hNU+6giH2J9A+1RwkjQn/wCl9w8elOvpJnJDLTMlXoOjMm5I/QxvumvPZKb gFGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IigHg9hz; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id u47-v6si9397235pgn.488.2018.05.15.01.11.45; Tue, 15 May 2018 01:11:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=IigHg9hz; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 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 S1752621AbeEOILX (ORCPT + 4 others); Tue, 15 May 2018 04:11:23 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50653 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbeEOH7h (ORCPT ); Tue, 15 May 2018 03:59:37 -0400 Received: by mail-wm0-f65.google.com with SMTP id t11-v6so17686932wmt.0 for ; Tue, 15 May 2018 00:59:37 -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=avz9T8GOBPABhBmSIsHgU50Z7hweQE1QXsViuQmCEHE=; b=IigHg9hzKXInLNSazSlvzd/bR2qGTRL8G3P3bTltflzQol4TLeVwlUK/fmStO6Kt94 9Avid3NoLBo4pcJBifXhBGYACB0RmtgmRIwzBK82zZDx+DxpXBLxmprX9bDWpcac4ScY /2yovhVUEoMUnUW7RFuYhIO9VX5Ev0vf0d1As= 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=avz9T8GOBPABhBmSIsHgU50Z7hweQE1QXsViuQmCEHE=; b=jdKbcli0edv0Rh9pHN/Q71XpxMTsUMWY3gtuQyoQDXFoawaC1Hpby4dlhaXxT356+v XTJXQL8E/EdVnAIYVmqjaJ8NyK+5qR734CjDOVxLYJ/B26A5HfiNAnPUpfyiOpK4pWU2 bUcCcR9m6xhhoQGkpZYhGURlLLr6QC/Ow3p3DpVSQyllwhfPNiul/LVFIWqYtF5mVJp4 qQOPXOe9/DltHopZ4UZjtJp+u7N7lQ9LL/ZKW7piKHeYiBzRApBtkLFidLYox5CbOgOR GCa3HRGaeRvjMhEfyFBMdD6fiawj0WJXM5bAFFOLLyK5b0FyTlQ72Teds22pGmhFcXVJ yt/w== X-Gm-Message-State: ALKqPwf2VBwDzVGbwyDOWTC7rNFwC5iHVFZ3Ldqcm1Xg8CeLx6jDLEos NEY1NXxG+VJdRXmcUWwMw2UvAw== X-Received: by 2002:a1c:424f:: with SMTP id p76-v6mr6584366wma.15.1526371176773; Tue, 15 May 2018 00:59:36 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 4-v6sm10918510wmg.40.2018.05.15.00.59.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 00:59:36 -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 , Stanimir Varbanov Subject: [PATCH v2 09/29] venus: hfi_venus: move set of default properties to core init Date: Tue, 15 May 2018 10:58:39 +0300 Message-Id: <20180515075859.17217-10-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180515075859.17217-1-stanimir.varbanov@linaro.org> References: <20180515075859.17217-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 --- 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 aac351f699a0..284da69eb81b 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -1090,6 +1090,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; } @@ -1134,10 +1138,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;