summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-07-27 16:50:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-04 12:24:02 -0400
commita0a3a6323a0e4323d9dedac14b47239535b1cb8b (patch)
treeda46d04cccb6d2bccf0d3e1dd920559995b53542
parent972c42fddf13f658242a4f92124e5fcf194672b3 (diff)
gpu: nvgpu: Pass gk20a to XVE init
Pass gk20a pointer instead of struct device pointer to XVE init. Change-Id: I5f5efc1d09430a45a49321830b1d7f17c7a57e2f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1528264 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.c6
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.h2
4 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 7d577cda..7bd6acfd 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -332,7 +332,7 @@ int gk20a_finalize_poweron(struct gk20a *g)
332 if (platform->disable_aspm && g->ops.xve.disable_aspm) 332 if (platform->disable_aspm && g->ops.xve.disable_aspm)
333 g->ops.xve.disable_aspm(g); 333 g->ops.xve.disable_aspm(g);
334 334
335 g->ops.xve.sw_init(dev_from_gk20a(g)); 335 g->ops.xve.sw_init(g);
336 g->ops.xve.available_speeds(g, &speed); 336 g->ops.xve.available_speeds(g, &speed);
337 337
338 /* Set to max speed */ 338 /* Set to max speed */
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 83cdeb3f..aeba1fcd 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -969,7 +969,7 @@ struct gpu_ops {
969 } css; 969 } css;
970#endif 970#endif
971 struct { 971 struct {
972 int (*sw_init)(struct device *dev); 972 int (*sw_init)(struct gk20a *g);
973 int (*get_speed)(struct gk20a *g, u32 *xve_link_speed); 973 int (*get_speed)(struct gk20a *g, u32 *xve_link_speed);
974 int (*set_speed)(struct gk20a *g, u32 xve_link_speed); 974 int (*set_speed)(struct gk20a *g, u32 xve_link_speed);
975 void (*available_speeds)(struct gk20a *g, u32 *speed_mask); 975 void (*available_speeds)(struct gk20a *g, u32 *speed_mask);
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c
index 67b77048..89b6b873 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c
@@ -22,9 +22,6 @@
22#include "gk20a/gk20a.h" 22#include "gk20a/gk20a.h"
23#include "gm206/bios_gm206.h" 23#include "gm206/bios_gm206.h"
24#include "gp106/xve_gp106.h" 24#include "gp106/xve_gp106.h"
25#ifdef CONFIG_DEBUG_FS
26#include "gk20a/platform_gk20a.h"
27#endif
28#include "common/linux/os_linux.h" 25#include "common/linux/os_linux.h"
29 26
30#include <nvgpu/bug.h> 27#include <nvgpu/bug.h>
@@ -603,11 +600,10 @@ static const struct file_operations xve_link_control_status_fops = {
603}; 600};
604#endif 601#endif
605 602
606int xve_sw_init_gp106(struct device *dev) 603int xve_sw_init_gp106(struct gk20a *g)
607{ 604{
608 int err = -ENODEV; 605 int err = -ENODEV;
609#ifdef CONFIG_DEBUG_FS 606#ifdef CONFIG_DEBUG_FS
610 struct gk20a *g = gk20a_from_dev(dev);
611 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); 607 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
612 struct dentry *gpu_root = l->debugfs; 608 struct dentry *gpu_root = l->debugfs;
613 609
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.h b/drivers/gpu/nvgpu/gp106/xve_gp106.h
index 31d3a125..37ead910 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.h
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.h
@@ -104,7 +104,7 @@ int xve_get_speed_gp106(struct gk20a *g, u32 *xve_link_speed);
104void xve_disable_aspm_gp106(struct gk20a *g); 104void xve_disable_aspm_gp106(struct gk20a *g);
105int xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed); 105int xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed);
106void xve_available_speeds_gp106(struct gk20a *g, u32 *speed_mask); 106void xve_available_speeds_gp106(struct gk20a *g, u32 *speed_mask);
107int xve_sw_init_gp106(struct device *dev); 107int xve_sw_init_gp106(struct gk20a *g);
108#if defined(CONFIG_PCI_MSI) 108#if defined(CONFIG_PCI_MSI)
109void xve_rearm_msi_gp106(struct gk20a *g); 109void xve_rearm_msi_gp106(struct gk20a *g);
110#endif 110#endif