From: Vikash Garodia <vgarodia@codeaurora.org>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: hverkuil@xs4all.nl, mchehab@kernel.org, andy.gross@linaro.org,
bjorn.andersson@linaro.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-soc@vger.kernel.org, acourbot@google.com,
linux-media-owner@vger.kernel.org
Subject: Re: [PATCH 3/4] venus: add check to make scm calls
Date: Wed, 23 May 2018 11:00:59 +0530 [thread overview]
Message-ID: <7ec3133c8fd5599ca3cb538cddf846c4@codeaurora.org> (raw)
In-Reply-To: <f9f99014-526d-d23b-6eaf-c04e45bef10a@linaro.org>
Hi Stan,
On 2018-05-23 02:27, Stanimir Varbanov wrote:
> Hi Jordan,
>
> On 22.05.2018 22:50, Jordan Crouse wrote:
>> On Tue, May 22, 2018 at 04:04:51PM +0300, Stanimir Varbanov wrote:
>>> Hi Vikash,
>>>
>>> On 05/17/2018 02:32 PM, Vikash Garodia wrote:
>>>> In order to invoke scm calls, ensure that the platform
>>>> has the required support to invoke the scm calls in
>>>> secure world. This code is in preparation to add PIL
>>>> functionality in venus driver.
>>>>
>>>> Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
>>>> ---
>>>> drivers/media/platform/qcom/venus/hfi_venus.c | 26
>>>> +++++++++++++++++++-------
>>>> 1 file changed, 19 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c
>>>> b/drivers/media/platform/qcom/venus/hfi_venus.c
>>>> index f61d34b..9bcce94 100644
>>>> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
>>>> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
>>>> @@ -27,6 +27,7 @@
>>>> #include "hfi_msgs.h"
>>>> #include "hfi_venus.h"
>>>> #include "hfi_venus_io.h"
>>>> +#include "firmware.h"
>>>> #define HFI_MASK_QHDR_TX_TYPE 0xff000000
>>>> #define HFI_MASK_QHDR_RX_TYPE 0x00ff0000
>>>> @@ -570,13 +571,19 @@ static int venus_halt_axi(struct
>>>> venus_hfi_device *hdev)
>>>> static int venus_power_off(struct venus_hfi_device *hdev)
>>>> {
>>>> int ret;
>>>> + void __iomem *reg_base;
>>>> if (!hdev->power_enabled)
>>>> return 0;
>>>> - ret = qcom_scm_set_remote_state(TZBSP_VIDEO_STATE_SUSPEND, 0);
>>>> - if (ret)
>>>> - return ret;
>>>> + if (qcom_scm_is_available()) {
>>>> + ret = qcom_scm_set_remote_state(TZBSP_VIDEO_STATE_SUSPEND, 0);
>>>
>>> I think it will be clearer if we abstract qcom_scm_set_remote_state
>>> to
>>> something like venus_set_state(SUSPEND|RESUME) in firmware.c and
>>> export
>>> the functions to be used here.
>>
>> This specific function is a little odd because the SCM function got
>> overloaded
>> and used as a hardware workaround for the adreno a5xx zap shader.
>>
>> When we added it for the GPU we knew the day would come that we would
>> need it
>> for Venus so we kept the name purposely generic. You can wrap if if
>> you want
>> but just know that there are other non video entities out there using
>> it.
>
> Sorry I wasn't clear, by abstract it I meant to introduce a new
> venus_set_state function in venus/firmware.c where we'll select
> tz/non-tz functions for suspend / resume depending on the
> configuration.
Yes, that's a good idea to abstract the decision to use tz or non-tz way
as much
as possible to firmware.c. Will add this in my next patch.
> regards,
> Stan
next prev parent reply other threads:[~2018-05-23 5:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 11:32 [PATCH 0/4] Venus updates - PIL Vikash Garodia
2018-05-17 11:32 ` [PATCH 1/4] soc: qcom: mdt_loader: Add check to make scm calls Vikash Garodia
2018-05-17 15:50 ` Jordan Crouse
2018-05-18 5:28 ` Bjorn Andersson
2018-05-18 7:18 ` Vikash Garodia
2018-05-17 11:32 ` [PATCH 2/4] media: venus: add a routine to reset ARM9 Vikash Garodia
2018-05-17 15:57 ` Jordan Crouse
2018-05-17 11:32 ` [PATCH 3/4] venus: add check to make scm calls Vikash Garodia
2018-05-22 13:04 ` Stanimir Varbanov
2018-05-22 19:50 ` Jordan Crouse
2018-05-22 20:57 ` Stanimir Varbanov
2018-05-23 5:30 ` Vikash Garodia [this message]
2018-05-17 11:32 ` [PATCH 4/4] media: venus: add PIL support Vikash Garodia
2018-05-18 0:40 ` Trilok Soni
2018-05-18 12:20 ` Vikash Garodia
2018-05-22 13:02 ` Stanimir Varbanov
2018-05-22 15:52 ` Stanimir Varbanov
2018-06-01 6:53 ` Vikash Garodia
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=7ec3133c8fd5599ca3cb538cddf846c4@codeaurora.org \
--to=vgarodia@codeaurora.org \
--cc=acourbot@google.com \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.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=linux-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stanimir.varbanov@linaro.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.