From: Vikash Garodia <vgarodia@codeaurora.org>
To: Alexandre Courbot <acourbot@chromium.org>
Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-msm@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
linux-media-owner@vger.kernel.org
Subject: Re: [PATCH v4 24/27] venus: helpers: move frame size calculations on common place
Date: Mon, 02 Jul 2018 15:05:20 +0530 [thread overview]
Message-ID: <4e22af7d7ef9037996b606892ed25b36@codeaurora.org> (raw)
In-Reply-To: <CAPBb6MVPrparfoAMaVwsDrwPO1K8cnWb24WdZFGeU5aoEqDt5w@mail.gmail.com>
On 2018-07-02 14:16, Alexandre Courbot wrote:
> On Thu, Jun 28, 2018 at 12:28 AM Stanimir Varbanov
> <stanimir.varbanov@linaro.org> wrote:
>>
>> This move the calculations of raw and compressed buffer sizes
>> on common helper and make it identical for encoder and decoder.
>>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>> drivers/media/platform/qcom/venus/helpers.c | 98
>> +++++++++++++++++++++++++++++
>> drivers/media/platform/qcom/venus/helpers.h | 2 +
>> drivers/media/platform/qcom/venus/vdec.c | 54 ++++------------
>> drivers/media/platform/qcom/venus/venc.c | 56 ++++-------------
>> 4 files changed, 126 insertions(+), 84 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/helpers.c
>> b/drivers/media/platform/qcom/venus/helpers.c
>> index 6b31c91528ed..a342472ae2f0 100644
>> --- a/drivers/media/platform/qcom/venus/helpers.c
>> +++ b/drivers/media/platform/qcom/venus/helpers.c
>> @@ -452,6 +452,104 @@ int venus_helper_get_bufreq(struct venus_inst
>> *inst, u32 type,
>> }
>> EXPORT_SYMBOL_GPL(venus_helper_get_bufreq);
>>
>> +static u32 get_framesize_raw_nv12(u32 width, u32 height)
>> +{
>> + u32 y_stride, uv_stride, y_plane;
>> + u32 y_sclines, uv_sclines, uv_plane;
>> + u32 size;
>> +
>> + y_stride = ALIGN(width, 128);
>> + uv_stride = ALIGN(width, 128);
>> + y_sclines = ALIGN(height, 32);
>> + uv_sclines = ALIGN(((height + 1) >> 1), 16);
>> +
>> + y_plane = y_stride * y_sclines;
>> + uv_plane = uv_stride * uv_sclines + SZ_4K;
>> + size = y_plane + uv_plane + SZ_8K;
>
> Do you know the reason for this extra 8K at the end?
As explained about the hardware requirement over bug [1], 8k is not
needed.
I am working on a patch to fix the alignment requirement for ubwc format
as
well.
In downstream driver, this 8k was added to accomodate the video
extradata.
[1] https://partnerissuetracker.corp.google.com/u/1/issues/110448791
next prev parent reply other threads:[~2018-07-02 9:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 15:26 [PATCH v4 00/27] Venus updates Stanimir Varbanov
2018-06-27 15:26 ` [PATCH v4 01/27] venus: hfi_msgs: correct pointer increment Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 02/27] venus: hfi: preparation to support venus 4xx Stanimir Varbanov
2018-07-02 8:45 ` Alexandre Courbot
2018-07-02 12:35 ` Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 03/27] venus: hfi: update sequence event to handle more properties Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 04/27] venus: hfi_cmds: add set_properties for 4xx version Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 05/27] venus: hfi: support session continue " Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 06/27] venus: hfi: handle buffer output2 type as well Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 07/27] venus: hfi_venus: add halt AXI support for Venus 4xx Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 08/27] venus: hfi_venus: fix suspend function for venus 3xx versions Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 09/27] venus: hfi_venus: move set of default properties to core init Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 10/27] venus: hfi_venus: add suspend functionality for Venus 4xx Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 11/27] venus: core,helpers: add two more clocks found in " Stanimir Varbanov
2018-07-02 8:45 ` Alexandre Courbot
2018-07-02 14:01 ` Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 12/27] venus: hfi_parser: add common capability parser Stanimir Varbanov
2018-07-02 8:45 ` Alexandre Courbot
2018-06-27 15:27 ` [PATCH v4 13/27] venus: helpers: rename a helper function and use buffer mode from caps Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 14/27] venus: helpers: add a helper function to set dynamic buffer mode Stanimir Varbanov
2018-07-02 8:45 ` Alexandre Courbot
2018-06-27 15:27 ` [PATCH v4 15/27] venus: helpers: add helper function to set actual buffer size Stanimir Varbanov
2018-07-02 8:45 ` Alexandre Courbot
2018-06-27 15:27 ` [PATCH v4 16/27] venus: core: delete not used buffer mode flags Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 17/27] venus: helpers: add buffer type argument to a helper Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 18/27] venus: helpers: add a new helper to set raw format Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 19/27] venus: helpers,vdec,venc: add helpers to set work mode and core usage Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 20/27] venus: helpers: extend set_num_bufs helper with one more argument Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 21/27] venus: helpers: add a helper to return opb buffer sizes Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 22/27] venus: vdec: get required input buffers as well Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 23/27] venus: vdec: a new function for output configuration Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 24/27] venus: helpers: move frame size calculations on common place Stanimir Varbanov
2018-07-02 8:46 ` Alexandre Courbot
2018-07-02 9:35 ` Vikash Garodia [this message]
2018-07-02 9:37 ` Tomasz Figa
2018-06-27 15:27 ` [PATCH v4 25/27] venus: implementing multi-stream support Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 26/27] venus: core: add sdm845 DT compatible and resource data Stanimir Varbanov
2018-06-27 15:27 ` [PATCH v4 27/27] venus: add HEVC codec support Stanimir Varbanov
2018-07-02 8:45 ` [PATCH v4 00/27] Venus updates Alexandre Courbot
2018-07-02 15:25 ` Stanimir Varbanov
2018-07-03 8:49 ` Alexandre Courbot
2018-07-05 10:16 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e22af7d7ef9037996b606892ed25b36@codeaurora.org \
--to=vgarodia@codeaurora.org \
--cc=acourbot@chromium.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media-owner@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stanimir.varbanov@linaro.org \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.