linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC WIP PATCH] venus: add qcom,no-low-power property
@ 2024-02-19 17:18 Marc Gonzalez
  2024-02-19 17:28 ` Konrad Dybcio
  2024-02-19 18:33 ` [RFC WIP PATCH] venus: add qcom,no-low-power property Rob Herring
  0 siblings, 2 replies; 37+ messages in thread
From: Marc Gonzalez @ 2024-02-19 17:18 UTC (permalink / raw)
  To: DT, linux-media, MSM
  Cc: Stanimir Varbanov, Vikash Garodia, Bryan O Donoghue,
	Bjorn Andersson, Konrad Dybcio, Mauro Carvalho Chehab,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Pierre-Hugues Husson

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

^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2024-04-30 16:13 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 17:18 [RFC WIP PATCH] venus: add qcom,no-low-power property Marc Gonzalez
2024-02-19 17:28 ` 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

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).