Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp269209imm; Tue, 15 May 2018 01:10:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqHZLY++1iGOpBOVZHf2jCQkh60n+Nx/h4XA4+prhL4xOsxnj/WDi2zycwTJaNcS7K37aFj X-Received: by 2002:a63:7115:: with SMTP id m21-v6mr11258211pgc.76.1526371856962; Tue, 15 May 2018 01:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526371856; cv=none; d=google.com; s=arc-20160816; b=l4bAGGNf41x+KdeFE08lTTMBxolYIHlnJVTw/qXhNFu2eT5DegHlQ3gR1yNAXh5ecS SUuOm3UA7wOAhR0TYM7arp8QctmucX0QY4BHLhwC0LO824lJdBq8gAciuD+bALZG5csC 9SwzY8qom8ROO7ty4VvAa9jgjvd9lrvywtxfsg18g2wCIzfeLsQZg5gthSJGK/2+/y6u +aNeQqDhdDNIbRxEDPcOZoINMVNEUUlqD7JKWWaauW+cqnLPZGWSlPhTDjZtzVnMIE+/ potxfQ0AgDLQ5l+JCybnGWRZ+rj74WkYmbn7SZ3ZOXZPt7KPcIG1Tjp11VSrro3IRPpd 6CaQ== 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=w3fchFRe9caB5oMhUm91FictlKsalyPebAJ+t3yoQ+3snFmqSlvrFPmEXgKaZ+seTh 7BulB+e+nVob6SbnzTI8B4YCHxxL5N3+iJazeykP1fziz13Xa8bbF5Huea0Otvz0nApt c56SUO0O5K7MfMGFQqZF/CN8/MxMS40ye+FV8oRoakUdPz5NDXBRroEOBj4N59PiQvbm oyle+vmv1QZkIfXj+5SYq5ueH8J+SA9xhinWg5pO9DOgc/pcm6C4YLcxzIXlsNrVM194 t2EeJy0wCJk/Qh4yPKqZzM0X/CHZn6E/KSLQUl11WmgA0xIobu6g+zQOfmlo4fQzE26a cpww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b51aZ5GR; 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 l30-v6si11218283plg.420.2018.05.15.01.10.43; Tue, 15 May 2018 01:10:56 -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=b51aZ5GR; 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 S1752563AbeEOIG0 (ORCPT + 99 others); Tue, 15 May 2018 04:06:26 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:41953 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbeEOH7t (ORCPT ); Tue, 15 May 2018 03:59:49 -0400 Received: by mail-wr0-f194.google.com with SMTP id g21-v6so14879817wrb.8 for ; Tue, 15 May 2018 00:59:48 -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=b51aZ5GRJjxo2TSLk4W6tTCDp5KwAnvmVyGdW/OkBpTPjl6gy3Jy3LrqB61mNRhEjM XIDQOWkvJWgoei5XZvtK6a0nvBxaFY2pQRhr2BJ3DjqhdsTrmOxa09Mn1U0qjTQX7Cls xTAp2Kf05Ja1PXRFLZ2FkkWQV1ER5yEc1ImpY= 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=T40v8sc3YWxyuJLL1sZT8uYcTZhsz3IPqUEHL3HXLZIMnlfsYt+SAHzNZ3nLNC+Cu9 1j57wtDTVIPbrEcfhxo5n6Fzd0hY2jYXl7baGmyx9kUolKFj/756HirSId1G9nKsSs0Y cWf/OYV2Dsar6szbx6oYwqFNDAoqJJ1weDNYf7+9PhMhLXKL8RzMnaTID0ccGQ2r47Xb pkgUOgZ+MeLT04nT+eQhxAfvLgn7EsmIu3u3KImeDbSRZY5V07aeXl6OyI9bc84fvYbY IHikmT+qvhdhTAAsgk0+EpdQsPiTBY2IVAbam7w6nAq1sKIlgivx28OhRks3W9l44kgw Qsjg== X-Gm-Message-State: ALKqPwcW0GhqpdBlMpAYv4Y4mhovICB31D40KwTi4r9F2BEQVVjx76bZ Ww4Q0UuEwVBAB+QoDpIpYExxMw== X-Received: by 2002:adf:b00f:: with SMTP id f15-v6mr10547679wra.254.1526371187931; Tue, 15 May 2018 00:59:47 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 4-v6sm10918510wmg.40.2018.05.15.00.59.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 00:59:47 -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 v2 19/29] venus: helpers: add buffer type argument to a helper Date: Tue, 15 May 2018 10:58:49 +0300 Message-Id: <20180515075859.17217-20-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180515075859.17217-1-stanimir.varbanov@linaro.org> References: <20180515075859.17217-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(-) 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; -- 2.14.1