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;