From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Alexandre Courbot <acourbot@chromium.org>
Cc: 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, vgarodia@codeaurora.org,
Tomasz Figa <tfiga@chromium.org>
Subject: Re: [PATCH v4 11/27] venus: core,helpers: add two more clocks found in Venus 4xx
Date: Mon, 2 Jul 2018 17:01:17 +0300 [thread overview]
Message-ID: <e5b99cec-6401-32ee-57d2-7feafaaa5a11@linaro.org> (raw)
In-Reply-To: <CAPBb6MVToYzWhmbjU-M6g2CjwMzWyF97k2WqcUBFA+zTq6uhdg@mail.gmail.com>
Hi Alex,
Thanks for the review!
On 07/02/2018 11:45 AM, Alexandre Courbot wrote:
> On Thu, Jun 28, 2018 at 12:34 AM Stanimir Varbanov
> <stanimir.varbanov@linaro.org> wrote:
>>
>> Add two more clocks for Venus 4xx in core structure and create
>> a new power enable function to handle it for 3xx/4xx versions.
>>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>> drivers/media/platform/qcom/venus/core.h | 4 +++
>> drivers/media/platform/qcom/venus/helpers.c | 51 +++++++++++++++++++++++++++++
>> drivers/media/platform/qcom/venus/helpers.h | 2 ++
>> drivers/media/platform/qcom/venus/vdec.c | 44 ++++++++++++++++++++-----
>> drivers/media/platform/qcom/venus/venc.c | 44 ++++++++++++++++++++-----
>> 5 files changed, 129 insertions(+), 16 deletions(-)
>>
<snip>
>> @@ -1131,15 +1137,21 @@ static int vdec_remove(struct platform_device *pdev)
>> static __maybe_unused int vdec_runtime_suspend(struct device *dev)
>> {
>> struct venus_core *core = dev_get_drvdata(dev);
>> + int ret;
>>
>> - if (core->res->hfi_version == HFI_VERSION_1XX)
>> + if (IS_V1(core))
>> return 0;
>>
>> - writel(0, core->base + WRAPPER_VDEC_VCODEC_POWER_CONTROL);
>> + ret = venus_helper_power_enable(core, VIDC_SESSION_TYPE_DEC, true);
>> +
>> + if (IS_V4(core))
>> + clk_disable_unprepare(core->core0_bus_clk);
>> +
>> clk_disable_unprepare(core->core0_clk);
>> - writel(1, core->base + WRAPPER_VDEC_VCODEC_POWER_CONTROL);
>>
>> - return 0;
>> + ret |= venus_helper_power_enable(core, VIDC_SESSION_TYPE_DEC, false);
>
> Is it safe to OR two potentially different error messages, at the risk
> of getting a third one that is different?
venus_helper_power_enable can return zero or ETIMEDOUT, but ...
>
> If venus_helper_power_enable() fails, shouldn't we just exit early and
> signify that the suspend operation failed?
>
I had the same comment from Tomasz, hence maybe I'm wrong :) so I will
re-work that and will exit early if error.
--
regards,
Stan
next prev parent reply other threads:[~2018-07-02 14:01 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 [this message]
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
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=e5b99cec-6401-32ee-57d2-7feafaaa5a11@linaro.org \
--to=stanimir.varbanov@linaro.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@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tfiga@chromium.org \
--cc=vgarodia@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox