diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-06-10 13:51:43 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-06-16 11:07:52 +0200 |
commit | 257add942a477bb99bdf4bacc6190703f796dcff (patch) | |
tree | a5f5e1ea6f44bb851b474c646e1168bb97259186 /drivers/gpu/drm/vc4 | |
parent | 2095848661481e31339b32847acf7759b5635f38 (diff) | |
download | linux-257add942a477bb99bdf4bacc6190703f796dcff.tar.gz linux-257add942a477bb99bdf4bacc6190703f796dcff.tar.bz2 linux-257add942a477bb99bdf4bacc6190703f796dcff.zip |
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.
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220610115149.964394-9-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_drv.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 528a1e2761f1..ef4ab0563168 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -285,19 +285,23 @@ static int vc4_drm_bind(struct device *dev) 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) { |