From patchwork Thu Jul 5 13:03: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: 141140 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1927427ljj; Thu, 5 Jul 2018 06:13:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcurzIFa4n7k4iSmj2ajEQYwspbUvMfSjIDS4Q3v7oNQLCCXsG3xGL64VP6K38udY8O/7J8 X-Received: by 2002:a17:902:1025:: with SMTP id b34-v6mr6049711pla.112.1530796396142; Thu, 05 Jul 2018 06:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530796396; cv=none; d=google.com; s=arc-20160816; b=jzHaNcOEXaBDAvBFC1zZTXwShEVGRUyAkWBCr/i3dyoN1z5YHJHMHugJTKLeKJSzC5 y7diR36Ia3QhyI03ylt5eOIhK7EVZ58N+769sAEfvQx8+9UBSL55eCqf1aCrka5nLBTy FXFtT4abt3raRJq21juUqZKI1QSQc4nL9c8GNrC0hIGchepS+W2zUt9HAlzm6GxwORoe qFB7cc9xOwPMCAQV/Lz0RCHe3fRbzplalW3yagmU0Et0AtjaMZ9tINZtOlI0PRgRoDP3 HRlKcOcXdJBb+7Ntk5iF/w/TMzVokAVNM6gO8jXbNSj8MCOQozDFcPBvBszbrbulUPCY Vv5Q== 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=ifsHTGTOUfh2Z/wE4bHWPX/j94TnRjcZny+LcJCMw3nBmp6UeFARfQRFyAJjreXx0U UMTF4act53dsepevkghLpQhOkRys2ivMzDm5SmP3i240DsYlc6aOzzITi9A1iANbKZ/q Bk6rjtkQ2fas8r+k59ZCQOQtufaY2VldV3zn/N3xRgcGd5P9sRab9jnf9rTD0mME/M5E S9hPOjs7oh76AQV7e/rHphJ985akQl6kYCFLSpGuRmHDFQNEHKrhe7mRsi2SCCaeC/Zl 5eCq0dQWyXD9P4rdmIJ8yYEBvLxwH8/p71gjBanHJbmHleVsAFKaXtLi1od4K0hz/t/Z gtMg== 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-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 i126-v6si6238004pfc.296.2018.07.05.06.13.15; Thu, 05 Jul 2018 06:13:16 -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="Wj6BqHz/"; 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 S1754576AbeGENNO (ORCPT + 4 others); Thu, 5 Jul 2018 09:13:14 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:55011 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754335AbeGENFR (ORCPT ); Thu, 5 Jul 2018 09:05:17 -0400 Received: by mail-wm0-f65.google.com with SMTP id i139-v6so10961048wmf.4 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=SCEQixOnsXUy9WbYkSJFpZEkT+xSe7hZ0Kyi6VnHAMRx5GWif2MC7XnmGCrBZ3P2+X lFCXncGVc/HYqivb1wL5f5vqwI+yXPhAXRcd+BwYvvOt5GyLUgxVXj8cLH3itB7nRuU0 idR+RTT63hyqujdvJYNOtYsFeIr82tocFbtrzyMrCRM0DDTxxHGGsycLAGsCH7ygqRoP BTwv3mfwqHF5D5oXLZTKqSl+H1YOam1ERoYwflNlvMw/nI7EXZsEqyvMCV3+TCtQ8T3B ljdYJeY2Ljr16uN4O4kzIPZVZTulrGhJffK17LoMLfQgv22i86PuQgQbKf3kmavPnPXZ 7DJA== X-Gm-Message-State: APt69E2mLOm+RleshR/QOsPm4cJR2jox4Fsp/BmMcM046LL3Hnf55kqk 1s/LpRpNBhcOi26zvKDgbiuPUw== 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-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 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;