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: 134093 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2194267lji; Tue, 24 Apr 2018 05:49:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+RcspecDHosOJOC/7Z0HbnW3sFJH8Q5HAbLz6nBZXy7QpEoBJ0ljK5mYJszPaEUinMcYNs X-Received: by 10.101.93.138 with SMTP id f10mr20662687pgt.25.1524574157257; Tue, 24 Apr 2018 05:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524574157; cv=none; d=google.com; s=arc-20160816; b=kOgqKpMWAQGRLqAvJT0aJfFEu8Fk+J/DA2xJo2zGATRu82M0dsEjzRY5fGnqxOr7Bz XaDikMRD0/Q4KZgBVBFPb4NOSSj5y5uMHDEdpcFfsIEkdXifLHotSGqTYiKC2TAu+lIV PImw4b28WoFeGLQsvieQUR+Fs2YSjeNvoELZb9fn2/PPoC7Hb/cOkiOAUwf/dV2u2gNn StfVYHMrkVp7cyvLPAXMCfQ3l9t+7cR17I2Awlq7a3UlOpg0qgeNuaP7z2lBL/E/bw50 fedw+nVg21NpJJnoF4/qsvrGl2oTc6SJfiZruYcZEboHQsOw7IrrCDfLla2bq52gyT+j BV2A== 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=1lZp2O9BfjywiJT0LOLaR31PS0wYHF12CIuuGpujLE4=; b=rRlx+T9wLiYw9JlLpS+oTWuod/f2KcHJ4dfInJeTTGwTZ+5pybFqwXdtCyQSGIcahU 0yDzga8zUW3CZ4Tl8RpHCxZdZihXeOPN9Xea79BYIhiZuSOVeuGso1NFPHhmevMq5fjJ hfnOpC2+QQWA0sjpJ9XwZDlkIBXAzK4R5kcvBj2G5V+sgbvEvqmOVVGV5RLfQeSzjW3v KIHfoXuhTAYlKAVBHKrTnw7U3YDrtwZFiEBllY+3UxTLonOXg9nepDub39puA4N7gnyi fxwxsNkQ+4Oowb0tfb38XAdEmDeJ/ZXrvbQb/wyxim13MxyZEUzEYRovGswTc/bEvb7y AKhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NI0PQDTt; 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 e3si11339717pgs.449.2018.04.24.05.49.15; Tue, 24 Apr 2018 05:49:17 -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=NI0PQDTt; 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 S933273AbeDXMtM (ORCPT + 29 others); Tue, 24 Apr 2018 08:49:12 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55556 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757799AbeDXMp1 (ORCPT ); Tue, 24 Apr 2018 08:45:27 -0400 Received: by mail-wm0-f66.google.com with SMTP id a8so694411wmg.5 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=VsYX/mQ24couE2Dbbs3OU6gRFOQvpdTU/Cfc+TQ2dznOhKGQJa9sG5bHORStfaprjz Z6eSZwTCLN5151Gz22MbOqLTzyLU4S/GnMZPxbYPtj4FldVbztscIa9zZLG3uQproXMO XjPa7AL4o6wBB3y6Mfq+gtcKlEYB4Z3F2Z58q8CabmMGeHiDrKc7w/Z1v78kfj8eKuE6 CVGPB1XQjvVg6OZGkSon2RGGwaY+6HXLvSuVpF5FDtmYajDI+CAFwhoVQDc7Drx24M6l eqyUPWj6SOYpm5HOMIcS06soF54mONo1vM8+TdI8GKM2x/9Nn2TxxD02grln3hIZtBSn NImA== X-Gm-Message-State: ALQs6tC59Ub8V1Si3qnNLX/wq787NjOrfPw7Vo2MY/z5aaWQpdSxQoOY yYYEHIbOTf7GFLrjn9gBg9kHOgRN9Nk= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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 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;