Linux-Media Archive mirror
 help / color / mirror / Atom feed
From: Marc Gonzalez <mgonzalez@freebox.fr>
To: DT <devicetree@vger.kernel.org>,
	linux-media <linux-media@vger.kernel.org>,
	MSM <linux-arm-msm@vger.kernel.org>
Cc: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
	Vikash Garodia <quic_vgarodia@quicinc.com>,
	Bryan O Donoghue <bryan.odonoghue@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Pierre-Hugues Husson <phh@phh.me>
Subject: [RFC WIP PATCH] venus: add qcom,no-low-power property
Date: Mon, 19 Feb 2024 18:18:55 +0100	[thread overview]
Message-ID: <0843621b-386b-4173-9e3c-9538cdb4641d@freebox.fr> (raw)

From: Pierre-Hugues Husson <phhusson@freebox.fr>

On our msm8998-based device, calling venus_sys_set_power_control()
breaks playback. Since the vendor kernel never calls it, we assume
it should not be called for this device/FW combo.

Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
---
TODO in v2: split the patch in 2
Is "qcom,no-low-power" a proper name for the property?
Is a boolean property the right approach?
---
 .../devicetree/bindings/media/qcom,venus-common.yaml     | 3 +++
 drivers/media/platform/qcom/venus/hfi_venus.c            | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml
index 3153d91f9d18a..69cb16dc4852c 100644
--- a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml
@@ -62,6 +62,9 @@ properties:
     required:
       - iommus
 
+  qcom,no-low-power:
+    type: boolean
+
 required:
   - reg
   - clocks
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index f9437b6412b91..2cd85a8cd837e 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -945,10 +945,11 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev)
 			dev_warn(dev, "setting idle response ON failed (%d)\n", ret);
 	}
 
-	ret = venus_sys_set_power_control(hdev, venus_fw_low_power_mode);
-	if (ret)
-		dev_warn(dev, "setting hw power collapse ON failed (%d)\n",
-			 ret);
+	if (!of_property_read_bool(dev->of_node, "qcom,no-low-power")) {
+		ret = venus_sys_set_power_control(hdev, venus_fw_low_power_mode);
+		if (ret)
+			dev_warn(dev, "setting hw power collapse ON failed (%d)\n", ret);
+	}
 
 	/* For specific venus core, it is mandatory to set the UBWC configuration */
 	if (res->ubwc_conf) {
-- 
2.34.1

             reply	other threads:[~2024-02-19 17:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 17:18 Marc Gonzalez [this message]
2024-02-19 17:28 ` [RFC WIP PATCH] venus: add qcom,no-low-power property Konrad Dybcio
2024-02-19 17:44   ` Dmitry Baryshkov
2024-02-19 19:24     ` Bryan O'Donoghue
2024-02-20 10:56       ` Marc Gonzalez
2024-02-20 11:21         ` Bryan O'Donoghue
2024-02-20 11:37           ` Krzysztof Kozlowski
2024-02-20 12:34             ` Marc Gonzalez
2024-02-20 13:27               ` Krzysztof Kozlowski
2024-02-20 13:53                 ` Vikash Garodia
2024-02-20 14:45                   ` Marc Gonzalez
2024-02-23 13:48                     ` Vikash Garodia
2024-02-26 13:09                       ` Marc Gonzalez
2024-02-26 14:30                         ` Vikash Garodia
2024-02-26 15:55                           ` Marc Gonzalez
2024-02-27  6:55                             ` Vikash Garodia
2024-02-27 16:11                               ` Marc Gonzalez
2024-02-29 15:32                                 ` Vikash Garodia
2024-02-29 16:24                                   ` Marc Gonzalez
2024-02-29 16:47                                     ` Jeffrey Hugo
2024-03-12 18:39                                     ` Konrad Dybcio
2024-04-10 10:24                                       ` Vikash Garodia
2024-04-08 15:39                                   ` Marc Gonzalez
2024-04-09 11:27                                     ` Bryan O'Donoghue
2024-04-09 14:09                                       ` Marc Gonzalez
2024-04-09 16:53                                       ` Marc Gonzalez
2024-04-10  8:17                                         ` Bryan O'Donoghue
2024-04-10 10:34                                           ` Vikash Garodia
2024-04-10 12:23                                           ` Marc Gonzalez
2024-04-10 13:14                                             ` Bryan O'Donoghue
2024-04-10 13:18                                               ` Marc Gonzalez
2024-04-10 13:29                                                 ` Bryan O'Donoghue
2024-04-10 13:31                                                   ` Bryan O'Donoghue
2024-04-11  9:02                                               ` Bryan O'Donoghue
2024-04-25 16:43                                               ` Marc Gonzalez
2024-04-30 16:13                                                 ` venus decoder hangs at EOF Marc Gonzalez
2024-02-19 18:33 ` [RFC WIP PATCH] venus: add qcom,no-low-power property Rob Herring

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=0843621b-386b-4173-9e3c-9538cdb4641d@freebox.fr \
    --to=mgonzalez@freebox.fr \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=phh@phh.me \
    --cc=quic_vgarodia@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=stanimir.k.varbanov@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).