Skip to content

Conversation

@Raja-Ganapathi-Busam
Copy link

Summary

This PR adds bbappend file to the gstreamer1.0-plugins-base recipe to append additional patches from an external series file after the base recipe patches. The patches are imported using quilt in the correct order and applied after existing patches.

Key Changes

  • Fetched additional patches and series file from external Git repository
  • Skipped lines starting with # in the series file (treated as comments).
  • Imported and applied patches in series file order using quilt import and push

Temporary Setup

There is a separate pull request raised on the patches repository which is pending review and merge.
Until that PR is merged, SRC_URI in this recipe points to my forked repository to fetch the patches.

Merge Condition

Please merge this PR only after the patches PR is merged in the patches repository, gst-qti-oss-patches, to ensure consistency.

Testing

  • Verified patches apply in correct order mentioned in series file.
  • Confirmed that comment lines (#) in the series file, if any, are skipped.
  • Build completed successfully with updated patches.

…l git repo

- Fetched additional patches and series file from external Git repository
- Imported and applied patches in series file order using quilt import and push
- Skipped patches prefixed with '#' in the series file (treated as comments)

Signed-off-by: Raja Ganapathi Busam <rbusam@qti.qualcomm.com>
@lumag
Copy link
Contributor

lumag commented Jan 2, 2026

I'm sorry, this is a nice hack, but no. Please follow the usual process: add the patches to the layer repo instead of storing them in the external repo. Contribute all the patches to the upstream project, UBWC compression should be supported upstream, it doesn't differ any other compression schemes.

@CherukuriNaveenQC
Copy link

CherukuriNaveenQC commented Jan 5, 2026

@lumag As canonical suggesting hosting in separate repo instead of putting patches along with distribution and we would like to maintain patches in one central repo for all distributions and our team had initial discussion with Nico and explained the reason to host in Github

@ndechesne could you please comment your feedback here.

@Raja-Ganapathi-Busam
Copy link
Author

There are complications in upstreaming patches related to the UBWC (Universal Bandwidth Compression) format.
Please refer to the ongoing open-source discussion here:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9712

Since UBWC is a proprietary format, we cannot provide the pack/unpack logic in open source. The upstream community does not accept a packed format without corresponding pack/unpack implementations.
Additionally, to leverage the memory:DMABuf caps feature, there are challenges in retrieving video meta information required for buffer mapping.

We are actively collaborating with the community to find a way forward, but this will take time to reach alignment.
Until then, we plan to maintain these patches locally to ensure functionality.

@ndechesne
Copy link
Contributor

hi. this is indeed aligned with what we discussed (privately), but let's discuss that here now.

I proposed to manage gstreamer in a different way because it has , I think, different challenges.

  1. the gst team needs to support many different gst version (major and minor), so they need to store gst patches for each of the supported versions 'somewhere'.
  2. we want to package QCOM gstreamer 'changes' for each distro we support (yocto, but also debian). and we have 3rd party doing their own too (Ubuntu)
  3. we are actively engaged to upstream our changes, so the goal remain to have less patches (no patches?) eventually.

I understand it is not the standard way to host patches for OE recipes, but it's a practical solution to help us overall.

SRCREV_qti_patches = "${AUTOREV}"

qcom_do_patch() {
PATCHREPO="${WORKDIR}/sources/patchrepo"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start as do_patch_
Can you name this more appropriately in the purpose?

esac

if [ -f "${PATCHREPO}/${p}" ]; then
quilt import "${PATCHREPO}/${p}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to depend on quit-native

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my understanding, Yocto uses quilt as the default PATCHTOOL.
Since this function runs inside do_patch:append, the environment already ensures quilt-native is available.
Therefore, we do not need to explicitly add DEPENDS += "quilt-native" in the .bbappend file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course you need to do it. If something is changed in OE-Core then your recipe gets broken.

git://github.com/Raja-Ganapathi-Busam/gst-qti-oss-patches.git;protocol=ssh;user=git;branch=${PV};name=qti_patches;destsuffix=patchrepo;subpath=${BPN} \
"

SRCREV_qti_patches = "${AUTOREV}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no AUTOREV, we only rely on fixed content/metadata in meta-qcom.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our intention is to avoid making changes in meta-qcom repo if there is any update in patches repo.
Please suggest.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no other way around. You need to make changes to meta-qcom when you change the version of the software we build in meta-qcom.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 here. If you make changes to your repo, it is a different version, a different recipe revision and a different set of packages. The item will go away once you drop the custom do_patch implementation and use OE's one (together with using raw URIs)

@@ -0,0 +1,37 @@
# To apply patches to support Qualcomm specific formats and fixes
SRC_URI:append:qcom = " \
git://github.com/Raja-Ganapathi-Busam/gst-qti-oss-patches.git;protocol=ssh;user=git;branch=${PV};name=qti_patches;destsuffix=patchrepo;subpath=${BPN} \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the patches are available in a public http link, perhaps we could list them here directly. that might be a better approach that strictly depending on an external git tree.

a link like this one (this is just an example)

https://raw.githubusercontent.com/qualcomm-linux/meta-qcom/e74ef28e7df313edf77e6aafe2f789ef324b09d5/conf/layer.conf

At least you wouldn't need to have a custom do_patch implementation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in process of making git://github.com/qualcomm/gst-qti-oss-patches public. Meanwhile, we would like to have a review of our approach

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in the process of making the patches repository public.
Once it becomes publicly accessible, I will update the link accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, and I made the review in this context. I am not saying that the link is not public, but suggesting a different approach. Instead of downloading the whole tree and manually applying the patches yourself in the qcom_do_patch() function, you can list all the patches as http:// links SRC_URI.

That way, you still preserver your tree with standalone patches which is convenient for what we discussed, and we still integrate patches 'normally' (almost) from an OE metadata perspective

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, and I made the review in this context. I am not saying that the link is not public, but suggesting a different approach. Instead of downloading the whole tree and manually applying the patches yourself in the qcom_do_patch() function, you can list all the patches as http:// links SRC_URI.

That way, you still preserver your tree with standalone patches which is convenient for what we discussed, and we still integrate patches 'normally' (almost) from an OE metadata perspective

I think that is also what as suggested by me in the meetings before the solstice break. Having a custom do_patch is very fragile and rarely required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can still point out the raw URIs inside your repo (and change them later to the official one once it's public).

@lumag
Copy link
Contributor

lumag commented Jan 5, 2026

Okay.

@lumag As canonical suggesting hosting in separate repo instead of putting patches along with distribution and we would like to maintain patches in one central repo for all distributions and our team had initial discussion with Nico and explained the reason to host in Github

This will not work in a long term. Ubuntu, Debian, Fedora and OE will have different versions of the GStreamer. At some point your patches won't be unuquelly applicable to those versions, so you will have to have separate branches or revisions. Having that in mind it is much easier to incorporate those patches into the distro package as it is usually done. I definitely don't expect Debian / Ubuntu packages fetching additional repo during the build stage.

Since UBWC is a proprietary format, we cannot provide the pack/unpack logic in open source. The upstream community does not accept a packed format without corresponding pack/unpack implementations.

UBWC format has been reverse engineered. There was another study of the compressed formats, which I can find quickly at this moment. As such, I can only recommend actually defining the compress and decompress functions and following Gstreamer requirements. Other projects would also benefit from it. We have hard time testing the UBWC support on the display side because there is no defined way to create or validate generated UBWC images.

}

python do_patch:append:qcom() {
bb.build.exec_func('qcom_do_patch', d)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for not extending the function directly?

@lumag lumag marked this pull request as draft January 5, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants