diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c index 4bad2c11..e678e655 100644 --- a/drivers/gpu/drm/tegra/dpaux.c +++ b/drivers/gpu/drm/tegra/dpaux.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #if defined(NV_DRM_DISPLAY_DRM_DP_HELPER_H_PRESENT) /* Linux v5.19 */ @@ -586,13 +585,11 @@ static int tegra_dpaux_probe(struct platform_device *pdev) list_add_tail(&dpaux->list, &dpaux_list); mutex_unlock(&dpaux_lock); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) err = devm_of_dp_aux_populate_ep_devices(&dpaux->aux); if (err < 0) { dev_err(dpaux->dev, "failed to populate AUX bus: %d\n", err); return err; } -#endif return 0; } diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 73fa266d..d2adad60 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -15,7 +15,6 @@ #include #include #include -#include #if defined(NV_APERTURE_REMOVE_ALL_CONFLICTING_DEVICES_PRESENT) /* Linux v6.0 */ #include @@ -1376,10 +1375,8 @@ static int __init host1x_drm_init(void) { int err; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) if (drm_firmware_drivers_only()) return -ENODEV; -#endif err = host1x_driver_register(&host1x_drm_driver); if (err < 0) diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c index 02f04326..cab1b9ef 100644 --- a/drivers/gpu/drm/tegra/fb.c +++ b/drivers/gpu/drm/tegra/fb.c @@ -8,7 +8,6 @@ */ #include -#include #include #include @@ -39,11 +38,7 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer, { uint64_t modifier = framebuffer->modifier; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) if (fourcc_mod_is_vendor(modifier, NVIDIA)) { -#else - if ((modifier >> 56) == DRM_FORMAT_MOD_VENDOR_NVIDIA) { -#endif if ((modifier & DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) == 0) tiling->sector_layout = TEGRA_BO_SECTOR_LAYOUT_TEGRA; else diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c index de3db980..78a402fa 100644 --- a/drivers/gpu/drm/tegra/gr3d.c +++ b/drivers/gpu/drm/tegra/gr3d.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -390,11 +389,7 @@ static int gr3d_init_power(struct device *dev, struct gr3d *gr3d) .num_pd_names = 2, }; #else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) static const char * const opp_genpd_names[] = { "3d0", "3d1", NULL }; -#else - static const char *opp_genpd_names[] = { "3d0", "3d1", NULL }; -#endif const u32 link_flags = DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME; struct device **opp_virt_devs, *pd_dev; struct device_link *link; diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 454f4fce..205b1108 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -1250,11 +1249,7 @@ static void tegra_hdmi_encoder_enable(struct drm_encoder *encoder) h_back_porch = mode->htotal - mode->hsync_end; h_front_porch = mode->hsync_start - mode->hdisplay; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) err = dev_pm_opp_set_rate(hdmi->dev, hdmi->pixel_clock); -#else - err = clk_set_rate(hdmi->clk, hdmi->pixel_clock); -#endif if (err < 0) { dev_err(hdmi->dev, "failed to set HDMI clock frequency: %d\n", err); diff --git a/drivers/gpu/drm/tegra/nvdec.c b/drivers/gpu/drm/tegra/nvdec.c index fdb3ba92..f1dea0be 100644 --- a/drivers/gpu/drm/tegra/nvdec.c +++ b/drivers/gpu/drm/tegra/nvdec.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/drivers/gpu/drm/tegra/nvenc.c b/drivers/gpu/drm/tegra/nvenc.c index 5dce335e..e2a8177e 100644 --- a/drivers/gpu/drm/tegra/nvenc.c +++ b/drivers/gpu/drm/tegra/nvenc.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/drivers/gpu/drm/tegra/nvjpg.c b/drivers/gpu/drm/tegra/nvjpg.c index a9ae7939..d30ccffb 100644 --- a/drivers/gpu/drm/tegra/nvjpg.c +++ b/drivers/gpu/drm/tegra/nvjpg.c @@ -21,7 +21,6 @@ #include #include #include -#include #include diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index fc977275..ca9f03e3 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include @@ -116,11 +115,7 @@ static bool tegra_plane_format_mod_supported(struct drm_plane *plane, return true; /* check for the sector layout bit */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) if (fourcc_mod_is_vendor(modifier, NVIDIA)) { -#else - if ((modifier >> 56) == DRM_FORMAT_MOD_VENDOR_NVIDIA) { -#endif if (modifier & DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) { if (!tegra_plane_supports_sector_layout(plane)) return false; diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index 4c5e633a..7da863a9 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -21,7 +21,6 @@ #include #include #include -#include #include @@ -1071,14 +1070,8 @@ static int vic_remove(struct platform_device *pdev) } static const struct dev_pm_ops vic_pm_ops = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) -#else - SET_RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) -#endif }; #if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */ diff --git a/drivers/gpu/drm/tegra/virt.c b/drivers/gpu/drm/tegra/virt.c index b4d3fa69..48c47ba1 100644 --- a/drivers/gpu/drm/tegra/virt.c +++ b/drivers/gpu/drm/tegra/virt.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include