remoteproc: qcom: Venus firmware loader support for msm8996
PATCH v2 1/1 remoteproc: qcom: Venus firmware loader support for msm8996
This Patch is based on
https://patchwork.kernel.org/patch/9415627/ https://patchwork.kernel.org/patch/9415651/
This patch add necessary routine and data structure to support standalone venus firmware load on msm8996. Below are brief of changes.
1- Add private data structure which provide string-name and rate of clock
on msm8996 platform for venus.
2- Provide clock initialization and enable/disable functionality.
below is console log on msm8996 platform with above change, this is standalone test log without video driver enablement.
[ 2.612011] remoteproc0: soc:vidc_tzpil@0 is available [ 2.616939] remoteproc0: Note: remoteproc is still under development and considered experimental. [ 2.621963] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed. [ 2.631037] qcom-tz-pil soc:vidc_tzpil@0: Venus rproc probe done [ 2.641463] remoteproc0: powering up soc:vidc_tzpil@0 [ 2.641468] remoteproc0: Booting fw image venus.mdt, size 6812 [ 2.698127] remoteproc0: remote processor soc:vidc_tzpil@0 is now up
Changes w.r.t. patchset 1
reorganization and cleanup of added code.
Avaneesh Kumar Dwivedi (1):
remoteproc: qcom: Add venus rproc support on msm8996 platform.
.../devicetree/bindings/remoteproc/qcom,venus.txt | 3 +- drivers/remoteproc/qcom_venus_pil.c | 115 ++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-)
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v2 1/1 remoteproc: qcom: Add venus rproc support on msm8996 platform.
This patch is based on
https://patchwork.kernel.org/patch/9415627/ https://patchwork.kernel.org/patch/9415651/
This patch add clock initialization, enable and disable support. Required resource name string and rating are differentiated based on compatible string. Also added documentation for venus pil on msm8996.
--- .../devicetree/bindings/remoteproc/qcom,venus.txt | 3 +- drivers/remoteproc/qcom_venus_pil.c | 115 ++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/remoteproc/qcom,venus.txt +2 -1
@@ -6,7 +6,8 @@ on the Qualcomm Venus remote processor core. - compatible: Usage: required Value type: <string> - Definition: must contain "qcom,venus-pil" + Definition: must contain "qcom,venus-pil" or + "qcom,venus-8996-pil" - memory-region: Usage: required
drivers/remoteproc/qcom_venus_pil.c +114 -1
178 lines not on this page · raw message
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2] remoteproc: qcom: Add venus rproc support on msm8996 platform.
Quoted 11 lines · Avaneesh Kumar Dwivedi
This patch is based on
https://patchwork.kernel.org/patch/9415627/ https://patchwork.kernel.org/patch/9415651/This patch add clock initialization, enable and disable support. Required resource name string and rating are differentiated based on compatible string. Also added documentation for venus pil on msm8996.
Signed-off-by Avaneesh Kumar Dwivedi <[email protected]>---
Why isn't Stan Cced on this patch?
Quoted 9 lines
.../devicetree/bindings/remoteproc/qcom,venus.txt | 3 +- drivers/remoteproc/qcom_venus_pil.c | 115 ++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/remoteproc/qcom,venus.txt +0
-0
Documentation/devicetree/bindings/remoteproc/qcom,venus.txt on the Qualcomm Venus remote processor core. · line 13
Quoted 9 lines
Documentation/devicetree/bindings/remoteproc/qcom,venus.txt +2
-1@@ -6,7 +6,8 @@ on the Qualcomm Venus remote processor core. - compatible: Usage: required Value type: <string> - Definition: must contain "qcom,venus-pil" + Definition: must contain "qcom,venus-pil" or + "qcom,venus-8996-pil" - memory-region: Usage: required
No addition of clocks or clock-names properties in this document?
drivers/remoteproc/qcom_venus_pil.c static int venus_remove(struct platform_device *pdev) · line 301
Quoted 11 lines
drivers/remoteproc/qcom_venus_pil.c +3
-0@@ -194,8 +296,19 @@ static int venus_remove(struct platform_device *pdev)return 0 ; } +static const struct venus_rproc_res venus_8996_res = { + .venus_clks = (char *[]){"mx" ,"cx" ,"pll" ,NULL }, + .venus_clk_rate = {19200000 ,19200000 ,19200000 ,80000000 },
I'm very much lost. I don't really understand why we're adding clock control here. Perhaps that is the responsibility of the video driver itself and isn't supposed to be in the remoteproc portion? Testing things standalone without the video driver seems like a unit test, which is not too useful of a test if it doesn't mirror real use cases.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v2] remoteproc: qcom: Add venus rproc support on msm8996 platform.
Quoted 5 lines · Stephen Boyd
Quoted 4 lines · Avaneesh Kumar Dwivedi
This patch is based on
https://patchwork.kernel.org/patch/9415627/ https://patchwork.kernel.org/patch/9415651/
Quoted 8 lines
Quoted 7 lines
This patch add clock initialization, enable and disable support. Required resource name string and rating are differentiated based on compatible string. Also added documentation for venus pil on msm8996.
Signed-off-by Avaneesh Kumar Dwivedi <[email protected]>---
Why isn't Stan Cced on this patch?
my bad will resend patch with Stan in CC
Quoted 17 lines
Quoted 17 lines
.../devicetree/bindings/remoteproc/qcom,venus.txt | 3 +- drivers/remoteproc/qcom_venus_pil.c | 115 ++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/remoteproc/qcom,venus.txt +2
-1@@ -6,7 +6,8 @@ on the Qualcomm Venus remote processor core. - compatible: Usage: required Value type: <string> - Definition: must contain "qcom,venus-pil" + Definition: must contain "qcom,venus-pil" or + "qcom,venus-8996-pil"
Quoted 3 lines
Documentation/devicetree/bindings/remoteproc/qcom,venus.txt on the Qualcomm Venus remote processor core. · line 13
Quoted 2 lines
Documentation/devicetree/bindings/remoteproc/qcom,venus.txt +0
-0- memory-region: Usage: requiredNo addition of clocks or clock-names properties in this document?
Ok, Yes will do it.
Quoted 9 lines
Quoted 9 lines
drivers/remoteproc/qcom_venus_pil.c +0
-0@@ -194,8 +296,19 @@ static int venus_remove(struct platform_device *pdev)return 0 ; }
Quoted 9 lines
drivers/remoteproc/qcom_venus_pil.c static int venus_remove(struct platform_device *pdev) · line 301
Quoted 3 lines
drivers/remoteproc/qcom_venus_pil.c +3
-0+static const struct venus_rproc_res venus_8996_res = { + .venus_clks = (char *[]){"mx" ,"cx" ,"pll" ,NULL }, + .venus_clk_rate = {19200000 ,19200000 ,19200000 ,80000000 },I'm very much lost. I don't really understand why we're adding clock control here. Perhaps that is the responsibility of the video driver itself and isn't supposed to be in the remoteproc portion? Testing things standalone without the video driver seems like a unit test, which is not too useful of a test if it doesn't mirror real use cases.
There was a discussion with Bjorn<[email protected]>, where he mention "It only works if some other driver (the venus v4l driver) has enabled
a set of clocks and the gdsc. I do not like the concept of having a driver that depends on the state of another driver to success..."
That is why this patch to handle clock resources within venus loader. As far as gdsc is concerned, change to enable gdsc lies only in DT Node where one need to define power-domain property. let me know if i have misunderstood Bjorn, then i can drop this patch.
Quoted 1 line
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.