summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-08-27 07:16:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-31 00:42:39 -0400
commit5e90bf3f6c35361cacc1ce8588c3120091d54f58 (patch)
tree28155f352d97f33adff9fa62f06cb87d1570925b /drivers/gpu/nvgpu/gk20a
parenta6108a4b0ed52c7a8fa58d9815d0b373be8305bf (diff)
gpu: nvgpu: remove ctx header desc type
The graphics subctx header object is nothing but memory. Drop the dependency to gr header file in the channel header file and substitute struct nvgpu_mem for struct ctx_header_desc. Jira NVGPU-967 Change-Id: Ic3976391016c42d2ada4aac3e0851a1222244ce9 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1807370 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h4
-rw-r--r--drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c9
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h4
4 files changed, 6 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index f7515294..2a1fd03f 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -29,8 +29,8 @@
29#include <nvgpu/timers.h> 29#include <nvgpu/timers.h>
30#include <nvgpu/cond.h> 30#include <nvgpu/cond.h>
31#include <nvgpu/atomic.h> 31#include <nvgpu/atomic.h>
32#include <nvgpu/nvgpu_mem.h>
32 33
33#include "gr_gk20a.h"
34 34
35struct gk20a; 35struct gk20a;
36struct dbg_session_gk20a; 36struct dbg_session_gk20a;
@@ -266,7 +266,7 @@ struct channel_gk20a {
266 u64 virt_ctx; 266 u64 virt_ctx;
267#endif 267#endif
268 268
269 struct ctx_header_desc ctx_header; 269 struct nvgpu_mem ctx_header;
270 270
271 /* Any operating system specific data. */ 271 /* Any operating system specific data. */
272 void *os_priv; 272 void *os_priv;
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
index b4a241e4..78b753d1 100644
--- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
@@ -669,7 +669,7 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g,
669 GK20A_FECS_TRACE_NUM_RECORDS)); 669 GK20A_FECS_TRACE_NUM_RECORDS));
670 670
671 if (nvgpu_is_enabled(g, NVGPU_FECS_TRACE_VA)) 671 if (nvgpu_is_enabled(g, NVGPU_FECS_TRACE_VA))
672 mem = &ch->ctx_header.mem; 672 mem = &ch->ctx_header;
673 673
674 nvgpu_mem_wr(g, mem, 674 nvgpu_mem_wr(g, mem,
675 ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(), 675 ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(),
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index dbf9ff05..ead5d34a 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -808,8 +808,7 @@ static int gr_gk20a_ctx_zcull_setup(struct gk20a *g, struct channel_gk20a *c)
808 struct tsg_gk20a *tsg; 808 struct tsg_gk20a *tsg;
809 struct nvgpu_gr_ctx *gr_ctx = NULL; 809 struct nvgpu_gr_ctx *gr_ctx = NULL;
810 struct nvgpu_mem *mem = NULL; 810 struct nvgpu_mem *mem = NULL;
811 struct ctx_header_desc *ctx = &c->ctx_header; 811 struct nvgpu_mem *ctxheader = &c->ctx_header;
812 struct nvgpu_mem *ctxheader = &ctx->mem;
813 int ret = 0; 812 int ret = 0;
814 813
815 nvgpu_log_fn(g, " "); 814 nvgpu_log_fn(g, " ");
@@ -1683,8 +1682,7 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g,
1683 struct pm_ctx_desc *pm_ctx; 1682 struct pm_ctx_desc *pm_ctx;
1684 u32 data; 1683 u32 data;
1685 u64 virt_addr = 0; 1684 u64 virt_addr = 0;
1686 struct ctx_header_desc *ctx = &c->ctx_header; 1685 struct nvgpu_mem *ctxheader = &c->ctx_header;
1687 struct nvgpu_mem *ctxheader = &ctx->mem;
1688 int ret; 1686 int ret;
1689 1687
1690 nvgpu_log_fn(g, " "); 1688 nvgpu_log_fn(g, " ");
@@ -6620,8 +6618,7 @@ static int gr_gk20a_ctx_patch_smpc(struct gk20a *g,
6620 u32 tpc_in_gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_TPC_IN_GPC_STRIDE); 6618 u32 tpc_in_gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_TPC_IN_GPC_STRIDE);
6621 struct tsg_gk20a *tsg; 6619 struct tsg_gk20a *tsg;
6622 struct nvgpu_gr_ctx *gr_ctx; 6620 struct nvgpu_gr_ctx *gr_ctx;
6623 struct ctx_header_desc *ctx = &ch->ctx_header; 6621 struct nvgpu_mem *ctxheader = &ch->ctx_header;
6624 struct nvgpu_mem *ctxheader = &ctx->mem;
6625 6622
6626 tsg = tsg_gk20a_from_ch(ch); 6623 tsg = tsg_gk20a_from_ch(ch);
6627 if (!tsg) 6624 if (!tsg)
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index bd5e625d..0d32cca3 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -434,10 +434,6 @@ struct gr_gk20a {
434 434
435void gk20a_fecs_dump_falcon_stats(struct gk20a *g); 435void gk20a_fecs_dump_falcon_stats(struct gk20a *g);
436 436
437struct ctx_header_desc {
438 struct nvgpu_mem mem;
439};
440
441/* contexts associated with a TSG */ 437/* contexts associated with a TSG */
442struct nvgpu_gr_ctx { 438struct nvgpu_gr_ctx {
443 struct nvgpu_mem mem; 439 struct nvgpu_mem mem;