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 <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2554714
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Jon Hunter
2021-07-06 10:25:17 +01:00
committed by Laxman Dewangan
parent 6eb90145f1
commit 6875b1f69e

View File

@@ -12,6 +12,9 @@
#include <linux/platform_device.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)
#include <drm/drm_aperture.h>
#endif
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_debugfs.h>
@@ -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;