From patchwork Tue Apr 24 12:44:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10359565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB870601BE for ; Tue, 24 Apr 2018 12:52:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CD7D28D72 for ; Tue, 24 Apr 2018 12:52:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9199A28DB5; Tue, 24 Apr 2018 12:52:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 218AC28D72 for ; Tue, 24 Apr 2018 12:52:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933229AbeDXMtC (ORCPT ); Tue, 24 Apr 2018 08:49:02 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51206 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757853AbeDXMp1 (ORCPT ); Tue, 24 Apr 2018 08:45:27 -0400 Received: by mail-wm0-f67.google.com with SMTP id j4so693490wme.1 for ; Tue, 24 Apr 2018 05:45:27 -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=1lZp2O9BfjywiJT0LOLaR31PS0wYHF12CIuuGpujLE4=; b=NI0PQDTtlFrrmfDlNfI/fsrqF0HQ9kX3owlLW4MiumvqP5mJER8ol0cGOe1B+Vabhl JO+NotpY3Ue9eJzhKE1MsC2w6TfLksSyypaVtKhrwpvHHLa54XRj3nHRPFqCnnD61HZB +UeRM6UFDJirQyenxXgkwnc/6RTS9DDJjd7CE= 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=1lZp2O9BfjywiJT0LOLaR31PS0wYHF12CIuuGpujLE4=; b=D1UnHnkGF6yO2mQaZhJoGcVAjHu1hy+CS6kxF4Oq7dA6Kdo3UNZgkKr8quY2AHTZUI UKXBYC21qycVDu+TKVgIIe1WPN8NaoyZLh7wuejDREIUg/UbFWh17VLBE/R/+U3zeFLW e6SM2POX9abHFe5qF1i2BWd+04WuxQgu8rNRvVSskRjQ4uZSPIsFc25oxKdYIEF9IzBY RHdpnRTpwqmt67GHspdpEW5QqwMZgXizf4B8GgOYwMssd09z4DB9cvuKEfHTUAH+0C6n OGgCuU9FSuOOi9Sq6CZiECiw5MnqBjETx9UadYSE5fa3Z3Vga/Z2yjzgg6jeuiupc1S0 SqJg== X-Gm-Message-State: ALQs6tAjcu0/PA4+3aIA8bPXIEhqN92Ag4ZTpqxzA7LCJ/6sk4cxNmtc XgEA73mM8rIEIidEE1bUgAZpBg== X-Google-Smtp-Source: AIpwx48C+8aqCKTqdebzpERv1i7opxYIXyecUMrRj4nczc5jEUcdw34eBna9v8pJNLONR6B7pQVgdg== X-Received: by 10.28.92.211 with SMTP id q202mr12299297wmb.131.1524573926425; Tue, 24 Apr 2018 05:45:26 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:25 -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 18/28] venus: helpers: add buffer type argument to a helper Date: Tue, 24 Apr 2018 15:44:26 +0300 Message-Id: <20180424124436.26955-19-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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(-) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 94664a3ce3e2..5512fbfdebb9 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -456,12 +456,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 f87d891325ea..8970f14b3a82 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;