diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2017-10-06 19:27:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-13 18:20:18 -0400 |
commit | 57fb527a7e33384341fc18f1f918d5a8225057f5 (patch) | |
tree | 23bb49f879ac495834237c99564f0589d637f07e /drivers/gpu/nvgpu/vgpu/ltc_vgpu.c | |
parent | 3d343c9eeaa3415851d1c71b8815eb7dc2677b5a (diff) |
gpu: nvgpu: vgpu: flatten out vgpu hal
Instead of calling the native HAL init function then adding
multiple layers of modification for VGPU, flatten out the sequence
so that all entry points are set statically and visible in a
single file.
JIRA ESRM-30
Change-Id: Ie424abb48bce5038874851d399baac5e4bb7d27c
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1574616
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/ltc_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/ltc_vgpu.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c index db39b309..a6848872 100644 --- a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Virtualized GPU L2 | 2 | * Virtualized GPU L2 |
3 | * | 3 | * |
4 | * Copyright (c) 2014-2016 NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -23,8 +23,9 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "vgpu/vgpu.h" | 25 | #include "vgpu/vgpu.h" |
26 | #include "vgpu/ltc_vgpu.h" | ||
26 | 27 | ||
27 | static int vgpu_determine_L2_size_bytes(struct gk20a *g) | 28 | int vgpu_determine_L2_size_bytes(struct gk20a *g) |
28 | { | 29 | { |
29 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); | 30 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); |
30 | 31 | ||
@@ -33,7 +34,7 @@ static int vgpu_determine_L2_size_bytes(struct gk20a *g) | |||
33 | return priv->constants.l2_size; | 34 | return priv->constants.l2_size; |
34 | } | 35 | } |
35 | 36 | ||
36 | static int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) | 37 | int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) |
37 | { | 38 | { |
38 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); | 39 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); |
39 | u32 max_comptag_lines = 0; | 40 | u32 max_comptag_lines = 0; |
@@ -56,7 +57,7 @@ static int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) | |||
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | 59 | ||
59 | static void vgpu_ltc_init_fs_state(struct gk20a *g) | 60 | void vgpu_ltc_init_fs_state(struct gk20a *g) |
60 | { | 61 | { |
61 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); | 62 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); |
62 | 63 | ||
@@ -64,11 +65,3 @@ static void vgpu_ltc_init_fs_state(struct gk20a *g) | |||
64 | 65 | ||
65 | g->ltc_count = priv->constants.ltc_count; | 66 | g->ltc_count = priv->constants.ltc_count; |
66 | } | 67 | } |
67 | |||
68 | void vgpu_init_ltc_ops(struct gpu_ops *gops) | ||
69 | { | ||
70 | gops->ltc.determine_L2_size_bytes = vgpu_determine_L2_size_bytes; | ||
71 | gops->ltc.init_comptags = vgpu_ltc_init_comptags; | ||
72 | gops->ltc.init_fs_state = vgpu_ltc_init_fs_state; | ||
73 | gops->ltc.cbc_ctrl = NULL; | ||
74 | } | ||