Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp375162imm; Thu, 31 May 2018 01:57:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIos7zmyOQKnK3NP1DD/KgReoZMZQY13VeG29Nx4Dp96QjjkWUq7HzUyUkQpcsPJfWyfPXn X-Received: by 2002:a65:590d:: with SMTP id f13-v6mr4907745pgu.313.1527757065765; Thu, 31 May 2018 01:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527757065; cv=none; d=google.com; s=arc-20160816; b=oUx6Mtq4xzLyxJd7U6FKNdsY6aKDNxBhIlu2JbuBOyKxt5umb4Lw8rYNRUIOqxjOV6 LsmsDGbaJb7xmYjP6B41tg+Fnz0gVHIf6sDpWv7J5Zp4IswQBC8IdsrCu1Vw3zRJ13AS R4GlgQ7mEnDQTd3fWrPRDz5c4YlDAGYG2jNLEXkQz6bJmPPyrxx9L7YEDP11LFXtskZP Ty8bJ8NW2dIBvzlcWif/0ugZNFlhO9BQM3ASOQWceslLSY4fAFPB45ZqBpwWjgw2I3TK MVvaDWurJ0rZW4LwzGtZxhzfzonIl9ojh/Rj+9yI1Bx4CwzBpybtSgAWkvuV1gQlmuAu ZfuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=kcxkY7z7tXXVTcVK1UJxpvWUM+fUji/Yypc017RZPH8=; b=fiXtBII1i/xC8Ms3nVwelHaqoUVWRhKp2qxfUiVsunxwCrAFHpUuji3gdwliJqAlv6 /scj2t1KJxk7FS0AslnMxZKQNu5fUF1d0dCGig1iEqb/3Pyl2T7YwxJqOgn9exOLUd50 +sJuqtTW3+uCc/RTT6ubv7Z+S9D5mjCuGSw83wKEsFwDaXYAQEHEZ12LZZHMy3Y4Mb7c TBPae3yqWzIsnsMG87MFSab8Bcp+Nl3ko8mcf25tjXmRRf1ptOgtInaZalnVFqjl6gBV Z0dlWxLCPN7/xM1KLNY1y3ICkaBqFjBVRT7vUGpO9q3G4qV8+aYi6EhLw2XpRdSu8TQR tjbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RUjTMffI; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1-v6si388383pgc.502.2018.05.31.01.57.31; Thu, 31 May 2018 01:57:45 -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=@chromium.org header.s=google header.b=RUjTMffI; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754252AbeEaI4g (ORCPT + 99 others); Thu, 31 May 2018 04:56:36 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:45425 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754179AbeEaI4c (ORCPT ); Thu, 31 May 2018 04:56:32 -0400 Received: by mail-vk0-f66.google.com with SMTP id n134-v6so12859271vke.12 for ; Thu, 31 May 2018 01:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kcxkY7z7tXXVTcVK1UJxpvWUM+fUji/Yypc017RZPH8=; b=RUjTMffIsVmHqtokC0o/GmZL3/snGUnJDXeUujMBMmGsEBtarqDQ4huRk5GDQpQpX2 wBbYlf3YegxKA9EE0LZjh50EFJe7rVMDx9cwi9BsxGYO4Emm7p1kqrOgwMW3yr1E+02w RcP7ivcxbT7Tx5REqiDjnZA243fZrKgF+pqaQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kcxkY7z7tXXVTcVK1UJxpvWUM+fUji/Yypc017RZPH8=; b=ZGTTgv4OiYG0gXGPqaAOqMVPrsOrRz/W+iBfvH1TKaQtHPgZpsPwyZk7MbbSIlEXBR JJndwMOYw69VeDW42ESJe6lVuR+zUiRU4rgHiVizFxaVKxDRNmnT8Ws3oclVnn9TXmuJ 2MVsnXqH+1izPyELIyPFv2YoVmKU6ZnMSJD1NiJvYYPU0fKQmIAEWWmAt3pt2yixmwGL UK3pYHpxe8aarv9Ydh4hz8HpKpEi1tB7AWyjHnhs23pFsdGHhghINRAUjN7gvknj4KqN FSnT6F9QDo1r2+xkesjhMn3stHYJ9oHLpuVZQ1XTRnOz9lM2AqLjv5PB5CjYwjhhAAbY Gzgg== X-Gm-Message-State: APt69E0kWfLj+OY9y0yBY//LN+ofgv23+SNHbFRbea4DkOFy2pLs88TL hgBupRWcKGkXVwZZoPfYn1Pj5n4SxSA= X-Received: by 2002:a1f:a945:: with SMTP id s66-v6mr980530vke.54.1527756991385; Thu, 31 May 2018 01:56:31 -0700 (PDT) Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com. [209.85.213.48]) by smtp.gmail.com with ESMTPSA id f21-v6sm9310842vka.38.2018.05.31.01.56.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 01:56:30 -0700 (PDT) Received: by mail-vk0-f48.google.com with SMTP id o138-v6so2782493vkd.3 for ; Thu, 31 May 2018 01:56:29 -0700 (PDT) X-Received: by 2002:a1f:97d7:: with SMTP id z206-v6mr3521768vkd.183.1527756989472; Thu, 31 May 2018 01:56:29 -0700 (PDT) MIME-Version: 1.0 References: <20180515075859.17217-1-stanimir.varbanov@linaro.org> <20180515075859.17217-17-stanimir.varbanov@linaro.org> In-Reply-To: <20180515075859.17217-17-stanimir.varbanov@linaro.org> From: Tomasz Figa Date: Thu, 31 May 2018 17:56:18 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 16/29] venus: add a helper function to set dynamic buffer mode To: Stanimir Varbanov Cc: Mauro Carvalho Chehab , Hans Verkuil , Linux Media Mailing List , Linux Kernel Mailing List , linux-arm-msm , vgarodia@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 5:05 PM Stanimir Varbanov wrote: > > Adds a new helper function to set dynamic buffer mode if it is > supported by current HFI version. > > Signed-off-by: Stanimir Varbanov > --- > drivers/media/platform/qcom/venus/helpers.c | 22 ++++++++++++++++++++++ > drivers/media/platform/qcom/venus/helpers.h | 1 + > drivers/media/platform/qcom/venus/vdec.c | 15 +++------------ > 3 files changed, 26 insertions(+), 12 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c > index 1eda19adbf28..824ad4d2d064 100644 > --- a/drivers/media/platform/qcom/venus/helpers.c > +++ b/drivers/media/platform/qcom/venus/helpers.c > @@ -522,6 +522,28 @@ int venus_helper_set_color_format(struct venus_inst *inst, u32 pixfmt) > } > EXPORT_SYMBOL_GPL(venus_helper_set_color_format); > > +int venus_helper_set_dyn_bufmode(struct venus_inst *inst) > +{ > + u32 ptype = HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE; > + struct hfi_buffer_alloc_mode mode; > + int ret; > + > + if (!is_dynamic_bufmode(inst)) > + return 0; > + > + mode.type = HFI_BUFFER_OUTPUT; > + mode.mode = HFI_BUFFER_MODE_DYNAMIC; > + > + ret = hfi_session_set_property(inst, ptype, &mode); > + if (ret) > + return ret; > + > + mode.type = HFI_BUFFER_OUTPUT2; > + > + return hfi_session_set_property(inst, ptype, &mode); The function now sets HFI_BUFFER_OUTPUT2 in addition to HFI_BUFFER_OUTPUT only, as set by orignal code. Is it intentional? I guess we could have this mentioned in commit message. Best regards, Tomasz