From patchwork Tue May 15 07:58:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 135850 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp677007lji; Tue, 15 May 2018 01:08:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpyYjOxrvulUqpZKpCmvkfUnucNoDxHSNyP4RJ1atULijwEIb2k9h9hOmsQB5MiUI/gNFJK X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr13799111plg.38.1526371722048; Tue, 15 May 2018 01:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526371722; cv=none; d=google.com; s=arc-20160816; b=QoGK2L7FZgR94p96tw/CmO/NwRa2eYmrenD7b1xfCtGMA3O9acTPg6FiQ0vCsHgiq0 Ae1fA9oxYzIOgCnGfnZFyHjC1DCIEFeS0GrNuuxHgAQPys4WIBPSELjCkfA/XGATH9QO 3aMuq4MYmHgtjiJ2/9eNOx8kyBE8uBIDNrGAoRc6XbaABJ9l1gDawAQO0CGDzJvCW2sB KqaYXy+Zf5I1x7vk0kF0MfCsAoBHx+3xzvvSH3Vxi+UvwV+PwCqswRx68zAXsLhKCOYA Ndx2YcHXzes/RkNHyihvmcYjGXoSJ5Xnd2qpFnksXrpw7Zb4e5g8v1BQWRbxzDDvxGUL F4jw== 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 n10-v6si11080592pfe.70.2018.05.15.01.08.41; Tue, 15 May 2018 01:08:42 -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 S1752564AbeEOIG1 (ORCPT + 29 others); Tue, 15 May 2018 04:06:27 -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(-) -- 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;