diff --git a/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c index 57724611d..51a123dc0 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c @@ -43,7 +43,12 @@ #include #ifdef CONFIG_NVGPU_TEGRA_FUSE +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #include +#else +#include +#endif #endif #include @@ -857,7 +862,12 @@ static int gk20a_tegra_probe(struct device *dev) } platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_B1; #ifdef CONFIG_NVGPU_TEGRA_FUSE +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) if (tegra_chip_get_revision() > TEGRA210_REVISION_A04p) +#else + if (tegra_get_chip_id() == TEGRA210 && + tegra_chip_get_revision() > TEGRA_REVISION_A04p) +#endif platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_C1; #endif } diff --git a/drivers/gpu/nvgpu/os/linux/soc.c b/drivers/gpu/nvgpu/os/linux/soc.c index e5aa50244..fe76d3df6 100644 --- a/drivers/gpu/nvgpu/os/linux/soc.c +++ b/drivers/gpu/nvgpu/os/linux/soc.c @@ -11,7 +11,10 @@ * more details. */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #include +#endif #include #include #ifdef CONFIG_TEGRA_HV_MANAGER @@ -53,7 +56,7 @@ bool nvgpu_is_soc_t194_a01(struct gk20a *g) struct gk20a_platform *platform = gk20a_get_platform(dev); return ((platform->platform_chip_id == TEGRA_194 && - tegra_chip_get_revision() == TEGRA194_REVISION_A01) ? + tegra_chip_get_revision() == TEGRA_REVISION_A01) ? true : false); } diff --git a/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c b/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c index 298c7e34d..423e0e11e 100644 --- a/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c +++ b/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c @@ -23,7 +23,12 @@ #include #include #ifdef CONFIG_NVGPU_TEGRA_FUSE +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #include +#else +#include +#endif #endif #include