diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/fb')
-rw-r--r-- | drivers/gpu/nvgpu/common/fb/fb_gv11b.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c b/drivers/gpu/nvgpu/common/fb/fb_gv11b.c index b98d1c41..49e8f385 100644 --- a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c +++ b/drivers/gpu/nvgpu/common/fb/fb_gv11b.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GV11B FB | 2 | * GV11B FB |
3 | * | 3 | * |
4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -62,6 +62,34 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g) | |||
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | static void gv11b_fb_set_atomic_mode(struct gk20a *g) | ||
66 | { | ||
67 | u32 reg_val; | ||
68 | |||
69 | /* | ||
70 | * NV_PFB_PRI_MMU_CTRL_ATOMIC_CAPABILITY_MODE to RMW MODE | ||
71 | * NV_PFB_PRI_MMU_CTRL_ATOMIC_CAPABILITY_SYS_NCOH_MODE to L2 | ||
72 | */ | ||
73 | reg_val = nvgpu_readl(g, fb_mmu_ctrl_r()); | ||
74 | reg_val = set_field(reg_val, fb_mmu_ctrl_atomic_capability_mode_m(), | ||
75 | fb_mmu_ctrl_atomic_capability_mode_rmw_f()); | ||
76 | reg_val = set_field(reg_val, fb_mmu_ctrl_atomic_capability_sys_ncoh_mode_m(), | ||
77 | fb_mmu_ctrl_atomic_capability_sys_ncoh_mode_l2_f()); | ||
78 | nvgpu_writel(g, fb_mmu_ctrl_r(), reg_val); | ||
79 | |||
80 | /* NV_PFB_HSHUB_NUM_ACTIVE_LTCS_HUB_SYS_ATOMIC_MODE to USE_RMW */ | ||
81 | reg_val = nvgpu_readl(g, fb_hshub_num_active_ltcs_r()); | ||
82 | reg_val = set_field(reg_val, fb_hshub_num_active_ltcs_hub_sys_atomic_mode_m(), | ||
83 | fb_hshub_num_active_ltcs_hub_sys_atomic_mode_use_rmw_f()); | ||
84 | nvgpu_writel(g, fb_hshub_num_active_ltcs_r(), reg_val); | ||
85 | |||
86 | nvgpu_log(g, gpu_dbg_info, "fb_mmu_ctrl_r 0x%x", | ||
87 | gk20a_readl(g, fb_mmu_ctrl_r())); | ||
88 | |||
89 | nvgpu_log(g, gpu_dbg_info, "fb_hshub_num_active_ltcs_r 0x%x", | ||
90 | gk20a_readl(g, fb_hshub_num_active_ltcs_r())); | ||
91 | } | ||
92 | |||
65 | void gv11b_fb_init_hw(struct gk20a *g) | 93 | void gv11b_fb_init_hw(struct gk20a *g) |
66 | { | 94 | { |
67 | gm20b_fb_init_hw(g); | 95 | gm20b_fb_init_hw(g); |
@@ -75,6 +103,8 @@ void gv11b_fb_init_fs_state(struct gk20a *g) | |||
75 | 103 | ||
76 | gv11b_init_nvlink_soc_credits(g); | 104 | gv11b_init_nvlink_soc_credits(g); |
77 | 105 | ||
106 | gv11b_fb_set_atomic_mode(g); | ||
107 | |||
78 | nvgpu_log(g, gpu_dbg_info, "fbhub active ltcs %x", | 108 | nvgpu_log(g, gpu_dbg_info, "fbhub active ltcs %x", |
79 | gk20a_readl(g, fb_fbhub_num_active_ltcs_r())); | 109 | gk20a_readl(g, fb_fbhub_num_active_ltcs_r())); |
80 | 110 | ||