From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Alexandre Courbot <acourbot@chromium.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Vikash Garodia <vgarodia@codeaurora.org>,
Mansur Alisha Shaik <mansur@codeaurora.org>,
Dikshita Agarwal <dikshita@codeaurora.org>
Subject: Re: [PATCH 3/3] media: hfi_venus: Request interrupt for sync cmds
Date: Wed, 25 Nov 2020 15:03:46 +0200 [thread overview]
Message-ID: <595f8e22-0616-ff8f-78f3-991ef94ebf65@linaro.org> (raw)
In-Reply-To: <CAPBb6MWsaHQtQYh8tQnGjwPCrCXeCnf08jL+yxM9ZkCBFNW5mg@mail.gmail.com>
On 11/25/20 10:08 AM, Alexandre Courbot wrote:
> On Fri, Nov 20, 2020 at 9:12 AM Stanimir Varbanov
> <stanimir.varbanov@linaro.org> wrote:
>>
>> From: Vikash Garodia <vgarodia@codeaurora.org>
>>
>> For synchronous commands, update the message queue variable.
>> This would inform video firmware to raise interrupt on host
>> CPU whenever there is a response for such commands.
>>
>> Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>> drivers/media/platform/qcom/venus/hfi_venus.c | 74 ++++++++++---------
>> 1 file changed, 41 insertions(+), 33 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
>> index 4be4a75ddcb6..b8fdb464ba9c 100644
>> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
>> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
>> @@ -372,7 +372,7 @@ static void venus_soft_int(struct venus_hfi_device *hdev)
>> }
>>
>> static int venus_iface_cmdq_write_nolock(struct venus_hfi_device *hdev,
>> - void *pkt)
>> + void *pkt, bool sync)
>> {
>> struct device *dev = hdev->core->dev;
>> struct hfi_pkt_hdr *cmd_packet;
>> @@ -397,15 +397,23 @@ static int venus_iface_cmdq_write_nolock(struct venus_hfi_device *hdev,
>> if (rx_req)
>> venus_soft_int(hdev);
>>
>> + /* Inform video firmware to raise interrupt for synchronous commands */
>> + queue = &hdev->queues[IFACEQ_MSG_IDX];
>> + if (sync) {
>> + queue->qhdr->rx_req = 1;
>> + /* ensure rx_req is updated in memory */
>> + wmb();
>> + }
>
> Wouldn't it be safer to do this before calling venus_soft_int()? I
> don't know what the firmware is supposed to do with rx_req but
> intuitively it looks like it should be set before we signal it.
>
I'll leave Vikash to comment. IMO this is a good suggestion.
<cut>
--
regards,
Stan
prev parent reply other threads:[~2020-11-25 13:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 0:10 [PATCH 0/3] Venus encoder improvements Stanimir Varbanov
2020-11-20 0:10 ` [PATCH 1/3] venus: venc: Init the session only once in queue_setup Stanimir Varbanov
2020-11-21 1:33 ` Fritz Koenig
2020-11-25 3:13 ` Alexandre Courbot
2020-11-26 23:50 ` Stanimir Varbanov
2020-12-01 12:22 ` dikshita
2020-11-20 0:10 ` [PATCH 2/3] venus: Limit HFI sessions to the maximum supported Stanimir Varbanov
2020-11-21 1:14 ` Fritz Koenig
2020-11-22 14:48 ` Stanimir Varbanov
2020-11-22 21:05 ` Fritz Koenig
2020-11-25 3:46 ` Alexandre Courbot
2020-11-25 13:01 ` Stanimir Varbanov
2020-11-26 6:28 ` Alexandre Courbot
2020-11-26 22:41 ` Stanimir Varbanov
2020-11-27 2:12 ` Alexandre Courbot
2020-11-20 0:10 ` [PATCH 3/3] media: hfi_venus: Request interrupt for sync cmds Stanimir Varbanov
2020-11-21 1:02 ` Fritz Koenig
2020-11-22 14:49 ` Stanimir Varbanov
2020-11-25 8:08 ` Alexandre Courbot
2020-11-25 13:03 ` Stanimir Varbanov [this message]
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=595f8e22-0616-ff8f-78f3-991ef94ebf65@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=acourbot@chromium.org \
--cc=dikshita@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mansur@codeaurora.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;
as well as URLs for NNTP newsgroup(s).