summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/xve_gp106.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-01-19 19:04:50 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-02-08 14:32:24 -0500
commit73243017514ac509c3a91224286f2bcf9f5a95bd (patch)
tree637443ce8387c18d1c9c27d09e1c7f7b982f79fb /drivers/gpu/nvgpu/gp106/xve_gp106.c
parent27dd1ce475183d00686ffa62d4cffee4786ab66d (diff)
gpu: nvgpu: enable PCI MSI interrupts
Use MSI interrupts instead of legacy on PCIe dGPUs to reduce latency and contention with other PCIe devices JIRA EVLR-986 Change-Id: I6cecc7e62e5797860d42a5bee21e8f4f664e1b18 Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1291758 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/xve_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c
index 561140c6..83ae9306 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -653,6 +653,14 @@ fail:
653#endif 653#endif
654} 654}
655 655
656#if defined(CONFIG_PCI_MSI)
657static void xve_rearm_msi_gp106(struct gk20a *g)
658{
659 /* We just need to write a dummy val in the CYA_2 offset */
660 g->ops.xve.xve_writel(g, xve_cya_2_r(), 0);
661}
662#endif
663
656/* 664/*
657 * Init the HAL functions and what not. xve_sw_init_gp106() is for initializing 665 * Init the HAL functions and what not. xve_sw_init_gp106() is for initializing
658 * all the other stuff like debugfs nodes, etc. 666 * all the other stuff like debugfs nodes, etc.
@@ -667,6 +675,8 @@ int gp106_init_xve_ops(struct gpu_ops *gops)
667 gops->xve.xve_writel = xve_xve_writel_gp106; 675 gops->xve.xve_writel = xve_xve_writel_gp106;
668 gops->xve.disable_aspm = xve_disable_aspm_gp106; 676 gops->xve.disable_aspm = xve_disable_aspm_gp106;
669 gops->xve.reset_gpu = xve_reset_gpu_gp106; 677 gops->xve.reset_gpu = xve_reset_gpu_gp106;
670 678#if defined(CONFIG_PCI_MSI)
679 gops->xve.rearm_msi = xve_rearm_msi_gp106;
680#endif
671 return 0; 681 return 0;
672} 682}