From 6875b1f69eac096cc6e9f9859351e78c33742740 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 6 Jul 2021 10:25:17 +0100 Subject: [PATCH] drm/tegra: Fix compilation for Linux v5.14 Commit 6848c291a54f ("drm/aperture: Convert drivers to aperture interfaces") converted various drm_fb_helper_xxx functions to drm_aperture_xxx functions for Linux v5.14. This breaks the compilation of the out-of-tree Tegra DRM module and so fix this by updating the out-of-tree module as necessary. JIRA LS-115 Change-Id: Ice68b5f9ac6aded268ea4bb6db273d505db29af4 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2554714 Tested-by: mobile promotions Reviewed-by: Thierry Reding Reviewed-by: Bibek Basu Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/drm/tegra/drm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index f2517aaf..88248b42 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -12,6 +12,9 @@ #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0) +#include +#endif #include #include #include @@ -1229,8 +1232,12 @@ static int host1x_drm_probe(struct host1x_device *dev) drm_mode_config_reset(drm); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0) + err = drm_aperture_remove_framebuffers(false, "tegradrmfb"); +#else err = drm_fb_helper_remove_conflicting_framebuffers(NULL, "tegradrmfb", false); +#endif if (err < 0) goto hub;