From patchwork Wed Jun 13 15:07:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138498 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp852991lji; Wed, 13 Jun 2018 08:13:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPsKOIRX9tloK8A55nIs4gLC3vAgULVDBltCCmW0Jy2qG5GRIRKDnV9jJzDD/ISK4qVBnB X-Received: by 2002:a62:32c6:: with SMTP id y189-v6mr5295255pfy.241.1528902796700; Wed, 13 Jun 2018 08:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902796; cv=none; d=google.com; s=arc-20160816; b=NCunO4KdFC/uSQyrTAm0F+RUIEtiwgksRL0Xr0cA4hRt8peCxnb3aVJcTCea+u7PVI bUobHfNlPi92SKGfImn6IP0oo0lWW0He35mGIjd81L9f8aTXPI81RZp8Igve2duFp4s5 bKMcGbllqSMiifRd6wXCMMWKeHtPvpJd95/g1YRm8WdH+Hk2BHY5WB15LGAl0r++kKYi D6bzHE6JtelQyub8Zcn7fp+vrjKqtEWqTMgNM3egptLe6nC8a8DWSInl7FGYNZzYxQoO TL4tE8vqAhfJvqPc6BJZNHFujSostwxdPYL1TcvoFJYWRc6H7PHxG7sl0JkXmF6Wvi4A XKZA== 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=XbzB3gGWIOUwlkfB8fNvxycDKdUWLnR530TQDEBCv04=; b=BkWilyoF3ceUiUST568sXlhj2kl2sdmjYMLYACK0W81+D9HsitdUYgegotEu/Z5lj8 MyUuQ/GnYlZ+8vMzWhMaZqJYDWt8QljHIpfAsmM8RyVZhuJH97ydLIZL8Z7WY96ZpI82 KigdNZA1JammTmb8deybiu3wxlVSSeyE40yIyo1B/PJ8KmWSX6ozaOPtZgz9Mpqk219+ 9Lehg48JKMqYdw7U3oW+QtJV3/xAhd8u+6H+zNpp0MYjC0szZflEBqkNlKBa+eh9wB03 xuBcmb9qZYBmAz9Cta5P8+irU1qBZGGMYPVdq83/wqGbbdYzH7D+HjOpxrKkNLzsnySN NrGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OPGRaIpf; 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 h2-v6si2429030pgf.334.2018.06.13.08.13.16; Wed, 13 Jun 2018 08:13:16 -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=OPGRaIpf; 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 S964904AbeFMPNO (ORCPT + 13 others); Wed, 13 Jun 2018 11:13:14 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:42210 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936049AbeFMPJd (ORCPT ); Wed, 13 Jun 2018 11:09:33 -0400 Received: by mail-wr0-f196.google.com with SMTP id w10-v6so3139517wrk.9 for ; Wed, 13 Jun 2018 08:09:32 -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=87ORcY69pnhjHzwy3ZGqBtyUOPwoa/Ckei7U+5Elc6I=; b=OPGRaIpf+/sYt2380waJ5LQ41bf3I1BZm5nsCVakxqQZJjQE4xFvTTTIa0DLdp+Wwa jZcsXJYP4ym6QvbiO5xqeXiJSV/zYMPAIfrNvSzavIORxbl4VIxCcQgsBfVRS0Mcu0O5 vhgMVbtB0DrIF9b8uafC748X+ZZmBHvi1x13E= 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=87ORcY69pnhjHzwy3ZGqBtyUOPwoa/Ckei7U+5Elc6I=; b=NIMnBFkgXmDtihKMBQPQpVxOdoW1oGjBEMvYmyCwCD1QPewyPZ25rRvGEwoMBH/+/W R8aqxuUzSsw1EmMcORVUfYfb3bIIOI+AABLbc2wvFGPco1nCI7/WmLCEFdYFWx7IxlEy FC1gfKMWug4BObftaI0r+PuTN5w24V5R9NPNzPfwTqSVv7kKypP7JShf2axRiMzNISWE nRCLeqLWvXTjIB+BVlQz9YTC3rc/JgkofO0aLXxTykN4lhYkfPRTClWWbNJj7N1hKuGZ Kc9u8zLd3qE/MhgP0BhCFRiQYRqjSbF/rzCkpjpE9tSPhaUa4i/VTgGD5mFScRxjKt4Z hTMA== X-Gm-Message-State: APt69E0RprymwfdbgZsFwqFrRly2lANfqrpPIEcb02ZxAllrrajNeVlc QME0OxZYE8urmyoyrmC4yYMTBQ== X-Received: by 2002:adf:a645:: with SMTP id k63-v6mr4762953wrc.231.1528902572269; Wed, 13 Jun 2018 08:09:32 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:31 -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 17/27] venus: helpers: add buffer type argument to a helper Date: Wed, 13 Jun 2018 18:07:51 +0300 Message-Id: <20180613150801.11702-18-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 adds one more function argument to pass buffer type to set_output_resolution() helper function. That is a preparation to support secondary decoder output. Signed-off-by: Stanimir Varbanov Reviewed-by: Tomasz Figa --- drivers/media/platform/qcom/venus/helpers.c | 5 +++-- drivers/media/platform/qcom/venus/helpers.h | 3 ++- drivers/media/platform/qcom/venus/venc.c | 3 ++- 3 files changed, 7 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/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 0cce664f093d..2eeb243e4dbe 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -453,12 +453,13 @@ int venus_helper_set_input_resolution(struct venus_inst *inst, EXPORT_SYMBOL_GPL(venus_helper_set_input_resolution); int venus_helper_set_output_resolution(struct venus_inst *inst, - unsigned int width, unsigned int height) + unsigned int width, unsigned int height, + u32 buftype) { u32 ptype = HFI_PROPERTY_PARAM_FRAME_SIZE; struct hfi_framesize fs; - fs.buffer_type = HFI_BUFFER_OUTPUT; + fs.buffer_type = buftype; fs.width = width; fs.height = height; diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index cd306bd8978f..0de9989adcdb 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -36,7 +36,8 @@ int venus_helper_get_bufreq(struct venus_inst *inst, u32 type, int venus_helper_set_input_resolution(struct venus_inst *inst, unsigned int width, unsigned int height); int venus_helper_set_output_resolution(struct venus_inst *inst, - unsigned int width, unsigned int height); + unsigned int width, unsigned int height, + u32 buftype); int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs, unsigned int output_bufs); int venus_helper_set_color_format(struct venus_inst *inst, u32 fmt); diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index aa6b0026d79d..1d7f87e0f5b3 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -795,7 +795,8 @@ static int venc_init_session(struct venus_inst *inst) goto deinit; ret = venus_helper_set_output_resolution(inst, inst->width, - inst->height); + inst->height, + HFI_BUFFER_OUTPUT); if (ret) goto deinit;