Message ID | 20230228-topic-venus-v1-1-58c2c88384e9@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3079219wrd; Tue, 28 Feb 2023 07:26:00 -0800 (PST) X-Google-Smtp-Source: AK7set91rcEcsCRANblS+SDLJKTmOAZo2xxexigmi4udpEy5Rl0h839yjGP4XlAB9S7WJm8QGFR+ X-Received: by 2002:a17:907:2cc4:b0:8a9:e031:c4b7 with SMTP id hg4-20020a1709072cc400b008a9e031c4b7mr3637790ejc.4.1677597960291; Tue, 28 Feb 2023 07:26:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677597960; cv=none; d=google.com; s=arc-20160816; b=ZH0ZAGqjwSrRdnIT+4YwcIwnRODTxiAhQtjwfmm4olavs/nGed6+5leLL3Ip0Jgtsf PtsUxW9mrRNrUxlXyUA1KTBjayGANAbOqiuCjgn2kU1TtXuDq112Sjga+cGmJajiq4zM +BDT1Zqaw7r/E6UsDEJavJVrsDUpmdLSRFRqVGiZNZgotafBoe8sszY/VKZCPTEh94CR VpDeZepxk47/TBHQFfpox6zOQ/9jLigwbFozA1p40/n0PaAwgNqZDHu7rmpqUwiJoW47 IvgtkGO6UTIAz5RSX0m6LAJ06KoJYt5BX3yMRvPx6cvbFTY0Ihae7yU62xZdM0xxoihU Zr/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=qXugSA6r2tV+X0iFO+lGhptFx82s88fjNq0jEwrsdR0=; b=gqI4fAUu5UXp8HppOv0TOlugXpG5pb+v9ICQa0oX/McY4rkJJV7it+L+WsW3yzZ7oO TadHVdGBytNdocIX42R2AdGrg3p4e5Kgcv9+1g3G1p1NfVEqmE93qNbYZSN2vy6kl1qh C4VsxtRa/zh7gIQ+iZv8d6mhupL1nE2zyOFErOyZNqmPzspp0/HtALi2Up7nG72jdRrU w8zgk16/JTw1rl6Eg6NU1e6bSuF9w7uqbyJJMjAskO4mxPz9jOM+mWS04JYr6ChtMYID Rs899nRy8yPwz/TZnhgzJQTp0N5SD2UyhEYNnO9Z8CqnC3Y14T7hygX6SpIbehK78K7A /iAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPRIrotI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gv6-20020a1709072bc600b008b17bca9226si422402ejc.312.2023.02.28.07.25.38; Tue, 28 Feb 2023 07:26:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPRIrotI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbjB1PYt (ORCPT <rfc822;brysonjbanks@gmail.com> + 99 others); Tue, 28 Feb 2023 10:24:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbjB1PYk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 28 Feb 2023 10:24:40 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3680F23DBC for <linux-kernel@vger.kernel.org>; Tue, 28 Feb 2023 07:24:37 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id f41so13645403lfv.13 for <linux-kernel@vger.kernel.org>; Tue, 28 Feb 2023 07:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677597875; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qXugSA6r2tV+X0iFO+lGhptFx82s88fjNq0jEwrsdR0=; b=RPRIrotIE+koozd7vn/zocKpX5RSWm/6VDAD2UGrFh0IctGRRyHRnEGh+sSpoDTvRW ksd+hq83BAcnNyvyyxR8mcsHaW5kTw/hPn4rRjxpwpe74lDJvyKE5XReeUYZE3shedp/ FuNQw5+aYrryJlzGHXh+uUgxQvl2+MQpfSdpBNzfZX0nL3d6mwJI+J/Bd+gZUSVEUP2U VvrFr+johfkEaj7kJ0rmBFYyB+dj2egWh1mSU3QbsPC1ZMeft4JFzA/GQePiQc0GzxFP 0mi71GPNpc+ULpMi7owlLwbtBaG3rHwr9lYsUy/dRKxNpoDIVSg7E42CWllIVB4d2OA8 9BZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677597875; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qXugSA6r2tV+X0iFO+lGhptFx82s88fjNq0jEwrsdR0=; b=z6WO7U3UARtlSGFTLQ9XctJBGi8/jlmUAL8ZypKb66svJ9HsEJkh27pKzhSNEdBHFt AfgIYArY1ia1jbYhHzPXmYJoLM2Wo0tHVeEMeHWLq9CsGUmTLmU/8FTmIk5F/M5EajD5 /h40hZu9tdl9RRDjR9Vjm4xPIwz9vbqfltNd7o7WQn21oagNWurhCiKlvhMLj0e6s07m eA+9UpWNdO/TlIlmDqn626lBxqtScozr1lGbziH9n8iHNVppxjxr6aIa7H4knihz8kwu 1ATYFeX6wjlfx8Jr2sJWDPdj1b4cbMUd+P8bAO1rP00QG5fBMkIzl/iNrVgL2bd5IJlw lzTA== X-Gm-Message-State: AO0yUKVZqCacZofUFKJ81/fnDUL1WMvTvFb/uODo3qp5aN7Wy/qW555y W817wfsRstOicsQHuZD5ElAgVg== X-Received: by 2002:ac2:5df8:0:b0:4df:998d:79d7 with SMTP id z24-20020ac25df8000000b004df998d79d7mr771300lfq.8.1677597875450; Tue, 28 Feb 2023 07:24:35 -0800 (PST) Received: from [192.168.1.101] (abym99.neoplus.adsl.tpnet.pl. [83.9.32.99]) by smtp.gmail.com with ESMTPSA id h17-20020ac250d1000000b004db3aa3c542sm1363688lfm.47.2023.02.28.07.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 07:24:35 -0800 (PST) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Tue, 28 Feb 2023 16:24:25 +0100 Subject: [PATCH 01/18] media: venus: hfi_venus: Set venus_sys_idle_indicator to false on V6 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230228-topic-venus-v1-1-58c2c88384e9@linaro.org> References: <20230228-topic-venus-v1-0-58c2c88384e9@linaro.org> In-Reply-To: <20230228-topic-venus-v1-0-58c2c88384e9@linaro.org> To: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Dikshita Agarwal <dikshita@qti.qualcomm.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Dikshita Agarwal <dikshita@codeaurora.org>, Mansur Alisha Shaik <mansur@codeaurora.org>, Jonathan Marek <jonathan@marek.ca> Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Stanimir Varbanov <stanimir.varbanov@linaro.org>, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Vikash Garodia <vgarodia@codeaurora.org>, Konrad Dybcio <konrad.dybcio@linaro.org> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677597872; l=1210; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=l21Hj3clKvJ5WDgOnhsicYzRTtdql9epuJV12nTy5r8=; b=WE/7f4vV02g5I5rmyHXeuw4wZOzwD2LPxcq1Q+IVLDzZ+6E2EdCHTjVF6JVDiYpFBH2ghcDOvGJx 1Bj0zUymCybQ0fyG7CTW50knq8ZpeeEk14URBba4rDbYpJ6L6gOl X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759088958934454291?= X-GMAIL-MSGID: =?utf-8?q?1759088958934454291?= |
Series |
Venus QoL / maintainability fixes
|
|
Commit Message
Konrad Dybcio
Feb. 28, 2023, 3:24 p.m. UTC
This call does not seem to have been cast on any kernel with support
for VPU-1.0 or newer (and by extension, HFI6 and newer). Restrict it
to V4 only, as it seems to have been enabled by mistake and causes a
hang & reboot to EDL on at least one occasion with SM6115 / AR50L
Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/media/platform/qcom/venus/hfi_venus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 28/02/2023 15:24, Konrad Dybcio wrote: > This call does not seem to have been cast on any kernel with support > for VPU-1.0 or newer (and by extension, HFI6 and newer). We tested this on sm8250 Restrict it > to V4 only, as it seems to have been enabled by mistake and causes a > hang & reboot to EDL on at least one occasion with SM6115 / AR50L > > Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations") > Signed-off-by: Konrad Dybcio<konrad.dybcio@linaro.org> Right. This may indeed fix it for you on SM6115, could you test it on RB5 and verify the above statement ? --- bod
On 28/02/2023 15:26, Bryan O'Donoghue wrote: > On 28/02/2023 15:24, Konrad Dybcio wrote: >> This call does not seem to have been cast on any kernel with support >> for VPU-1.0 or newer (and by extension, HFI6 and newer). > > We tested this on sm8250 > > Restrict it >> to V4 only, as it seems to have been enabled by mistake and causes a >> hang & reboot to EDL on at least one occasion with SM6115 / AR50L >> >> Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to >> existing IS_V4() if locations") >> Signed-off-by: Konrad Dybcio<konrad.dybcio@linaro.org> > > Right. This may indeed fix it for you on SM6115, could you test it on > RB5 and verify the above statement ? > > --- > bod For example. Doesn't your later patch take account of VPU h/w version ? IRIS_1, IRIS_2 etc. When we added for V6 here, we meant for current tested V6 hardware at that point - at least sm8250. Can you not differentiate sm6115 based on VPU hardware identifier ? We want to retain this logic for 8250 and then assuming your patch is correct, not do this for sm6115. --- bod
On 28.02.2023 16:31, Bryan O'Donoghue wrote: > On 28/02/2023 15:26, Bryan O'Donoghue wrote: >> On 28/02/2023 15:24, Konrad Dybcio wrote: >>> This call does not seem to have been cast on any kernel with support >>> for VPU-1.0 or newer (and by extension, HFI6 and newer). >> >> We tested this on sm8250 >> >> Restrict it >>> to V4 only, as it seems to have been enabled by mistake and causes a >>> hang & reboot to EDL on at least one occasion with SM6115 / AR50L >>> >>> Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations") >>> Signed-off-by: Konrad Dybcio<konrad.dybcio@linaro.org> >> >> Right. This may indeed fix it for you on SM6115, could you test it on RB5 and verify the above statement ? >> >> --- >> bod > > For example. > > Doesn't your later patch take account of VPU h/w version ? IRIS_1, IRIS_2 etc. > > When we added for V6 here, we meant for current tested V6 hardware at that point - at least sm8250. > > Can you not differentiate sm6115 based on VPU hardware identifier ? We want to retain this logic for 8250 and then assuming your patch is correct, not do this for sm6115. As far as my only source of information (msm-4.19 techpack) goes, this is unnecessary/incorrect on 8250 as well. I doubt downstream would ship Venus with no/broken low-power modes.. Konrad > > --- > bod
On 28/02/2023 15:37, Konrad Dybcio wrote: > > > On 28.02.2023 16:31, Bryan O'Donoghue wrote: >> On 28/02/2023 15:26, Bryan O'Donoghue wrote: >>> On 28/02/2023 15:24, Konrad Dybcio wrote: >>>> This call does not seem to have been cast on any kernel with support >>>> for VPU-1.0 or newer (and by extension, HFI6 and newer). >>> >>> We tested this on sm8250 >>> >>> Restrict it >>>> to V4 only, as it seems to have been enabled by mistake and causes a >>>> hang & reboot to EDL on at least one occasion with SM6115 / AR50L >>>> >>>> Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations") >>>> Signed-off-by: Konrad Dybcio<konrad.dybcio@linaro.org> >>> >>> Right. This may indeed fix it for you on SM6115, could you test it on RB5 and verify the above statement ? >>> >>> --- >>> bod >> >> For example. >> >> Doesn't your later patch take account of VPU h/w version ? IRIS_1, IRIS_2 etc. >> >> When we added for V6 here, we meant for current tested V6 hardware at that point - at least sm8250. >> >> Can you not differentiate sm6115 based on VPU hardware identifier ? We want to retain this logic for 8250 and then assuming your patch is correct, not do this for sm6115. > As far as my only source of information (msm-4.19 techpack) goes, this is > unnecessary/incorrect on 8250 as well. I doubt downstream would ship Venus > with no/broken low-power modes.. Can you test it and make sure ? --- bod
On 28.02.2023 16:38, Bryan O'Donoghue wrote: > On 28/02/2023 15:37, Konrad Dybcio wrote: >> >> >> On 28.02.2023 16:31, Bryan O'Donoghue wrote: >>> On 28/02/2023 15:26, Bryan O'Donoghue wrote: >>>> On 28/02/2023 15:24, Konrad Dybcio wrote: >>>>> This call does not seem to have been cast on any kernel with support >>>>> for VPU-1.0 or newer (and by extension, HFI6 and newer). >>>> >>>> We tested this on sm8250 >>>> >>>> Restrict it >>>>> to V4 only, as it seems to have been enabled by mistake and causes a >>>>> hang & reboot to EDL on at least one occasion with SM6115 / AR50L >>>>> >>>>> Fixes: 7ed9e0b3393c ("media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations") >>>>> Signed-off-by: Konrad Dybcio<konrad.dybcio@linaro.org> >>>> >>>> Right. This may indeed fix it for you on SM6115, could you test it on RB5 and verify the above statement ? >>>> >>>> --- >>>> bod >>> >>> For example. >>> >>> Doesn't your later patch take account of VPU h/w version ? IRIS_1, IRIS_2 etc. >>> >>> When we added for V6 here, we meant for current tested V6 hardware at that point - at least sm8250. >>> >>> Can you not differentiate sm6115 based on VPU hardware identifier ? We want to retain this logic for 8250 and then assuming your patch is correct, not do this for sm6115. >> As far as my only source of information (msm-4.19 techpack) goes, this is >> unnecessary/incorrect on 8250 as well. I doubt downstream would ship Venus >> with no/broken low-power modes.. > > Can you test it and make sure ? As I mentioned in the cover letter, 8250 still seems to work with this patchset. I have no idea how one would go about validating the functionality enabled through this call. Konrad > > --- > bod >
On 28/02/2023 15:41, Konrad Dybcio wrote: >> Can you test it and make sure ? > As I mentioned in the cover letter, 8250 still seems to work with this > patchset. I have no idea how one would go about validating the > functionality enabled through this call. We offlined about this. I think it is correct to say you don't have access to a display to test this on sm8250. I do so, I will try this out for you, though I'll wait for your V2 for this series. --- bod
On 2/28/2023 10:23 PM, Bryan O'Donoghue wrote: > On 28/02/2023 15:41, Konrad Dybcio wrote: >>> Can you test it and make sure ? >> As I mentioned in the cover letter, 8250 still seems to work with this >> patchset. I have no idea how one would go about validating the >> functionality enabled through this call. > > We offlined about this. > > I think it is correct to say you don't have access to a display to > test this on sm8250. > > I do so, I will try this out for you, though I'll wait for your V2 for > this series. > > --- > bod Hi Konrad, I understand from your commit text, setting this indicator for AR50L is causing issue with suspend. Ideally it shouldn't cause any such issue. I checked with FW team and got to know that this property is not supported on AR50LT so if you set it there should be some property not supported error. In my opinion it would be good to replace these versions checks with VPU version check you have introduced in your other patch and keep this setting for current targets and not set wherever not needed eg AR50LT. Thanks, Dikshita
On 2.03.2023 07:39, Dikshita Agarwal wrote: > > On 2/28/2023 10:23 PM, Bryan O'Donoghue wrote: >> On 28/02/2023 15:41, Konrad Dybcio wrote: >>>> Can you test it and make sure ? >>> As I mentioned in the cover letter, 8250 still seems to work with this >>> patchset. I have no idea how one would go about validating the >>> functionality enabled through this call. >> >> We offlined about this. >> >> I think it is correct to say you don't have access to a display to test this on sm8250. >> >> I do so, I will try this out for you, though I'll wait for your V2 for this series. >> >> --- >> bod > > Hi Konrad, > > I understand from your commit text, setting this indicator for AR50L is causing issue with suspend. > > Ideally it shouldn't cause any such issue. I checked with FW team and got to know that this property is not supported on AR50LT so if you set it there should be some property not supported error. > > In my opinion it would be good to replace these versions checks with VPU version check you have introduced in your other patch and keep this setting for current targets and not set wherever not needed eg AR50LT. Okay, I have two questions then: 1. Can the firmware team confirm it shouldn't crash on a fw tag that's close to VIDEO.VE.6.0-00042-PROD-1? 2. Are there any other SoCs that SYS_IDLE is not supported on? It hasn't been sent to the hardware by the vidc driver for any SoC using the downstream vidc (NOT the legacy vidc_3x) driver starting with msm-4.14, AFAICS.. check out this link: https://github.com/sonyxperiadev/kernel/commit/8889a7d26943e96eae2f318f87b15efa4b907f28 Konrad > > Thanks, > > Dikshita >
On 3/2/2023 5:03 PM, Konrad Dybcio wrote: > > On 2.03.2023 07:39, Dikshita Agarwal wrote: >> On 2/28/2023 10:23 PM, Bryan O'Donoghue wrote: >>> On 28/02/2023 15:41, Konrad Dybcio wrote: >>>>> Can you test it and make sure ? >>>> As I mentioned in the cover letter, 8250 still seems to work with this >>>> patchset. I have no idea how one would go about validating the >>>> functionality enabled through this call. >>> We offlined about this. >>> >>> I think it is correct to say you don't have access to a display to test this on sm8250. >>> >>> I do so, I will try this out for you, though I'll wait for your V2 for this series. >>> >>> --- >>> bod >> Hi Konrad, >> >> I understand from your commit text, setting this indicator for AR50L is causing issue with suspend. >> >> Ideally it shouldn't cause any such issue. I checked with FW team and got to know that this property is not supported on AR50LT so if you set it there should be some property not supported error. >> >> In my opinion it would be good to replace these versions checks with VPU version check you have introduced in your other patch and keep this setting for current targets and not set wherever not needed eg AR50LT. > Okay, I have two questions then: > > 1. Can the firmware team confirm it shouldn't crash on a fw tag > that's close to VIDEO.VE.6.0-00042-PROD-1? > > 2. Are there any other SoCs that SYS_IDLE is not supported on? > It hasn't been sent to the hardware by the vidc driver for > any SoC using the downstream vidc (NOT the legacy vidc_3x) > driver starting with msm-4.14, AFAICS.. check out this link: > > https://github.com/sonyxperiadev/kernel/commit/8889a7d26943e96eae2f318f87b15efa4b907f28 > > Konrad Yes, that's correct, I have already confirmed from FW team that this idle check is always enabled in FW now. so driver doesn't have to set itexplicitly, that's why it works for you on 8250 I believe. So removing this setting seems fine. My only concern is that why we see a crash when setting it on AR50LT. Thanks, Dikshita >> Thanks, >> >> Dikshita >>
On 2.03.2023 07:39, Dikshita Agarwal wrote: > > On 2/28/2023 10:23 PM, Bryan O'Donoghue wrote: >> On 28/02/2023 15:41, Konrad Dybcio wrote: >>>> Can you test it and make sure ? >>> As I mentioned in the cover letter, 8250 still seems to work with this >>> patchset. I have no idea how one would go about validating the >>> functionality enabled through this call. >> >> We offlined about this. >> >> I think it is correct to say you don't have access to a display to test this on sm8250. >> >> I do so, I will try this out for you, though I'll wait for your V2 for this series. >> >> --- >> bod > > Hi Konrad, > > I understand from your commit text, setting this indicator for AR50L is causing issue with suspend. > > Ideally it shouldn't cause any such issue. I checked with FW team and got to know that this property is not supported on AR50LT so if you set it there should be some property not supported error. > > In my opinion it would be good to replace these versions checks with VPU version check you have introduced in your other patch and keep this setting for current targets and not set wherever not needed eg AR50LT. So.. I did *something* and I'm no longer getting a jump to EDL. The *something* being knocking off hfi_core_suspend(). If I send a sys_idle_indicator = true, I get (reformatted for better legibility): [ 0.576543] qcom-venus 5a00000.video-codec: VenusFW : <VFW_H:HostDr:unkn:--------:-> IMAGE_VARIANT_STRING=PROD [ 0.603818] qcom-venus 5a00000.video-codec: VenusFW : <VFW_H:HostDr:unkn:--------:-> OEM_IMAGE_VERSION_STRING=CRM [ 0.608633] qcom-venus 5a00000.video-codec: VenusFW : <VFW_H:HostDr:unkn:--------:-> BUILD_TIME: Mar 15 2021 04:24:58 [ 0.608644] qcom-venus 5a00000.video-codec: VenusFW : <VFW_L:HostDr:unkn:--------:-> Host cmd 0x10005 [ 0.608655] qcom-venus 5a00000.video-codec: VenusFW : <VFW_E:HostDr:unkn:--------:-> VenusHostDriver_SetSysProperty(1019): HostDriver: VenusHostDriver_SetSysProperty unsupport property! [ 0.608667] qcom-venus 5a00000.video-codec: VenusFW : <VFW_E:HostDr:unkn:--------:-> WaitForHWidle(408): VENUS is idle, no HW is running [ 0.650759] qcom-venus 5a00000.video-codec: VenusFW : <VFW_E:HostDr:unkn:--------:-> assert_loop(433): FW Assertion - Z:/b/venus_proc/venus/drivers/src/VenusHostDriver.c:1020:5ab9a Which then crashes Venus for good (perhaps we're missing a handler for such errors that would hard reset the hw), meaning trying to access it through ffmpeg will result in it never firing any IRQs, so no submitted commands ever complete. With this information, after uncommenting the hfi_core_suspend call and changing: [1] --- hfi_venus.c : venus_suspend_3xx() -- - venus_prepare_power_collapse(hdev, true); + venus_prepare_power_collapse(hdev, false); ---------------------------------------- I was able to test further. Turning the ARM9 core off messes with the sys_idle things. Perhaps some power sequencing is wrong. The diff I just mentioned comes from the fact that AR50L will never ever ever send a PC_PREP_DONE ack, or at least downstream never expects it (or any other HFI6XX target FWIW) to do so. Now, I also realized the adjacent set_power_control doesn't seem to be used at all on msm-4.19 techpack/video. Testing all the possible combinations, I get (to make it extra clear, with all the powerdown stuff in place and only diff [1] in place atop what I already had before): [set_idle_message] [set_power_control] [result] 0 0 - no crash at boot, venus doesn't work -> "Too many packets buffered for output stream 0:1." 0 1 - no crash at boot, ffmpeg hangs near vdec session init -> jump to EDL shortly after 1 0 - hang at boot, even before display subsys initializes -> platform totally hangs 1 1 - same as (1, 0), probably due to sys_idle_indicator being on -> platform totally hangs as well Perhaps (0, 0) is "good" and things can be worked up from there? Can you recheck with the firmware team if this is expected? Konrad > > Thanks, > > Dikshita >
On 30.03.2023 12:44, Vikash Garodia wrote: > On 3/24/2023 2:46 PM, Dikshita Agarwal wrote: >> >> >> On 3/20/2023 8:24 PM, Konrad Dybcio wrote: >>> On 2.03.2023 07:39, Dikshita Agarwal wrote: >>>> On 2/28/2023 10:23 PM, Bryan O'Donoghue wrote: >>>>> On 28/02/2023 15:41, Konrad Dybcio wrote: >>>>>>> Can you test it and make sure ? >>>>>> As I mentioned in the cover letter, 8250 still seems to work with this >>>>>> patchset. I have no idea how one would go about validating the >>>>>> functionality enabled through this call. >>>>> We offlined about this. >>>>> >>>>> I think it is correct to say you don't have access to a display to test this on sm8250. >>>>> >>>>> I do so, I will try this out for you, though I'll wait for your V2 for this series. >>>>> >>>>> --- >>>>> bod >>>> Hi Konrad, >>>> >>>> I understand from your commit text, setting this indicator for AR50L is causing issue with suspend. >>>> >>>> Ideally it shouldn't cause any such issue. I checked with FW team and got to know that this property is not supported on AR50LT so if you set it there should be some property not supported error. >>>> >>>> In my opinion it would be good to replace these versions checks with VPU version check you have introduced in your other patch and keep this setting for current targets and not set wherever not needed eg AR50LT. >>> So.. I did *something* and I'm no longer getting a jump to EDL. >>> >>> The *something* being knocking off hfi_core_suspend(). >>> >>> If I send a sys_idle_indicator = true, I get (reformatted for >>> better legibility): >>> >>> >>> [ 0.576543] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_H:HostDr:unkn:--------:-> IMAGE_VARIANT_STRING=PROD >>> >>> [ 0.603818] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_H:HostDr:unkn:--------:-> OEM_IMAGE_VERSION_STRING=CRM >>> >>> [ 0.608633] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_H:HostDr:unkn:--------:-> BUILD_TIME: Mar 15 2021 04:24:58 >>> >>> [ 0.608644] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_L:HostDr:unkn:--------:-> Host cmd 0x10005 >>> >>> [ 0.608655] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_E:HostDr:unkn:--------:-> VenusHostDriver_SetSysProperty(1019): HostDriver: VenusHostDriver_SetSysProperty unsupport property! >>> >>> [ 0.608667] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_E:HostDr:unkn:--------:-> WaitForHWidle(408): VENUS is idle, no HW is running >>> >>> [ 0.650759] qcom-venus 5a00000.video-codec: VenusFW : >>> <VFW_E:HostDr:unkn:--------:-> assert_loop(433): >>> FW Assertion - Z:/b/venus_proc/venus/drivers/src/VenusHostDriver.c:1020:5ab9a >> >> this "unsupported property" error and then the assert from FW is expected on AR50LT if driver sets HFI_PROPERTY_SYS_IDLE_INDICATOR to FW. >> >> As I mentioned in my other reply, this property doesn't need to be set by driver now, FW internally always enables it. >> >>> Which then crashes Venus for good (perhaps we're missing a >>> handler for such errors that would hard reset the hw), meaning >>> trying to access it through ffmpeg will result in it never firing >>> any IRQs, so no submitted commands ever complete. >>> >>> With this information, after uncommenting the hfi_core_suspend >>> call and changing: >>> >>> [1] >>> --- hfi_venus.c : venus_suspend_3xx() -- >>> >>> - venus_prepare_power_collapse(hdev, true); >>> + venus_prepare_power_collapse(hdev, false); >>> >>> ---------------------------------------- >>> >>> I was able to test further. Turning the ARM9 core off messes >>> with the sys_idle things. Perhaps some power sequencing is >>> wrong. The diff I just mentioned comes from the fact that >>> AR50L will never ever ever send a PC_PREP_DONE ack, or at >>> least downstream never expects it (or any other HFI6XX >>> target FWIW) to do so. >>> >>> >>> Now, I also realized the adjacent set_power_control doesn't seem to be used at >>> all on msm-4.19 techpack/video. Testing all the possible combinations, I get >>> (to make it extra clear, with all the powerdown stuff in place and only diff >>> [1] in place atop what I already had before): >>> >>> >>> [set_idle_message] [set_power_control] [result] >>> 0 0 - no crash at boot, venus doesn't work -> >>> "Too many packets buffered for output stream 0:1." >>> >>> 0 1 - no crash at boot, ffmpeg hangs near vdec session init -> >>> jump to EDL shortly after >>> >>> 1 0 - hang at boot, even before display subsys initializes -> >>> platform totally hangs >>> >>> 1 1 - same as (1, 0), probably due to sys_idle_indicator being on -> >>> platform totally hangs as well >>> >>> Perhaps (0, 0) is "good" and things can be worked up from there? >>> Can you recheck with the firmware team if this is expected? >> >> I will check regarding set_power_control(HFI_PROPERTY_SYS_CODEC_POWER_PLANE_CTRL) with FW team and get back. >> > HFI_PROPERTY_SYS_IDLE_INDICATOR is not supported beyond 8916 (which is versioned as V1 in video driver). This can be dropped. > > Since the property is not functionally active, it is upto firmware when they might decide to start error out as unsupported property. > > SYS_CODEC_POWER_PLANE_CTRL is supported for AR50/AR50L/IRIS1/2. It is a mandatory HFI to get the required power benefits. > > vcodec0 GDSC should be also configured as HW_CTRL while setting POWER_PLANE_CTRL to firmware. > Okay that's very good to know. To sum it up, the outcome you would expect is (more or less): - static bool venus_sys_idle_indicator = true; [...] - if(IS_V4(hdev->core) || IS_V6(hdev->core)) - venus_sys_idle_indicator = true; + venus_sys_idle_indicator = IS_V1(hdev->core); ? Konrad >> Thanks, >> >> Dikshita >> >>> Konrad >>>> Thanks, >>>> >>>> Dikshita >>>>
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 2ad40b3945b0..4ccf31147c2a 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -952,7 +952,7 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev) * enable it explicitly in order to make suspend functional by checking * WFI (wait-for-interrupt) bit. */ - if (IS_V4(hdev->core) || IS_V6(hdev->core)) + if (IS_V4(hdev->core)) venus_sys_idle_indicator = true; ret = venus_sys_set_idle_message(hdev, venus_sys_idle_indicator);