From 8110cee82842da134d3dfdc2e13406f1f94aa8ed Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Fri, 27 Sep 2019 16:18:19 -0400 Subject: [PATCH] gpu: nvgpu: accessors for FB/HSSMU MMU_DEBUG_CTRL Add accessors for NV_PFB_HSMMU_PRI_MMU_DEBUG_CTRL and NV_PFB_PRI_MMU_DEBUG_CTRL Bug 2515097 Bug 2713590 Signed-off-by: Thomas Fleury Change-Id: Ieadee041854bc9a17721b5b17938a106e205517f Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2208770 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Kajetan Dutka Reviewed-by: Alex Waterman Reviewed-by: Yu-Huan Hsu Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: Kajetan Dutka Tested-by: mobile promotions --- .../include/nvgpu/hw/gv100/hw_fb_gv100.h | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fb_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fb_gv100.h index 66727b94b..ac248b57b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fb_gv100.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_fb_gv100.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2020, 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"), @@ -244,6 +244,26 @@ static inline u32 fb_hsmmu_pri_mmu_ctrl_atomic_capability_mode_power_f(void) { return 0x3000000U; } +static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_r(void) +{ + return 0x001facc4U; +} +static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_v(u32 r) +{ + return (r >> 16U) & 0x1U; +} +static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_m(void) +{ + return 0x1U << 16U; +} +static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_enabled_f(void) +{ + return 0x10000U; +} +static inline u32 fb_hsmmu_pri_mmu_debug_ctrl_debug_disabled_f(void) +{ + return 0x0U; +} static inline u32 fb_hshub_num_active_ltcs_r(void) { return 0x001fbc20U; @@ -676,10 +696,18 @@ static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void) { return 0x00000001U; } +static inline u32 fb_mmu_debug_ctrl_debug_enabled_f(void) +{ + return 0x10000U; +} static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void) { return 0x00000000U; } +static inline u32 fb_mmu_debug_ctrl_debug_disabled_f(void) +{ + return 0x0U; +} static inline u32 fb_niso_cfg1_r(void) { return 0x00100c14U;