summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h
index 248fa291..62e276de 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Graphics Context Pri Register Addressing 2 * GK20A Graphics Context Pri Register Addressing
3 * 3 *
4 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -167,12 +167,21 @@ static inline u32 pri_ppc_addr(struct gk20a *g, u32 addr, u32 gpc, u32 ppc)
167 ppc_in_gpc_base + (ppc * ppc_in_gpc_stride) + addr; 167 ppc_in_gpc_base + (ppc * ppc_in_gpc_stride) + addr;
168} 168}
169 169
170/*
171 * LTC pri addressing
172 */
173static inline bool pri_is_ltc_addr(u32 addr)
174{
175 return ((addr >= ltc_pltcg_base_v()) && (addr < ltc_pltcg_extent_v()));
176}
177
170enum ctxsw_addr_type { 178enum ctxsw_addr_type {
171 CTXSW_ADDR_TYPE_SYS = 0, 179 CTXSW_ADDR_TYPE_SYS = 0,
172 CTXSW_ADDR_TYPE_GPC = 1, 180 CTXSW_ADDR_TYPE_GPC = 1,
173 CTXSW_ADDR_TYPE_TPC = 2, 181 CTXSW_ADDR_TYPE_TPC = 2,
174 CTXSW_ADDR_TYPE_BE = 3, 182 CTXSW_ADDR_TYPE_BE = 3,
175 CTXSW_ADDR_TYPE_PPC = 4 183 CTXSW_ADDR_TYPE_PPC = 4,
184 CTXSW_ADDR_TYPE_LTCS = 5
176}; 185};
177 186
178#define PRI_BROADCAST_FLAGS_NONE 0 187#define PRI_BROADCAST_FLAGS_NONE 0
@@ -180,5 +189,7 @@ enum ctxsw_addr_type {
180#define PRI_BROADCAST_FLAGS_TPC BIT(1) 189#define PRI_BROADCAST_FLAGS_TPC BIT(1)
181#define PRI_BROADCAST_FLAGS_BE BIT(2) 190#define PRI_BROADCAST_FLAGS_BE BIT(2)
182#define PRI_BROADCAST_FLAGS_PPC BIT(3) 191#define PRI_BROADCAST_FLAGS_PPC BIT(3)
192#define PRI_BROADCAST_FLAGS_LTCS BIT(4)
193#define PRI_BROADCAST_FLAGS_LTSS BIT(5)
183 194
184#endif /* GR_PRI_GK20A_H */ 195#endif /* GR_PRI_GK20A_H */