From 703d00d730d230f9ac9970e7d2d22a7d8f0cd2d1 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Mon, 16 Apr 2018 16:52:08 -0700 Subject: gpu: nvgpu: nvlink endpoint ops to common code Move nvlink endpoint operations to common code. These operations are invoked when handling nvlink core driver requests. Jira VQRM-3523 Change-Id: I93024bf88a8caa3765b33c1264dde452c1a85ee3 Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/1698686 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv100/hal_gv100.c | 2 ++ drivers/gpu/nvgpu/gv100/nvlink_gv100.c | 3 +++ 2 files changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/gv100') diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 99cd8731..dc404b7a 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c @@ -816,6 +816,7 @@ static const struct gpu_ops gv100_ops = { .isr = gp10b_priv_ring_isr, .decode_error_code = gp10b_priv_ring_decode_error_code, }, +#if defined(CONFIG_TEGRA_NVLINK) .nvlink = { .discover_ioctrl = gv100_nvlink_discover_ioctrl, .discover_link = gv100_nvlink_discover_link, @@ -835,6 +836,7 @@ static const struct gpu_ops gv100_ops = { .shutdown = gv100_nvlink_shutdown, .early_init = gv100_nvlink_early_init, }, +#endif .chip_init_gpu_characteristics = gv100_init_gpu_characteristics, .get_litter_value = gv100_get_litter_value, }; diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c index 776d1d66..9d99242f 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c @@ -20,6 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ +#ifdef CONFIG_TEGRA_NVLINK + #include #include #include @@ -2677,3 +2679,4 @@ nvlink_init_exit: return err; } +#endif /* CONFIG_TEGRA_NVLINK */ -- cgit v1.2.2