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/gp106/hal_gp106.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/hal_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index a2e76a00..90d25fa0 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -27,6 +27,8 @@ #include "common/ptimer/ptimer_gk20a.h" #include "common/bus/bus_gm20b.h" #include "common/bus/bus_gp10b.h" +#include "common/priv_ring/priv_ring_gm20b.h" +#include "common/priv_ring/priv_ring_gp10b.h" #include "common/fb/fb_gk20a.h" #include "common/fb/fb_gp10b.h" #include "common/fb/fb_gm20b.h" @@ -52,11 +54,9 @@ #include "gp10b/mm_gp10b.h" #include "gp10b/ce_gp10b.h" #include "gp10b/regops_gp10b.h" -#include "gp10b/priv_ring_gp10b.h" #include "gp10b/fifo_gp10b.h" #include "gp10b/pmu_gp10b.h" #include "gp10b/gr_gp10b.h" -#include "gp10b/priv_ring_gp10b.h" #include "gp10b/fuse_gp10b.h" #include "gp106/fifo_gp106.h" @@ -774,10 +774,12 @@ static const struct gpu_ops gp106_ops = { .falcon_hal_sw_init = gp106_falcon_hal_sw_init, }, .priv_ring = { + .enable_priv_ring = gm20b_priv_ring_enable, .isr = gp10b_priv_ring_isr, .decode_error_code = gp10b_priv_ring_decode_error_code, .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 = gp106_fuse_check_priv_security, -- cgit v1.2.2