mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vikash Garodia <quic_vgarodia@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Luca Weiss <luca.weiss@fairphone.com>,
	Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	<cros-qcom-dts-watchers@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	<~postmarketos/upstreaming@lists.sr.ht>,
	<phone-devel@vger.kernel.org>, <linux-media@vger.kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common
Date: Fri, 24 Nov 2023 19:05:00 +0530	[thread overview]
Message-ID: <e6d80982-1674-d0c4-9dbe-94d77079f6ba@quicinc.com> (raw)
In-Reply-To: <CAA8EJppkjpMmcHCvxomgUMPxGpf77iN9roRvb=NEcxdk237-UA@mail.gmail.com>



On 11/24/2023 6:23 PM, Dmitry Baryshkov wrote:
> On Fri, 24 Nov 2023 at 14:30, Vikash Garodia <quic_vgarodia@quicinc.com> wrote:
>>
>> On 11/24/2023 5:05 PM, Luca Weiss wrote:
>>> On Fri Nov 24, 2023 at 7:38 AM CET, Vikash Garodia wrote:
>>>>
>>>> On 11/22/2023 7:50 PM, Luca Weiss wrote:
>>>>> On Wed Nov 22, 2023 at 2:17 PM CET, Vikash Garodia wrote:
>>>>>>
>>>>>> On 10/2/2023 7:50 PM, Luca Weiss wrote:
>>>>>>> If the video-firmware node is present, the venus driver assumes we're on
>>>>>>> a system that doesn't use TZ for starting venus, like on ChromeOS
>>>>>>> devices.
>>>>>>>
>>>>>>> Move the video-firmware node to chrome-common.dtsi so we can use venus
>>>>>>> on a non-ChromeOS devices.
>>>>>>>
>>>>>>> At the same time also disable the venus node by default in the dtsi,
>>>>>>> like it's done on other SoCs.
>>>>>>>
>>>>>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>>>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>>>>>> ---
>>>>>>>  arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 8 ++++++++
>>>>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi               | 6 ++----
>>>>>>>  2 files changed, 10 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
>>>>>>> index 5d462ae14ba1..cd491e46666d 100644
>>>>>>> --- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
>>>>>>> +++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
>>>>>>> @@ -104,6 +104,14 @@ &scm {
>>>>>>>   dma-coherent;
>>>>>>>  };
>>>>>>>
>>>>>>> +&venus {
>>>>>>> + status = "okay";
>>>>>>> +
>>>>>>> + video-firmware {
>>>>>>> +         iommus = <&apps_smmu 0x21a2 0x0>;
>>>>>>> + };
>>>>>>> +};
>>>>>>> +
>>>>>>>  &watchdog {
>>>>>>>   status = "okay";
>>>>>>>  };
>>>>>>> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>>>>>>> index 66f1eb83cca7..fa53f54d4675 100644
>>>>>>> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
>>>>>>> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>>>>>>> @@ -3740,6 +3740,8 @@ venus: video-codec@aa00000 {
>>>>>>>                            <&apps_smmu 0x2184 0x20>;
>>>> 0x2184 is a secure SID. I think qcm6490-fairphone-fp5.dts needs to override the
>>>> iommus property as well to retain only the non secure SID i.e 0x2180 ? I am
>>>> seeing below crash
>>>>
>>>> Call trace:
>>>> [   47.663593]  qcom_smmu_write_s2cr+0x64/0xa4
>>>> [   47.663616]  arm_smmu_attach_dev+0x120/0x284
>>>> [   47.663647]  __iommu_attach_device+0x24/0xf8
>>>> [   47.676845]  __iommu_device_set_domain+0x70/0xd0
>>>> [   47.681632]  __iommu_group_set_domain_internal+0x60/0x1b4
>>>> [   47.687218]  iommu_setup_default_domain+0x358/0x418
>>>> [   47.692258]  __iommu_probe_device+0x3e4/0x404
>>>>
>>>> Could you please reconfirm if Video SID 0x2184 (and mask) is allowed by the
>>>> qcm6490-fairphone-fp5 hardware having TZ ?
>>>
>>> Hi,
>>>
>>> On FP5 it seems it's no problem to have both SIDs in there, probe and
>>> using venus appears to work fine.
>>>
>>> Are you using different firmware than QCM6490.LA.3.0 on the device where
>>> you tested this?
>> I was testing this on RB3 board which uses firmware [1].
> 
> There is something wrong here.
> 
> RB3 board uses venus-5.2
> RB5 board uses vpu-1.0
> Only sc7280 uses vpu-2.0

Tested on QCM6490 IDP board, which is QCOM internal board similar to RB3 gen2.

>>
>> Regards,
>> Vikash
>>
>> [1]
>> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qcom/vpu-2.0
>>
>>>>
>>>>>>>                   memory-region = <&video_mem>;
>>>>>>>
>>>>>>> +                 status = "disabled";
>>>>>>> +
>>>>>>>                   video-decoder {
>>>>>>>                           compatible = "venus-decoder";
>>>>>>>                   };
>>>>>>> @@ -3748,10 +3750,6 @@ video-encoder {
>>>>>>>                           compatible = "venus-encoder";
>>>>>>>                   };
>>>>>>>
>>>>>>> -                 video-firmware {
>>>>>>> -                         iommus = <&apps_smmu 0x21a2 0x0>;
>>>>>>> -                 };
>>>>>>> -
>>>>>>>                   venus_opp_table: opp-table {
>>>>>>>                           compatible = "operating-points-v2";
>>>>>>>
>>>>>>>
>>>>>> Changes look good. Is this tested on SC7280 ?
>>>>>
>>>>> Hi Vikash,
>>>>>
>>>>> I didn't test it myself on sc7280 (just qcm6490-fp5) but dtx_diff
>>>>> reports no differences except for status = okay property being added, so
>>>>> there should be no change on those boards. See below.
>>>>>
>>>>> Regards
>>>>> Luca
>>>>
>>>> I tested on SC7280 (herobrine) and all good.
>>>
>>> Great, thanks!
>>>
>>> Regards
>>> Luca
>>>
>>>>
>>>> Regards,
>>>> Vikash
>>>
>>
> 
> 

  reply	other threads:[~2023-11-24 13:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 14:20 [PATCH v2 0/3] Enable venus on Fairphone 5 / non-ChromeOS sc7280 venus support Luca Weiss
2023-10-02 14:20 ` [PATCH v2 1/3] media: venus: core: Set up secure memory ranges for SC7280 Luca Weiss
2023-11-22 13:15   ` Vikash Garodia
2023-10-02 14:20 ` [PATCH v2 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common Luca Weiss
2023-11-22 13:17   ` Vikash Garodia
2023-11-22 14:20     ` Luca Weiss
2023-11-24  6:38       ` Vikash Garodia
2023-11-24 11:35         ` Luca Weiss
2023-11-24 12:29           ` Vikash Garodia
2023-11-24 12:53             ` Dmitry Baryshkov
2023-11-24 13:35               ` Vikash Garodia [this message]
2023-11-24 15:56                 ` Luca Weiss
2023-11-28  8:14                   ` Vikash Garodia
2023-12-01  9:30                     ` Luca Weiss
2023-10-02 14:20 ` [PATCH v2 3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable venus node Luca Weiss
2023-11-22 13:18   ` 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=e6d80982-1674-d0c4-9dbe-94d77079f6ba@quicinc.com \
    --to=quic_vgarodia@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=mchehab@kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=stanimir.k.varbanov@gmail.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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

all inboxes | Powered by JetHome®