linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support for venus on msm8939
@ 2020-05-01 20:35 Konrad Dybcio
  2020-05-01 20:35 ` [PATCH 1/2] media: venus: Add support for MSM8939 Konrad Dybcio
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Konrad Dybcio @ 2020-05-01 20:35 UTC (permalink / raw)
  To: skrzynka
  Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Mauro Carvalho Chehab, Rob Herring, linux-arm-msm, linux-media,
	devicetree, linux-kernel

Konrad Dybcio (2):
  media: venus: Add support for MSM8939
  dt-bindings: media: Document MSM8939 Venus

 .../bindings/media/qcom,msm8939-venus.yaml    | 119 ++++++++++++++++++
 drivers/media/platform/qcom/venus/core.c      |  33 +++++
 2 files changed, 152 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml

-- 
2.26.1


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

* [PATCH 1/2] media: venus: Add support for MSM8939
  2020-05-01 20:35 [PATCH 0/2] Add support for venus on msm8939 Konrad Dybcio
@ 2020-05-01 20:35 ` Konrad Dybcio
  2020-05-05 11:43   ` Stanimir Varbanov
  2020-05-01 20:35 ` [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus Konrad Dybcio
  2020-05-05 11:40 ` [PATCH 0/2] Add support for venus on msm8939 Stanimir Varbanov
  2 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2020-05-01 20:35 UTC (permalink / raw)
  To: skrzynka
  Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Mauro Carvalho Chehab, Rob Herring, linux-arm-msm, linux-media,
	devicetree, linux-kernel

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
---
 drivers/media/platform/qcom/venus/core.c | 33 ++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 194b10b987672..f3a15991ac763 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -405,6 +405,38 @@ static const struct venus_resources msm8916_res = {
 	.fwname = "qcom/venus-1.8/venus.mdt",
 };
 
+static const struct freq_tbl msm8939_freq_table[] = {
+	{ 489600, 266670000 },	/* 1080p @ 60 */
+	{ 244800, 200000000 },	/* 1080p @ 30 */
+	{ 244800, 133330000 },	/* 1080p @ 30 (decode only) */
+	{ 220800, 133330000 },  /* 720p @ 60 (decode only?) */
+	{ 108000, 133330000 },  /* 720p @ 30*/
+	{ 72000, 133330000 },  /* VGA @ 60 */
+	{ 36000, 133330000 },  /* VGA @ 30 */
+};
+
+static const struct reg_val msm8939_reg_preset[] = {
+	{ 0xe0020, 0x0aaaaaaa },
+	{ 0xe0024, 0x0aaaaaaa },
+	{ 0x80124, 0x00000003 },
+};
+
+static const struct venus_resources msm8939_res = {
+	.freq_tbl = msm8939_freq_table,
+	.freq_tbl_size = ARRAY_SIZE(msm8939_freq_table),
+	.reg_tbl = msm8939_reg_preset,
+	.reg_tbl_size = ARRAY_SIZE(msm8939_reg_preset),
+	.clks = { "core", "iface", "bus", },
+	.clks_num = 3,
+	.max_load = 489600, /* 1080p @ 60 */
+	.hfi_version = HFI_VERSION_1XX,
+	.vmem_id = VIDC_RESOURCE_NONE,
+	.vmem_size = 0,
+	.vmem_addr = 0,
+	.dma_mask = 0xddc00000 - 1,
+	.fwname = "qcom/venus-1.8/venus.mdt",
+};
+
 static const struct freq_tbl msm8996_freq_table[] = {
 	{ 1944000, 520000000 },	/* 4k UHD @ 60 (decode only) */
 	{  972000, 520000000 },	/* 4k UHD @ 30 */
@@ -567,6 +599,7 @@ static const struct venus_resources sc7180_res = {
 
 static const struct of_device_id venus_dt_match[] = {
 	{ .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
+	{ .compatible = "qcom,msm8939-venus", .data = &msm8939_res, },
 	{ .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
 	{ .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
 	{ .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
-- 
2.26.1


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

* [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus
  2020-05-01 20:35 [PATCH 0/2] Add support for venus on msm8939 Konrad Dybcio
  2020-05-01 20:35 ` [PATCH 1/2] media: venus: Add support for MSM8939 Konrad Dybcio
@ 2020-05-01 20:35 ` Konrad Dybcio
  2020-05-05  3:55   ` Rob Herring
  2020-05-05 11:40 ` [PATCH 0/2] Add support for venus on msm8939 Stanimir Varbanov
  2 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2020-05-01 20:35 UTC (permalink / raw)
  To: skrzynka
  Cc: Konrad Dybcio, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Mauro Carvalho Chehab, Rob Herring, linux-arm-msm, linux-media,
	devicetree, linux-kernel

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
---
 .../bindings/media/qcom,msm8939-venus.yaml    | 119 ++++++++++++++++++
 1 file changed, 119 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml

diff --git a/Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml
new file mode 100644
index 0000000000000..8cc0002d10163
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml
@@ -0,0 +1,119 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/media/qcom,msm8939-venus.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Venus video encode and decode accelerators
+
+maintainers:
+  - Stanimir Varbanov <stanimir.varbanov@linaro.org>
+
+description: |
+  The Venus IP is a video encode and decode accelerator present
+  on Qualcomm platforms
+
+properties:
+  compatible:
+    const: qcom,msm8939-venus
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  clocks:
+    maxItems: 3
+
+  clock-names:
+    items:
+      - const: core
+      - const: iface
+      - const: bus
+
+  iommus:
+    maxItems: 1
+
+  memory-region:
+    maxItems: 1
+
+  video-decoder:
+    type: object
+
+    properties:
+      compatible:
+        const: "venus-decoder"
+
+    required:
+      - compatible
+
+    additionalProperties: false
+
+  video-encoder:
+    type: object
+
+    properties:
+      compatible:
+        const: "venus-encoder"
+
+    required:
+      - compatible
+
+    additionalProperties: false
+
+  video-firmware:
+    type: object
+
+    description: |
+      Firmware subnode is needed when the platform does not
+      have TrustZone.
+
+    properties:
+      iommus:
+        maxItems: 1
+
+    required:
+      - iommus
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - power-domains
+  - clocks
+  - clock-names
+  - iommus
+  - memory-region
+  - video-decoder
+  - video-encoder
+
+examples:
+  - |
+        #include <dt-bindings/interrupt-controller/arm-gic.h>
+        #include <dt-bindings/clock/qcom,gcc-msm8939.h>
+
+        video-codec@1d00000 {
+                compatible = "qcom,msm8939-venus";
+                reg = <0x01d00000 0xff000>;
+                interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                clocks = <&gcc GCC_VENUS0_VCODEC0_CLK>,
+                        <&gcc GCC_VENUS0_AHB_CLK>,
+                        <&gcc GCC_VENUS0_AXI_CLK>;
+                clock-names = "core", "iface", "bus";
+                power-domains = <&gcc VENUS_GDSC>;
+                iommus = <&apps_iommu 5>;
+                memory-region = <&venus_mem>;
+
+                video-decoder {
+                        compatible = "venus-decoder";
+                };
+
+                video-encoder {
+                        compatible = "venus-encoder";
+                };
+        };
-- 
2.26.1


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

* Re: [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus
  2020-05-01 20:35 ` [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus Konrad Dybcio
@ 2020-05-05  3:55   ` Rob Herring
  2020-05-05  8:01     ` Konrad Dybcio
  0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2020-05-05  3:55 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: skrzynka, Konrad Dybcio, Andy Gross, Bjorn Andersson,
	Stanimir Varbanov, Mauro Carvalho Chehab, linux-arm-msm,
	linux-media, devicetree, linux-kernel

On Fri,  1 May 2020 22:35:03 +0200, Konrad Dybcio wrote:
> Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
> ---
>  .../bindings/media/qcom,msm8939-venus.yaml    | 119 ++++++++++++++++++
>  1 file changed, 119 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/media/qcom,msm8939-venus.example.dts:20:18: fatal error: dt-bindings/clock/qcom,gcc-msm8939.h: No such file or directory
         #include <dt-bindings/clock/qcom,gcc-msm8939.h>
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.lib:312: recipe for target 'Documentation/devicetree/bindings/media/qcom,msm8939-venus.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/media/qcom,msm8939-venus.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1300: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1281452

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.

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

* Re: [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus
  2020-05-05  3:55   ` Rob Herring
@ 2020-05-05  8:01     ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2020-05-05  8:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: skrzynka, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Mauro Carvalho Chehab, linux-arm-msm, linux-media, DTML,
	Linux Kernel Mailing List

Ah, mea culpa!

I completely forgot to mention that this depends on the MSM8939 GCC
driver that has been sent a few days ago, sorry.. [1]

Have you found any additional mistakes in this patch that I should
correct besides this one?


[1] https://lwn.net/Articles/818486/

Konrad

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

* Re: [PATCH 0/2] Add support for venus on msm8939
  2020-05-01 20:35 [PATCH 0/2] Add support for venus on msm8939 Konrad Dybcio
  2020-05-01 20:35 ` [PATCH 1/2] media: venus: Add support for MSM8939 Konrad Dybcio
  2020-05-01 20:35 ` [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus Konrad Dybcio
@ 2020-05-05 11:40 ` Stanimir Varbanov
  2020-05-06 21:40   ` Konrad Dybcio
  2 siblings, 1 reply; 10+ messages in thread
From: Stanimir Varbanov @ 2020-05-05 11:40 UTC (permalink / raw)
  To: Konrad Dybcio, skrzynka
  Cc: Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, Rob Herring,
	linux-arm-msm, linux-media, devicetree, linux-kernel

Hi Konrad,

Thanks for the patches!

Could you describe hear what is the status of the new added SoC. Is
Venus driver tested on this new platform or that will happen at some
later point in time.

Also, in both patches the description is missing, please add something.

On 5/1/20 11:35 PM, Konrad Dybcio wrote:
> Konrad Dybcio (2):
>   media: venus: Add support for MSM8939
>   dt-bindings: media: Document MSM8939 Venus
> 
>  .../bindings/media/qcom,msm8939-venus.yaml    | 119 ++++++++++++++++++
>  drivers/media/platform/qcom/venus/core.c      |  33 +++++
>  2 files changed, 152 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8939-venus.yaml
> 

-- 
regards,
Stan

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

* Re: [PATCH 1/2] media: venus: Add support for MSM8939
  2020-05-01 20:35 ` [PATCH 1/2] media: venus: Add support for MSM8939 Konrad Dybcio
@ 2020-05-05 11:43   ` Stanimir Varbanov
  2020-05-06 21:23     ` Konrad Dybcio
  0 siblings, 1 reply; 10+ messages in thread
From: Stanimir Varbanov @ 2020-05-05 11:43 UTC (permalink / raw)
  To: Konrad Dybcio, skrzynka
  Cc: Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, Rob Herring,
	linux-arm-msm, linux-media, devicetree, linux-kernel

Hi Konrad,

On 5/1/20 11:35 PM, Konrad Dybcio wrote:
> Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
> ---
>  drivers/media/platform/qcom/venus/core.c | 33 ++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 194b10b987672..f3a15991ac763 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -405,6 +405,38 @@ static const struct venus_resources msm8916_res = {
>  	.fwname = "qcom/venus-1.8/venus.mdt",
>  };
>  
> +static const struct freq_tbl msm8939_freq_table[] = {
> +	{ 489600, 266670000 },	/* 1080p @ 60 */
> +	{ 244800, 200000000 },	/* 1080p @ 30 */
> +	{ 244800, 133330000 },	/* 1080p @ 30 (decode only) */
> +	{ 220800, 133330000 },  /* 720p @ 60 (decode only?) */
> +	{ 108000, 133330000 },  /* 720p @ 30*/
> +	{ 72000, 133330000 },  /* VGA @ 60 */
> +	{ 36000, 133330000 },  /* VGA @ 30 */

133MHz is the minimum clock frequency in the GCC driver? Do you think
that will change?

> +};
> +
> +static const struct reg_val msm8939_reg_preset[] = {
> +	{ 0xe0020, 0x0aaaaaaa },
> +	{ 0xe0024, 0x0aaaaaaa },
> +	{ 0x80124, 0x00000003 },
> +};
> +
> +static const struct venus_resources msm8939_res = {
> +	.freq_tbl = msm8939_freq_table,
> +	.freq_tbl_size = ARRAY_SIZE(msm8939_freq_table),
> +	.reg_tbl = msm8939_reg_preset,
> +	.reg_tbl_size = ARRAY_SIZE(msm8939_reg_preset),
> +	.clks = { "core", "iface", "bus", },
> +	.clks_num = 3,
> +	.max_load = 489600, /* 1080p @ 60 */
> +	.hfi_version = HFI_VERSION_1XX,
> +	.vmem_id = VIDC_RESOURCE_NONE,
> +	.vmem_size = 0,
> +	.vmem_addr = 0,
> +	.dma_mask = 0xddc00000 - 1,
> +	.fwname = "qcom/venus-1.8/venus.mdt",
> +};
> +
>  static const struct freq_tbl msm8996_freq_table[] = {
>  	{ 1944000, 520000000 },	/* 4k UHD @ 60 (decode only) */
>  	{  972000, 520000000 },	/* 4k UHD @ 30 */
> @@ -567,6 +599,7 @@ static const struct venus_resources sc7180_res = {
>  
>  static const struct of_device_id venus_dt_match[] = {
>  	{ .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
> +	{ .compatible = "qcom,msm8939-venus", .data = &msm8939_res, },
>  	{ .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
>  	{ .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
>  	{ .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
> 

-- 
regards,
Stan

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

* Re: [PATCH 1/2] media: venus: Add support for MSM8939
  2020-05-05 11:43   ` Stanimir Varbanov
@ 2020-05-06 21:23     ` Konrad Dybcio
  2020-05-07  8:13       ` Stanimir Varbanov
  0 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2020-05-06 21:23 UTC (permalink / raw)
  To: Stanimir Varbanov
  Cc: skrzynka, Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab,
	Rob Herring, linux-arm-msm, linux-media, DTML,
	Linux Kernel Mailing List

Hi Stan,

I have found some issues with the submitted GCC driver, related to
venus, but I have to further look into them locally and work out some
stuff. One of the things is that freq table for venus clock should be
changed to the values found here [1] (currently it has 8916
frequencies). When I find all the causes I'll resubmit this and
include them in the cover letter, as I might've overlooked something
wrt venus driver itself when creating this patch from my WIP branch.
Also it seems like I tested this very patch incorrectly (getting
segfaults in ffmpeg with v4l2m2m now)... Anyways, I'll get back to you
when I make it work for sure. Sorry again for the inconvenience.


[1] https://github.com/konradybcio/android_kernel_asus_msm8916-1/blob/minimal/drivers/clk/qcom/clock-gcc-8936.c#L1613-L1618

Konrad

wt., 5 maj 2020 o 13:43 Stanimir Varbanov
<stanimir.varbanov@linaro.org> napisał(a):
>
> Hi Konrad,
>
> On 5/1/20 11:35 PM, Konrad Dybcio wrote:
> > Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
> > ---
> >  drivers/media/platform/qcom/venus/core.c | 33 ++++++++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >
> > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> > index 194b10b987672..f3a15991ac763 100644
> > --- a/drivers/media/platform/qcom/venus/core.c
> > +++ b/drivers/media/platform/qcom/venus/core.c
> > @@ -405,6 +405,38 @@ static const struct venus_resources msm8916_res = {
> >       .fwname = "qcom/venus-1.8/venus.mdt",
> >  };
> >
> > +static const struct freq_tbl msm8939_freq_table[] = {
> > +     { 489600, 266670000 },  /* 1080p @ 60 */
> > +     { 244800, 200000000 },  /* 1080p @ 30 */
> > +     { 244800, 133330000 },  /* 1080p @ 30 (decode only) */
> > +     { 220800, 133330000 },  /* 720p @ 60 (decode only?) */
> > +     { 108000, 133330000 },  /* 720p @ 30*/
> > +     { 72000, 133330000 },  /* VGA @ 60 */
> > +     { 36000, 133330000 },  /* VGA @ 30 */
>
> 133MHz is the minimum clock frequency in the GCC driver? Do you think
> that will change?
>
> > +};
> > +
> > +static const struct reg_val msm8939_reg_preset[] = {
> > +     { 0xe0020, 0x0aaaaaaa },
> > +     { 0xe0024, 0x0aaaaaaa },
> > +     { 0x80124, 0x00000003 },
> > +};
> > +
> > +static const struct venus_resources msm8939_res = {
> > +     .freq_tbl = msm8939_freq_table,
> > +     .freq_tbl_size = ARRAY_SIZE(msm8939_freq_table),
> > +     .reg_tbl = msm8939_reg_preset,
> > +     .reg_tbl_size = ARRAY_SIZE(msm8939_reg_preset),
> > +     .clks = { "core", "iface", "bus", },
> > +     .clks_num = 3,
> > +     .max_load = 489600, /* 1080p @ 60 */
> > +     .hfi_version = HFI_VERSION_1XX,
> > +     .vmem_id = VIDC_RESOURCE_NONE,
> > +     .vmem_size = 0,
> > +     .vmem_addr = 0,
> > +     .dma_mask = 0xddc00000 - 1,
> > +     .fwname = "qcom/venus-1.8/venus.mdt",
> > +};
> > +
> >  static const struct freq_tbl msm8996_freq_table[] = {
> >       { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */
> >       {  972000, 520000000 }, /* 4k UHD @ 30 */
> > @@ -567,6 +599,7 @@ static const struct venus_resources sc7180_res = {
> >
> >  static const struct of_device_id venus_dt_match[] = {
> >       { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
> > +     { .compatible = "qcom,msm8939-venus", .data = &msm8939_res, },
> >       { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
> >       { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
> >       { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
> >
>
> --
> regards,
> Stan

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

* Re: [PATCH 0/2] Add support for venus on msm8939
  2020-05-05 11:40 ` [PATCH 0/2] Add support for venus on msm8939 Stanimir Varbanov
@ 2020-05-06 21:40   ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2020-05-06 21:40 UTC (permalink / raw)
  To: Stanimir Varbanov
  Cc: skrzynka, Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab,
	Rob Herring, linux-arm-msm, linux-media, DTML,
	Linux Kernel Mailing List, Vincent Knecht

Hi Stan,

Unfortunately it seems like I made some mistakes, as I've pointed out
in the reply in [1/2] patch,
and therefore this submission can go to the bin and wait for a v2. But
answering your question
wrt to 8939:

The platform is currently shaping out good, as we can reuse a large
number of 8916 drivers.
At the moment we have 4 out of 8 cores working reliably with
out-of-tree patches (8939 doesn't support psci)
and the latter 8 cores aren't there only because of the core
interconnect not being handled yet
(well they can be enabled but performance goes waaaay down when one does so).
As for other features, I have adreno, iommu, i2c, sdhci and other
basic things like that working,
and Vincent Knecht (cc) with an Alcatel Idol 3 5.5 (same SoC) even
reportedly got USB and
Wi-Fi to work (though we have different hardware in both situations).
Currently Vincent and I have local support for the aforementioned
Alcatel, Asus Zenfone 2 Laser
1080p (Z00T) and partial support (as in no panel yet) for Sony Xperia
M4 Aqua with Linaro
folks preparing some drivers (like GCC) for an unknown-to-me 8939 board
(or perhaps a phone, too?). I already pushed Adreno 405 enablement to
mesa, too and it's
going to be there in the next release, so this platform will only get
better from now.

Konrad

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

* Re: [PATCH 1/2] media: venus: Add support for MSM8939
  2020-05-06 21:23     ` Konrad Dybcio
@ 2020-05-07  8:13       ` Stanimir Varbanov
  0 siblings, 0 replies; 10+ messages in thread
From: Stanimir Varbanov @ 2020-05-07  8:13 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: skrzynka, Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab,
	Rob Herring, linux-arm-msm, linux-media, DTML,
	Linux Kernel Mailing List

Hi Konrad,

On 5/7/20 12:23 AM, Konrad Dybcio wrote:
> Hi Stan,
> 
> I have found some issues with the submitted GCC driver, related to
> venus, but I have to further look into them locally and work out some
> stuff. One of the things is that freq table for venus clock should be
> changed to the values found here [1] (currently it has 8916
> frequencies). When I find all the causes I'll resubmit this and
> include them in the cover letter, as I might've overlooked something
> wrt venus driver itself when creating this patch from my WIP branch.
> Also it seems like I tested this very patch incorrectly (getting
> segfaults in ffmpeg with v4l2m2m now)... Anyways, I'll get back to you
> when I make it work for sure. Sorry again for the inconvenience.

OK. Thanks for the details, I'm waiting for good news :). If you need
some help with Venus bringup ping me on IRC - my nickname is svarbanov
on #v4l channel.

Regarding to venus clocks, these two clocks exist in below gcc driver
but missing in msm8916:

gcc_venus0_core0_vcodec0_clk
gcc_venus0_core1_vcodec0_clk

but the Venus IP block should be the same as in msm8916. Can you point
me to the donwstream gcc driver or check from where they comes.

> 
> 
> [1] https://github.com/konradybcio/android_kernel_asus_msm8916-1/blob/minimal/drivers/clk/qcom/clock-gcc-8936.c#L1613-L1618
> 
> Konrad
> 
> wt., 5 maj 2020 o 13:43 Stanimir Varbanov
> <stanimir.varbanov@linaro.org> napisał(a):
>>
>> Hi Konrad,
>>
>> On 5/1/20 11:35 PM, Konrad Dybcio wrote:
>>> Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
>>> ---
>>>  drivers/media/platform/qcom/venus/core.c | 33 ++++++++++++++++++++++++
>>>  1 file changed, 33 insertions(+)
>>>
>>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
>>> index 194b10b987672..f3a15991ac763 100644
>>> --- a/drivers/media/platform/qcom/venus/core.c
>>> +++ b/drivers/media/platform/qcom/venus/core.c
>>> @@ -405,6 +405,38 @@ static const struct venus_resources msm8916_res = {
>>>       .fwname = "qcom/venus-1.8/venus.mdt",
>>>  };
>>>
>>> +static const struct freq_tbl msm8939_freq_table[] = {
>>> +     { 489600, 266670000 },  /* 1080p @ 60 */
>>> +     { 244800, 200000000 },  /* 1080p @ 30 */
>>> +     { 244800, 133330000 },  /* 1080p @ 30 (decode only) */
>>> +     { 220800, 133330000 },  /* 720p @ 60 (decode only?) */
>>> +     { 108000, 133330000 },  /* 720p @ 30*/
>>> +     { 72000, 133330000 },  /* VGA @ 60 */
>>> +     { 36000, 133330000 },  /* VGA @ 30 */
>>
>> 133MHz is the minimum clock frequency in the GCC driver? Do you think
>> that will change?
>>
>>> +};
>>> +
>>> +static const struct reg_val msm8939_reg_preset[] = {
>>> +     { 0xe0020, 0x0aaaaaaa },
>>> +     { 0xe0024, 0x0aaaaaaa },
>>> +     { 0x80124, 0x00000003 },
>>> +};
>>> +
>>> +static const struct venus_resources msm8939_res = {
>>> +     .freq_tbl = msm8939_freq_table,
>>> +     .freq_tbl_size = ARRAY_SIZE(msm8939_freq_table),
>>> +     .reg_tbl = msm8939_reg_preset,
>>> +     .reg_tbl_size = ARRAY_SIZE(msm8939_reg_preset),
>>> +     .clks = { "core", "iface", "bus", },
>>> +     .clks_num = 3,
>>> +     .max_load = 489600, /* 1080p @ 60 */
>>> +     .hfi_version = HFI_VERSION_1XX,
>>> +     .vmem_id = VIDC_RESOURCE_NONE,
>>> +     .vmem_size = 0,
>>> +     .vmem_addr = 0,
>>> +     .dma_mask = 0xddc00000 - 1,
>>> +     .fwname = "qcom/venus-1.8/venus.mdt",
>>> +};
>>> +
>>>  static const struct freq_tbl msm8996_freq_table[] = {
>>>       { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */
>>>       {  972000, 520000000 }, /* 4k UHD @ 30 */
>>> @@ -567,6 +599,7 @@ static const struct venus_resources sc7180_res = {
>>>
>>>  static const struct of_device_id venus_dt_match[] = {
>>>       { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
>>> +     { .compatible = "qcom,msm8939-venus", .data = &msm8939_res, },
>>>       { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
>>>       { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
>>>       { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
>>>
>>
>> --
>> regards,
>> Stan

-- 
regards,
Stan

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

end of thread, other threads:[~2020-05-07  8:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 20:35 [PATCH 0/2] Add support for venus on msm8939 Konrad Dybcio
2020-05-01 20:35 ` [PATCH 1/2] media: venus: Add support for MSM8939 Konrad Dybcio
2020-05-05 11:43   ` Stanimir Varbanov
2020-05-06 21:23     ` Konrad Dybcio
2020-05-07  8:13       ` Stanimir Varbanov
2020-05-01 20:35 ` [PATCH 2/2] dt-bindings: media: Document MSM8939 Venus Konrad Dybcio
2020-05-05  3:55   ` Rob Herring
2020-05-05  8:01     ` Konrad Dybcio
2020-05-05 11:40 ` [PATCH 0/2] Add support for venus on msm8939 Stanimir Varbanov
2020-05-06 21:40   ` Konrad Dybcio

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