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/include/nvgpu/gk20a.h | 1 + drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index af8a868e..238329be 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -225,6 +225,7 @@ struct gpu_ops { void (*isr_stall)(struct gk20a *g, u32 inst_id, u32 pri_base); u32 (*isr_nonstall)(struct gk20a *g, u32 inst_id, u32 pri_base); u32 (*get_num_pce)(struct gk20a *g); + void (*init_prod_values)(struct gk20a *g); } ce2; struct { u32 (*get_patch_slots)(struct gk20a *g); diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h index efc14d00..57a76e68 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, 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"), @@ -104,4 +104,12 @@ static inline u32 ce_pce_map_r(void) { return 0x00104028U; } +static inline u32 ce_lce_opt_r(u32 i) +{ + return 0x00104414U + i*128U; +} +static inline u32 ce_lce_opt_force_barriers_npl__prod_f(void) +{ + return 0x8U; +} #endif -- cgit v1.2.2