Skip to contentSkip to conversation

receipes-multimedia: gstreamer: Add patches for AM62P

PATCH Superseded Devarsh Thakkar 4 participants 6 messages Dec 6, 2023 – Dec 8, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 receipes-multimedia: gstreamer: Add patches for AM62P

Add patches to prefer contiguous video format and supporting dmabuf-import mode for video decoder.

This is to support use-cases involving video codec with other components viz. GPU, Camera e.t.c.

---
 .../gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend       | 4 ++++
 1 file changed, 4 insertions(+)
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend +4 -0
index a36c9760..e14a3c93 100644
@@ -20,4 +20,8 @@ SRC_URI:append:am62axx = " \
     file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
 "
 
+SRC_URI:append:am62pxx = " \
+    file://0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch \
+    file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
+"
 PR:append = ".arago0"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 6 lines · Devarsh Thakkar

Add patches to prefer contiguous video format and supporting dmabuf-import mode for video decoder.

This is to support use-cases involving video codec with other components viz. GPU, Camera e.t.c.

Why does this "support use-cases"? What is wrong with the default formats? Are these posted upstream to upstream gstreamer, if not why? Or should we instead fix the consuming software to handle the default non-contiguous formats better..

Andrew

Quoted 18 lines
---
  .../gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend       | 4 ++++
  1 file changed, 4 insertions(+)
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend +4 -0
index a36c9760..e14a3c93 100644
@@ -20,4 +20,8 @@ SRC_URI:append:am62axx = " \
      file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
  "
 
+SRC_URI:append:am62pxx = " \
+    file://0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch \
+    file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
+"
  PR:append = ".arago0"
#2 lore raw

Hi Andrew,

Thanks for the review.

Quoted 9 lines · Andrew Davis
Quoted 6 lines · Devarsh Thakkar

Add patches to prefer contiguous video format and supporting dmabuf-import mode for video decoder.

This is to support use-cases involving video codec with other components viz. GPU, Camera e.t.c.

Why does this "support use-cases"? What is wrong with the default formats?

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :
I think we have certain blocks such as ISP, Camera seem to only support contigous formats which doesn't go well with gstreamer v4l2 which prefers non-contigous by default and we fail at negotiation.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
I think this is a local patch which complements a patch already made available in driver, this to support dmabuf import for the decoder.

Quoted 4 lines

Are these posted upstream to upstream gstreamer, if not why? Or should we instead fix the consuming software to handle the default non-contiguous formats better..

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :

The crux of the issue is that unlike v4l2 gstreamer has only single GST video format for both NV12 and NV12M (non-contigous) and it prefers to advertise latter during caps negotiation. I think there was a proposal long back to have separate GST video formats for NV12 and NV12M but that didn't converge, perhaps they wanted to support this with a VideoMeta based scheme as per logs [0].

Also I see other vendors also carrying similar patch like this locally.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
There again is discussion around this to support this in upstream but the upstream patch is not yet merged [1].

Anyways, I don't see any harm in applying these patches if they are helping achieve use-cases and I see they are already getting applied for other platforms.

[0] https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/414
[1] :
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4550/diffs?commit_id=b12eaf65f489bab50917e22242758e000d69df58

Regards
Devarsh

Quoted 22 lines

Andrew

Quoted 20 lines

---
  .../gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend       | 4 ++++

  1 file changed, 4 insertions(+)

diff --git
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend index a36c9760..e14a3c93 100644
---
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend
+++
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend +0 -0
@@ -20,4 +20,8 @@ SRC_URI:append:am62axx = " \
       file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \

  "
  +SRC_URI:append:am62pxx = " \
+    file://0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch \
+    file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
+"
  PR:append = ".arago0"

Reviewed-by
#3 lore raw
Quoted 43 lines · Devarsh Thakkar

Hi Andrew,

Thanks for the review.

Quoted 8 lines · Andrew Davis
Quoted 6 lines · Devarsh Thakkar

Add patches to prefer contiguous video format and supporting dmabuf-import mode for video decoder.

This is to support use-cases involving video codec with other components viz. GPU, Camera e.t.c.

Why does this "support use-cases"? What is wrong with the default formats?

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :
I think we have certain blocks such as ISP, Camera seem to only support contigous formats which doesn't go well with gstreamer v4l2 which prefers non-contigous by default and we fail at negotiation.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
I think this is a local patch which complements a patch already made available in driver, this to support dmabuf import for the decoder.

Quoted 4 lines

Are these posted upstream to upstream gstreamer, if not why? Or should we instead fix the consuming software to handle the default non-contiguous formats better..

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :

The crux of the issue is that unlike v4l2 gstreamer has only single GST video format for both NV12 and NV12M (non-contigous) and it prefers to advertise latter during caps negotiation. I think there was a proposal long back to have separate GST video formats for NV12 and NV12M but that didn't converge, perhaps they wanted to support this with a VideoMeta based scheme as per logs [0].

Also I see other vendors also carrying similar patch like this locally.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
There again is discussion around this to support this in upstream but the upstream patch is not yet merged [1].

Anyways, I don't see any harm in applying these patches if they are helping achieve use-cases and I see they are already getting applied for other platforms.

Quoted 6 lines

[0] https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/414
[1] :
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4550/diffs?commit_id=b12eaf65f489bab50917e22242758e000d69df58

Regards
Devarsh

Regards
Rahul T R

Quoted 22 lines
Quoted 22 lines

Andrew

Quoted 20 lines
---
   .../gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend       | 4 ++++
   1 file changed, 4 insertions(+)

diff --git
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend index a36c9760..e14a3c93 100644
---
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend
+++
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend +3 -0
@@ -20,4 +20,8 @@ SRC_URI:append:am62axx = " \
       file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
   "
   +SRC_URI:append:am62pxx = " \
+    file://0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch \
+    file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
+"
   PR:append = ".arago0"
#4 lore raw
In reply to Devarsh Thakkar
Quoted 36 lines · Devarsh Thakkar

Hi Andrew,

Thanks for the review.

Quoted 9 lines · Andrew Davis
Quoted 6 lines · Devarsh Thakkar

Add patches to prefer contiguous video format and supporting dmabuf-import mode for video decoder.

This is to support use-cases involving video codec with other components viz. GPU, Camera e.t.c.

Why does this "support use-cases"? What is wrong with the default formats?

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :
I think we have certain blocks such as ISP, Camera seem to only support contigous formats which doesn't go well with gstreamer v4l2 which prefers non-contigous by default and we fail at negotiation.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
I think this is a local patch which complements a patch already made available in driver, this to support dmabuf import for the decoder.

Quoted 4 lines

Are these posted upstream to upstream gstreamer, if not why? Or should we instead fix the consuming software to handle the default non-contiguous formats better..

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :

The crux of the issue is that unlike v4l2 gstreamer has only single GST video format for both NV12 and NV12M (non-contigous) and it prefers to advertise latter during caps negotiation. I think there was a proposal long back to have separate GST video formats for NV12 and NV12M but that didn't converge, perhaps they wanted to support this with a VideoMeta based scheme as per logs [0].

Quoted 9 lines

Also I see other vendors also carrying similar patch like this locally.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
There again is discussion around this to support this in upstream but the upstream patch is not yet merged [1].

Anyways, I don't see any harm in applying these patches if they are helping achieve use-cases and I see they are already getting applied for other platforms.

This is a lot of good information, it should be in the commit message.

I do not see any harm either, this was not a NAK. But we do need to remember to work on fixing our drivers/applications to better handle NV12M (seems like it will remain the default in gstreamer). Otherwise you will have to support this hack forever, and for every distro (we have Debian now, I don't see you updating gstreamer.deb for the same..).

Andrew

Quoted 29 lines

[0] https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/414
[1] :
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4550/diffs?commit_id=b12eaf65f489bab50917e22242758e000d69df58

Regards
Devarsh

Quoted 22 lines

Andrew

Quoted 20 lines
---
   .../gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend       | 4 ++++
   1 file changed, 4 insertions(+)

diff --git
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend index a36c9760..e14a3c93 100644
---
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend
+++
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend +3 -0
@@ -20,4 +20,8 @@ SRC_URI:append:am62axx = " \
       file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
   "
   +SRC_URI:append:am62pxx = " \
+    file://0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch \
+    file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
+"
   PR:append = ".arago0"
#5 lore raw
Quoted 43 lines · Andrew Davis
Quoted 42 lines · Devarsh Thakkar

Hi Andrew,

Thanks for the review.

Quoted 9 lines · Andrew Davis
Quoted 6 lines · Devarsh Thakkar

Add patches to prefer contiguous video format and supporting dmabuf-import mode for video decoder.

This is to support use-cases involving video codec with other components viz. GPU, Camera e.t.c.

Why does this "support use-cases"? What is wrong with the default formats?

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :
I think we have certain blocks such as ISP, Camera seem to only support contigous formats which doesn't go well with gstreamer v4l2 which prefers non-contigous by default and we fail at negotiation.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
I think this is a local patch which complements a patch already made available in driver, this to support dmabuf import for the decoder.

Quoted 4 lines

Are these posted upstream to upstream gstreamer, if not why? Or should we instead fix the consuming software to handle the default non-contiguous formats better..

For 0002-v4l2-Give-preference-to-contiguous-format-if-support.patch :

The crux of the issue is that unlike v4l2 gstreamer has only single GST video format for both NV12 and NV12M (non-contigous) and it prefers to advertise latter during caps negotiation. I think there was a proposal long back to have separate GST video formats for NV12 and NV12M but that didn't converge, perhaps they wanted to support this with a VideoMeta based scheme as per logs [0].

Also I see other vendors also carrying similar patch like this locally.

For 0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch :
There again is discussion around this to support this in upstream but the upstream patch is not yet merged [1].

Quoted 5 lines
Quoted 3 lines

Anyways, I don't see any harm in applying these patches if they are helping achieve use-cases and I see they are already getting applied for other platforms.

This is a lot of good information, it should be in the commit message.

Devarsh, can you put together a v2 with the above information in the commit message? History like this is very helpful to keep track of so that we do not lose it to the passage of time.

Quoted 40 lines

I do not see any harm either, this was not a NAK. But we do need to remember to work on fixing our drivers/applications to better handle NV12M (seems like it will remain the default in gstreamer). Otherwise you will have to support this hack forever, and for every distro (we have Debian now, I don't see you updating gstreamer.deb for the same..).

Andrew

Quoted 32 lines

[0] https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/414
[1] :
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4550/diffs?commit_id=b12eaf65f489bab50917e22242758e000d69df58

Regards
Devarsh

Quoted 25 lines

Andrew

Quoted 23 lines

---
   .../gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend       | 4
++++

   1 file changed, 4 insertions(+)

diff --git
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend index a36c9760..e14a3c93 100644
---
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend
+++
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.%.bbappend

(quoted diff) +0 -0
@@ -20,4 +20,8 @@ SRC_URI:append:am62axx = " \
 
 file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \

   "
   +SRC_URI:append:am62pxx = " \
+    file://0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch \
+ file://0002-v4l2-Give-preference-to-contiguous-format-if-support.patch \
+"
   PR:append = ".arago0"

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS