From 0bdffbed34df2e35f1df305173cd19eeb5582305 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 10 Jul 2019 15:22:21 +0530 Subject: gpu: nvgpu: set CE prod values Add g->ops.ce.init_prod_values() hal for gv11b to initialize PROD values of CE unit Bug 2526212 Chery-pick/manual port from dev-main Change-Id: I8e516b292622e09c537feb7830392648116baa7c Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/2150874 (cherry picked from commit 0e6a305c6af3ea6d9a0cad7b4071f68028a1aebe) Reviewed-on: https://git-master.nvidia.com/r/2224709 Reviewed-by: Seshendra Gadagottu GVS: Gerrit_Virtual_Submit Tested-by: Peter Daifuku Reviewed-by: Luis Dib Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/ce_gv11b.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gv11b/ce_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c index 2eea11df..035f2ef9 100644 --- a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c @@ -1,7 +1,7 @@ /* * Volta GPU series Copy Engine. * - * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -108,3 +108,17 @@ void gv11b_ce_mthd_buffer_fault_in_bar2_fault(struct gk20a *g) } } } + +void gv11b_ce_init_prod_values(struct gk20a *g) +{ + u32 reg_val; + u32 num_lce, lce; + + num_lce = gv11b_ce_get_num_lce(g); + + for (lce = 0U; lce < num_lce; lce++) { + reg_val = nvgpu_readl(g, ce_lce_opt_r(lce)); + reg_val |= ce_lce_opt_force_barriers_npl__prod_f(); + nvgpu_writel(g, ce_lce_opt_r(lce), reg_val); + } +} -- cgit v1.2.2