Getting kernel patch to work

Greg Wilson-Lindberg

I'm using a boot2qt version of a warrior Yocto build for a raspberry pi4.

I'm trying to apply a patch to a driver in the linux kernel. I'm following the procedures laid out in the
book "Embedded Linux Systems with the Yocto Project".

I already have a kernel .bbappend file that I'm using to modify the kernel config and that is working correctly.

I started with a patch file that I found on the internet that addressed the problem that I have and I added
support for it to my .bbappend file. I know that it has been found correctly because I initially specified the
file path incorrectly and received an error.

After building my image I go to look at the STAGING_KERNEL_DIR and I do not see my changes applied to the
file. I even added an error to the patch to see if it was compiling and it didn't trigger the error.

At this point I went back fully to "Embedded Linux Systems with the Yocto Project" and created my own
patch. I still don't see it being applied.

Can somebody please tell me where I should see the patch applied?

Here is how I modified my .bbappend:

# additions to Kernel configuration

SRC_URi += "file://0001-drm-vc4-Keep-the-binner-BO-through-suspend-GWL.patch"

do_configure_append() {

And here is the patch:

From d95e6ead8d25165014f8746082656da6345889b0 Mon Sep 17 00:00:00 2001
From: Greg Wilson-Lindberg <gwilson@...>
Date: Tue, 10 Mar 2020 16:29:08 -0700
Subject: [PATCH 1/1] drm-vc4-Keep-the-binner-BO-through-suspend-GWL

 drivers/gpu/drm/vc4/vc4_v3d.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
index e47e29426078..ff7812066668 100644
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@ -303,9 +303,6 @@ static int vc4_v3d_runtime_suspend(struct device *dev)
-    drm_gem_object_put_unlocked(&vc4->bin_bo->base.base);
-    vc4->bin_bo = NULL;
     return 0;
@@ -317,10 +314,6 @@ static int vc4_v3d_runtime_resume(struct device *dev)
     struct vc4_dev *vc4 = v3d->vc4;
     int ret;
-    ret = vc4_allocate_bin_bo(vc4->dev);
-    if (ret)
-        return ret;
     ret = clk_prepare_enable(v3d->clk);
     if (ret != 0)
         return ret;

Thanks in advance,
Greg Wilson-Lindberg

Join to automatically receive all group messages.