Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux/vpr.c
Sagar Kamble c695a0c459 gpu: nvgpu: enable CONFIG_NVGPU_VPR for all kernels
VPR functionality is split up as static VPR and VPR resize. Static VPR
is supported on all kernels. VPR resize is enabled only on 4.9 kernel.

Enable CONFIG_NVGPU_VPR unconditionally in Linux Makefile. Compile
VPR resize related functionality in nvgpu under the check for
Linux kernel version using new define NVGPU_VPR_RESIZE_SUPPORTED.

JIRA LS-458
Bug 200754700

Change-Id: I8370fb3bc7fb776598108942ecd4ae47c8c98741
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2647619
(cherry picked from commit a2f4fdf190)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2652879
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2022-01-11 21:15:24 -08:00

30 lines
799 B
C

/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include <nvgpu/vpr.h>
#include <linux/init.h>
#if NVGPU_VPR_RESIZE_SUPPORTED
#include <linux/platform/tegra/common.h>
#endif
bool nvgpu_is_vpr_resize_enabled(void)
{
#if NVGPU_VPR_RESIZE_SUPPORTED
return tegra_is_vpr_resize_enabled();
#else
return false;
#endif
}