diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-08-10 11:28:23 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-13 17:06:17 -0400 |
commit | e62785190f74cfbf9003a190a768e9077373bf6f (patch) | |
tree | be7bf93828c948d3b9bc84ec31f3f21cec35cf9e /drivers/gpu/nvgpu/vgpu | |
parent | 0706e94c9204becdee6a32391a319cad690d1bc3 (diff) |
gpu: nvgpu: Move priv_ring HAL to common
Move implementation of priv_ring HAL to common/priv_ring. Implement
two new HAL APIs to remove illegal dependencies: enable_priv_ring and
enum_ltc.
As enum_ltc can be implemented only gm20b onwards, bump gk20a
implementation to base on gm20b.
JIRA NVGPU-964
Change-Id: I160c2216132aadbcd98bb4a688aeeb2c520a9bc0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1797025
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c index a8aa023b..15e2717d 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include "common/bus/bus_gk20a.h" | 23 | #include "common/bus/bus_gk20a.h" |
24 | #include "common/bus/bus_gm20b.h" | 24 | #include "common/bus/bus_gm20b.h" |
25 | #include "common/priv_ring/priv_ring_gm20b.h" | ||
26 | #include "common/priv_ring/priv_ring_gp10b.h" | ||
25 | #include "common/clock_gating/gp10b_gating_reglist.h" | 27 | #include "common/clock_gating/gp10b_gating_reglist.h" |
26 | #include "common/fb/fb_gk20a.h" | 28 | #include "common/fb/fb_gk20a.h" |
27 | #include "common/fb/fb_gm20b.h" | 29 | #include "common/fb/fb_gm20b.h" |
@@ -55,7 +57,6 @@ | |||
55 | #include "gp10b/fifo_gp10b.h" | 57 | #include "gp10b/fifo_gp10b.h" |
56 | #include "gp10b/regops_gp10b.h" | 58 | #include "gp10b/regops_gp10b.h" |
57 | #include "gp10b/therm_gp10b.h" | 59 | #include "gp10b/therm_gp10b.h" |
58 | #include "gp10b/priv_ring_gp10b.h" | ||
59 | #include "gp10b/fuse_gp10b.h" | 60 | #include "gp10b/fuse_gp10b.h" |
60 | 61 | ||
61 | #include "gm20b/ltc_gm20b.h" | 62 | #include "gm20b/ltc_gm20b.h" |
@@ -552,9 +553,11 @@ static const struct gpu_ops vgpu_gp10b_ops = { | |||
552 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | 553 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, |
553 | }, | 554 | }, |
554 | .priv_ring = { | 555 | .priv_ring = { |
556 | .enable_priv_ring = gm20b_priv_ring_enable, | ||
555 | .isr = gp10b_priv_ring_isr, | 557 | .isr = gp10b_priv_ring_isr, |
556 | .set_ppriv_timeout_settings = | 558 | .set_ppriv_timeout_settings = |
557 | gk20a_priv_set_timeout_settings, | 559 | gm20b_priv_set_timeout_settings, |
560 | .enum_ltc = gm20b_priv_ring_enum_ltc, | ||
558 | }, | 561 | }, |
559 | .fuse = { | 562 | .fuse = { |
560 | .check_priv_security = vgpu_gp10b_fuse_check_priv_security, | 563 | .check_priv_security = vgpu_gp10b_fuse_check_priv_security, |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index b91691e2..995a2c2c 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include "common/bus/bus_gk20a.h" | 23 | #include "common/bus/bus_gk20a.h" |
24 | #include "common/bus/bus_gm20b.h" | 24 | #include "common/bus/bus_gm20b.h" |
25 | #include "common/priv_ring/priv_ring_gm20b.h" | ||
26 | #include "common/priv_ring/priv_ring_gp10b.h" | ||
25 | #include "common/clock_gating/gv11b_gating_reglist.h" | 27 | #include "common/clock_gating/gv11b_gating_reglist.h" |
26 | #include "common/fb/fb_gk20a.h" | 28 | #include "common/fb/fb_gk20a.h" |
27 | #include "common/fb/fb_gm20b.h" | 29 | #include "common/fb/fb_gm20b.h" |
@@ -62,7 +64,6 @@ | |||
62 | #include "gp10b/gr_gp10b.h" | 64 | #include "gp10b/gr_gp10b.h" |
63 | #include <gp10b/fifo_gp10b.h> | 65 | #include <gp10b/fifo_gp10b.h> |
64 | #include <gp10b/therm_gp10b.h> | 66 | #include <gp10b/therm_gp10b.h> |
65 | #include <gp10b/priv_ring_gp10b.h> | ||
66 | #include <gp10b/ltc_gp10b.h> | 67 | #include <gp10b/ltc_gp10b.h> |
67 | #include <gp10b/fuse_gp10b.h> | 68 | #include <gp10b/fuse_gp10b.h> |
68 | 69 | ||
@@ -622,9 +623,11 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
622 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | 623 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, |
623 | }, | 624 | }, |
624 | .priv_ring = { | 625 | .priv_ring = { |
626 | .enable_priv_ring = gm20b_priv_ring_enable, | ||
625 | .isr = gp10b_priv_ring_isr, | 627 | .isr = gp10b_priv_ring_isr, |
626 | .set_ppriv_timeout_settings = | 628 | .set_ppriv_timeout_settings = |
627 | gk20a_priv_set_timeout_settings, | 629 | gm20b_priv_set_timeout_settings, |
630 | .enum_ltc = gm20b_priv_ring_enum_ltc, | ||
628 | }, | 631 | }, |
629 | .fuse = { | 632 | .fuse = { |
630 | .is_opt_ecc_enable = gp10b_fuse_is_opt_ecc_enable, | 633 | .is_opt_ecc_enable = gp10b_fuse_is_opt_ecc_enable, |