From patchwork Thu Jul 5 13:03: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: 141136 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1922959ljj; Thu, 5 Jul 2018 06:09:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf9V+FfnyLSPSVheTcXbqNFp3dK/vJ15/xqSH1sB/+ys9MSQjjCyx3YYTZUIk5ra53/ESET X-Received: by 2002:a63:714a:: with SMTP id b10-v6mr5418857pgn.73.1530796153871; Thu, 05 Jul 2018 06:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530796153; cv=none; d=google.com; s=arc-20160816; b=LDDjLh+lb8PjAokRfXnBsJuZsqdmuYhDI7ra3/kf7rM4dNwHsrbiK7Fv/RhzYKPJ9I C401Jv25FLsF82AjMrJS9ju7j/o5nOkjvIyAkCX6HLm+cGUJ3hnAZsct1pYmoD5/1aFz 2GmzVHIWSsIINH7t5ILao41dQRKITmhJEa4lEaE5aN5nwoQ3pb6vdaa97Tv2vl5E4pLn UWM68051OUX36hP6ovalsiJuhHxXHp3Ohz2/mrRMFIXP7p9wgiCZs7gm20VsZSOwMI8a uVJB/ON5znpzPy1l3JkIucQcy6X59C2EZ9SymUCBHUSJekxuf9c9zhQwvzfzk6nKsSf2 +tjw== 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=oU/c81CKUJQLLGDhE1U7BJ8H3e590k2PwcQruab6xc0=; b=pesFShFOdOcJs8KGIkEQRTYFQ5kYD1Jal3AfrXvFeTrTJ0R0I7b2oT7EsiyP/brEIH zuhCsdhgilO29/iJvghx+KV7S/eqYahFcIMujZRMD+oJYM5nwyh6Zhfowc1OSacZxirX z0o6uxOnKW1bL4IVq39CvYhNa8B9B+lx8Z+8c4yoNSxAdtTcJNupVZ3de8A8c7FJ20AS XguqeZr41/vV0fpcL7/Ht4KaKUfqdGH41ZmtpvVFksE1BQa3aGWD+DJvv5WCNxQPeSRV aINkreYgX3Sb939mjv7LEEzJcdtPZCQGk4ZV/bWv9V8/RhV5m1ivXIbXz2t35eEgZ9Jk F1UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BkC7iggz; 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 l9-v6si6212270pfe.11.2018.07.05.06.09.13; Thu, 05 Jul 2018 06:09:13 -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=BkC7iggz; 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 S1754668AbeGENJL (ORCPT + 31 others); Thu, 5 Jul 2018 09:09:11 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:51971 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754433AbeGENF1 (ORCPT ); Thu, 5 Jul 2018 09:05:27 -0400 Received: by mail-wm0-f65.google.com with SMTP id s12-v6so11040859wmc.1 for ; Thu, 05 Jul 2018 06:05:26 -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=oU/c81CKUJQLLGDhE1U7BJ8H3e590k2PwcQruab6xc0=; b=BkC7iggzUe43eEIW0Tq1j7+eKjDNnNx8Ilx9gfLqBRcUwhT+le/NErI5xEgobr6oS7 L2qA2YB7zCwmAFjJ+pqY+6rlySXjR12KpOTK0Lzff+AlaDu+riLCGt9tds79o+34ACjB jwzHIqiGL4N2ha/gHnAFf8IOMabteet+3NLAM= 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=oU/c81CKUJQLLGDhE1U7BJ8H3e590k2PwcQruab6xc0=; b=kUW3dOhzsbcyZ0s6cNPlU4sZD/usgghuUG2rcn+RHFklQqBUxqW5IFAXn0G0MLcxme sJb9mamLiGqv0pxKVkMbiv5oRrKVb+6pwUS3lbtNXF/mMi5dic0LKFmyr7jitolRI5mn QRZmbNu/ZF4qSWq6WmYGE9BR6tAXEk/AKj8OA0vrQIZ8MatIWqs8XAp/WbQifQT/s4mE s3Sxz11aIiSiZ6xy45xS5fi4rr7cvJCVNMpt+LMzUkA4TMIBq/L+6XjWglhqzkqH9Yiv bJQYfay/a77CttzKGUI1Eb2VGmft/iM5WfGfzNd+TjTrL7BZSaS00vOosjxRUlpNBH/z ePIg== X-Gm-Message-State: APt69E1ltMgWAKo/mimDhTzCzmxSDZosqPCWkorx50TorXXaopXpbLxO RUgqeZrl9PUWrHz+5wiROX4yyw== X-Received: by 2002:adf:8e49:: with SMTP id n67-v6mr4376875wrb.131.1530795925715; Thu, 05 Jul 2018 06:05:25 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:05: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 , Tomasz Figa , Alexandre Courbot , Stanimir Varbanov Subject: [PATCH v5 17/27] venus: helpers: add buffer type argument to a helper Date: Thu, 5 Jul 2018 16:03:51 +0300 Message-Id: <20180705130401.24315-18-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 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 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 6fd7458f390a..7e764eeeb07c 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -458,12 +458,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 df54841c910d..650e6b0a01d2 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;