diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-05-24 18:25:41 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:07 -0400 |
commit | d71d38087ded679f60714dae3a859523a19df04f (patch) | |
tree | 61439d294705ef91ce08ae4c02d4921eec943283 /drivers/gpu/nvgpu/vgpu | |
parent | 5215d65c25b5e76c19d9d12b03c52f69e2d40227 (diff) |
gpu: nvgpu: Separate timer from bus
Code touching timer registers was combined with bus code. They're two
logically separate register spaces, so separate the code accordingly.
JIRA NVGPU-588
Change-Id: I40e2925ff156669f41ddc1f2e7714f92a2da367b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730893
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 | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c index 2e12b512..3fa78e54 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c | |||
@@ -523,11 +523,14 @@ static const struct gpu_ops vgpu_gp10b_ops = { | |||
523 | .bus = { | 523 | .bus = { |
524 | .init_hw = gk20a_bus_init_hw, | 524 | .init_hw = gk20a_bus_init_hw, |
525 | .isr = gk20a_bus_isr, | 525 | .isr = gk20a_bus_isr, |
526 | .read_ptimer = vgpu_read_ptimer, | ||
527 | .get_timestamps_zipper = vgpu_get_timestamps_zipper, | ||
528 | .bar1_bind = gk20a_bus_bar1_bind, | 526 | .bar1_bind = gk20a_bus_bar1_bind, |
529 | .set_bar0_window = gk20a_bus_set_bar0_window, | 527 | .set_bar0_window = gk20a_bus_set_bar0_window, |
530 | }, | 528 | }, |
529 | .ptimer = { | ||
530 | .isr = NULL, | ||
531 | .read_ptimer = vgpu_read_ptimer, | ||
532 | .get_timestamps_zipper = vgpu_get_timestamps_zipper, | ||
533 | }, | ||
531 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 534 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
532 | .css = { | 535 | .css = { |
533 | .enable_snapshot = vgpu_css_enable_snapshot_buffer, | 536 | .enable_snapshot = vgpu_css_enable_snapshot_buffer, |
@@ -578,6 +581,7 @@ int vgpu_gp10b_init_hal(struct gk20a *g) | |||
578 | gops->debugger = vgpu_gp10b_ops.debugger; | 581 | gops->debugger = vgpu_gp10b_ops.debugger; |
579 | gops->dbg_session_ops = vgpu_gp10b_ops.dbg_session_ops; | 582 | gops->dbg_session_ops = vgpu_gp10b_ops.dbg_session_ops; |
580 | gops->bus = vgpu_gp10b_ops.bus; | 583 | gops->bus = vgpu_gp10b_ops.bus; |
584 | gops->ptimer = vgpu_gp10b_ops.ptimer; | ||
581 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 585 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
582 | gops->css = vgpu_gp10b_ops.css; | 586 | gops->css = vgpu_gp10b_ops.css; |
583 | #endif | 587 | #endif |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index 0b1aa672..d6b305d4 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -574,11 +574,14 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
574 | .bus = { | 574 | .bus = { |
575 | .init_hw = gk20a_bus_init_hw, | 575 | .init_hw = gk20a_bus_init_hw, |
576 | .isr = gk20a_bus_isr, | 576 | .isr = gk20a_bus_isr, |
577 | .read_ptimer = vgpu_read_ptimer, | ||
578 | .get_timestamps_zipper = vgpu_get_timestamps_zipper, | ||
579 | .bar1_bind = NULL, | 577 | .bar1_bind = NULL, |
580 | .set_bar0_window = gk20a_bus_set_bar0_window, | 578 | .set_bar0_window = gk20a_bus_set_bar0_window, |
581 | }, | 579 | }, |
580 | .ptimer = { | ||
581 | .isr = NULL, | ||
582 | .read_ptimer = vgpu_read_ptimer, | ||
583 | .get_timestamps_zipper = vgpu_get_timestamps_zipper, | ||
584 | }, | ||
582 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 585 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
583 | .css = { | 586 | .css = { |
584 | .enable_snapshot = vgpu_css_enable_snapshot_buffer, | 587 | .enable_snapshot = vgpu_css_enable_snapshot_buffer, |
@@ -625,6 +628,7 @@ int vgpu_gv11b_init_hal(struct gk20a *g) | |||
625 | gops->debugger = vgpu_gv11b_ops.debugger; | 628 | gops->debugger = vgpu_gv11b_ops.debugger; |
626 | gops->dbg_session_ops = vgpu_gv11b_ops.dbg_session_ops; | 629 | gops->dbg_session_ops = vgpu_gv11b_ops.dbg_session_ops; |
627 | gops->bus = vgpu_gv11b_ops.bus; | 630 | gops->bus = vgpu_gv11b_ops.bus; |
631 | gops->ptimer = vgpu_gv11b_ops.ptimer; | ||
628 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 632 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
629 | gops->css = vgpu_gv11b_ops.css; | 633 | gops->css = vgpu_gv11b_ops.css; |
630 | #endif | 634 | #endif |
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 2bdef427..7760b56f 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -21,7 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <nvgpu/enabled.h> | 23 | #include <nvgpu/enabled.h> |
24 | #include <nvgpu/bus.h> | 24 | #include <nvgpu/ptimer.h> |
25 | #include <nvgpu/vgpu/vgpu_ivc.h> | 25 | #include <nvgpu/vgpu/vgpu_ivc.h> |
26 | #include <nvgpu/vgpu/vgpu.h> | 26 | #include <nvgpu/vgpu/vgpu.h> |
27 | 27 | ||