From e62785190f74cfbf9003a190a768e9077373bf6f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 10 Aug 2018 08:28:23 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1797025 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b') diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index b37f6244..e6c4c8d1 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -25,6 +25,7 @@ #include "common/clock_gating/gm20b_gating_reglist.h" #include "common/bus/bus_gm20b.h" #include "common/bus/bus_gk20a.h" +#include "common/priv_ring/priv_ring_gm20b.h" #include "common/ptimer/ptimer_gk20a.h" #include "common/fb/fb_gk20a.h" #include "common/fb/fb_gm20b.h" @@ -38,7 +39,6 @@ #include "gk20a/css_gr_gk20a.h" #include "gk20a/mc_gk20a.h" #include "gk20a/flcn_gk20a.h" -#include "gk20a/priv_ring_gk20a.h" #include "gk20a/regops_gk20a.h" #include "gk20a/pmu_gk20a.h" #include "gk20a/gr_gk20a.h" @@ -641,9 +641,11 @@ static const struct gpu_ops gm20b_ops = { .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, }, .priv_ring = { - .isr = gk20a_priv_ring_isr, + .enable_priv_ring = gm20b_priv_ring_enable, + .isr = gm20b_priv_ring_isr, .set_ppriv_timeout_settings = - gk20a_priv_set_timeout_settings, + gm20b_priv_set_timeout_settings, + .enum_ltc = gm20b_priv_ring_enum_ltc, }, .fuse = { .check_priv_security = gm20b_fuse_check_priv_security, -- cgit v1.2.2