diff options
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0904-drm-vc4-drv-Skip-BO-Backend-Initialization-on-BCM271.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0904-drm-vc4-drv-Skip-BO-Backend-Initialization-on-BCM271.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0904-drm-vc4-drv-Skip-BO-Backend-Initialization-on-BCM271.patch b/target/linux/bcm27xx/patches-5.15/950-0904-drm-vc4-drv-Skip-BO-Backend-Initialization-on-BCM271.patch new file mode 100644 index 0000000000..cb4a077f61 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0904-drm-vc4-drv-Skip-BO-Backend-Initialization-on-BCM271.patch @@ -0,0 +1,52 @@ +From 37f9fb928b7f32f4ee16cbd494aa15f146b20a65 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard <maxime@cerno.tech> +Date: Thu, 21 Apr 2022 17:29:02 +0200 +Subject: [PATCH] drm/vc4: drv: Skip BO Backend Initialization on + BCM2711 + +On the BCM2711, we currently call the vc4_bo_cache_init() and +vc4_gem_init() functions. These functions initialize the BO and GEM +backends. + +However, this code was initially created to accomodate the requirements +of the GPU on the older SoCs, while the BCM2711 has a separate driver +for it. So let's just skip these calls when we're on a newer hardware. + +Signed-off-by: Maxime Ripard <maxime@cerno.tech> +--- + drivers/gpu/drm/vc4/vc4_drv.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -324,19 +324,23 @@ static int vc4_drm_bind(struct device *d + platform_set_drvdata(pdev, drm); + INIT_LIST_HEAD(&vc4->debugfs_list); + +- mutex_init(&vc4->bin_bo_lock); ++ if (!is_vc5) { ++ mutex_init(&vc4->bin_bo_lock); + +- ret = vc4_bo_cache_init(drm); +- if (ret) +- return ret; ++ ret = vc4_bo_cache_init(drm); ++ if (ret) ++ return ret; ++ } + + ret = drmm_mode_config_init(drm); + if (ret) + return ret; + +- ret = vc4_gem_init(drm); +- if (ret) +- return ret; ++ if (!is_vc5) { ++ ret = vc4_gem_init(drm); ++ if (ret) ++ return ret; ++ } + + node = of_find_compatible_node(NULL, NULL, "raspberrypi,bcm2835-firmware"); + if (node) { |