Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp619851imm; Thu, 5 Jul 2018 06:15:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpePgLgEQThyWl30B66teIni1H1/71acUgC5+Hg3qGRy4Fxg8KayHJ6/DXilBfE84UAbGg1H X-Received: by 2002:a63:db05:: with SMTP id e5-v6mr5564898pgg.152.1530796508155; Thu, 05 Jul 2018 06:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530796508; cv=none; d=google.com; s=arc-20160816; b=HPd/AEyY/4HsPa2pEkqFURfEOkAjxpmJ+WAK19HCye8CMl5d1u3xv2zGObqqwbRI3n aCV/TR08TpbdJv9xQs/HrJrDULuJWtBvlo+zgdxvzqEOnQGs2KNQ+P9lErQVsCGbsTwp EC1U4bMEoel94HFq1yswq+PAs/dpCmmzfrH8n3wvM57YgAss1quHVWFiVFbjJ589dolb UAkrZDOz5eD0uBmvFMk5msiy7crHZIkcuUw++fqQtm42CKBLkgJWNgTejsnt7DYgj9EN /SZ+qLRUHEGJX/8LDWSa2Myr2kTJN7Y54n1M2CYDECp+O6M4IMSXfqWkoeBkCcih5RzE QZaQ== 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=sKW1Qhjv/3v+sIUyT+LzXT20fza2+aJb3I27sLBLr8xNq2TmMwtrWhB9nM4EhIGqV4 Lu6DkvRUe/Mt8EsUESgRuBg/eeZubSJJRmD/uygLU87qSB/qde/WD85sw092ymAXKP4c l86+SrG8fZinx48zQLoOj4pakw/DKcbzzEVP2fYivpn8+ka4JQpmDawW9Ym38qyVNl+r ArHYGB95tXDoQVYs7obZYCYIscP4aavf7gNpEI7Dpz0+Bg/O5gdB9heHEeguaiHKNudG cfH62R1xzpizgRQBrtcD4weHhHuMgjTXM0Z3LGglbFpCU3N7anFhMZpC6XfqAIkxHtYj jV5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Wj6BqHz/"; 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 y126-v6si5518589pgb.23.2018.07.05.06.14.53; Thu, 05 Jul 2018 06:15:08 -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="Wj6BqHz/"; 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 S1754683AbeGENNQ (ORCPT + 99 others); Thu, 5 Jul 2018 09:13:16 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33748 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754330AbeGENFR (ORCPT ); Thu, 5 Jul 2018 09:05:17 -0400 Received: by mail-wr1-f65.google.com with SMTP id k7-v6so1138924wrq.0 for ; Thu, 05 Jul 2018 06:05:17 -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=Wj6BqHz/6uOQqXGNAt2gEk12LfFBh7wTeo9oNw+TI7HVV8kPdabQPXSDfI7+6xIULm ue16H3oK6OGpUcjRcKtWigD0+2PESCrGgR3vvwFgIRWzFYlVZA/a0J2BrsWrLSNNRe7W j/W87PrKAMJT285Dv8ZsNM8TXS2/iGeReEIBc= 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=gWrs5leVyJgV5vjFZ48sYCbpItLmSZ9hIyONCSa5/lWT3OicnGsu9NsQema80cBGuA PInQpLXw8YqjIISGsWVE2ykV2rZ0B9M0usL75NdQdpoO5c8DhipaCO/vk0uTp8W9l+q4 YZQrF5QxAxqtogZUXpBLOMtJlgtqegPJVXByJNjqd9Otj4Dxl07Wmp8xoNGV1HOYawTY YPjXfonOid44PNIoZPkrrzmbiDDYecGzHZG1mAQS2w6MSgWkPhiRr78P5lEI18lS4vr1 6giBvu6jPZ4IU2x6jd4avd1s9InnEujlgXoP9RuLWCKAYaqE+6PgrcKZVdocMV5Ack5n OfIw== X-Gm-Message-State: APt69E2SAW+s/LwuASuFZVc6rCDPeikHBemfuXwsiLw56YPK5K0kpWBi Tt0nlOKfIpDGGDbanMpe5k1vi5JGx1o= X-Received: by 2002:adf:c00b:: with SMTP id z11-v6mr4394146wre.268.1530795916640; Thu, 05 Jul 2018 06:05:16 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 11-v6sm2109102wrw.67.2018.07.05.06.05.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:05:16 -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 , Alexandre Courbot , Stanimir Varbanov Subject: [PATCH v5 09/27] venus: hfi_venus: move set of default properties to core init Date: Thu, 5 Jul 2018 16:03:43 +0300 Message-Id: <20180705130401.24315-10-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180705130401.24315-1-stanimir.varbanov@linaro.org> References: <20180705130401.24315-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