diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2015-06-18 22:54:59 +0900 |
---|---|---|
committer | Alexandre Courbot <acourbot@nvidia.com> | 2015-08-06 13:26:22 +0900 |
commit | 0b233fe7020abc3bdce62ccded45fa14034a602a (patch) | |
tree | 0e5253a69baee1c66c77a59a5ea8276cd93695f1 | |
parent | fdcf960a4eb567cbde518556e0598220822a29d6 (diff) | |
download | nouveau-0b233fe7020abc3bdce62ccded45fa14034a602a.tar.gz |
Some comments for GK20A
This reverts commit 9495a0bcfb62849a1f9a7647c8dd1b9e0dd52a04.
-rw-r--r-- | drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 13 | ||||
-rw-r--r-- | drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 10 | ||||
-rw-r--r-- | drm/nouveau/nvkm/engine/gr/gk20a.c | 2 |
3 files changed, 25 insertions, 0 deletions
diff --git a/drm/nouveau/nvkm/engine/gr/ctxgk20a.c b/drm/nouveau/nvkm/engine/gr/ctxgk20a.c index 3fe080e31..2b90ada9b 100644 --- a/drm/nouveau/nvkm/engine/gr/ctxgk20a.c +++ b/drm/nouveau/nvkm/engine/gr/ctxgk20a.c @@ -39,15 +39,22 @@ gk20a_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) idle_timeout_save = nv_rd32(priv, 0x404154); nv_wr32(priv, 0x404154, 0x00000000); + /* Commit global CB manager */ oclass->attrib(info); + /* Commit global timeslice */ oclass->unkn(priv); + /* init_fs_state (ctx_state_floorsweep) */ gf100_grctx_generate_tpcid(priv); gf100_grctx_generate_r406028(priv); + /* ctx_state_floorsweep -> gr_gk20a_setup_rop_mapping */ gk104_grctx_generate_r418bb8(priv); + /* ctx_state_floorsweep -> setup_alpha_beta_tables */ gf100_grctx_generate_r406800(priv); + /* set_max_ways_evict_last ? */ + for (i = 0; i < 8; i++) nv_wr32(priv, 0x4064d0 + (i * 0x04), 0x00000000); @@ -56,6 +63,7 @@ gk20a_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) gk104_grctx_generate_rop_active_fbps(priv); nv_mask(priv, 0x5044b0, 0x8000000, 0x8000000); + /* End init_fs_state (ctx_state_floorsweep) */ gf100_gr_wait_idle(priv); @@ -66,8 +74,13 @@ gk20a_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) gf100_gr_wait_idle(priv); gf100_gr_icmd(priv, priv->fuc_bundle); + /* commit_global_ctx_buffers */ oclass->pagepool(info); oclass->bundle(info); + /* commit_global_attrib_cb ops are done in ->attrib() */ + + /* flush L2 here? */ + /* write ctx header? */ } struct nvkm_oclass * diff --git a/drm/nouveau/nvkm/engine/gr/ctxgm20b.c b/drm/nouveau/nvkm/engine/gr/ctxgm20b.c index c011bf327..e194ef966 100644 --- a/drm/nouveau/nvkm/engine/gr/ctxgm20b.c +++ b/drm/nouveau/nvkm/engine/gr/ctxgm20b.c @@ -48,12 +48,16 @@ gm20b_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) idle_timeout_save = nv_rd32(priv, 0x404154); nv_wr32(priv, 0x404154, 0x00000000); + /* Commit global CB manager */ oclass->attrib(info); + /* Commit global timeslice */ oclass->unkn(priv); + /* init_fs_state (ctx_state_floorsweep) */ gm204_grctx_generate_tpcid(priv); gm20b_grctx_generate_r406028(priv); + /* ctx_state_floorsweep -> gr_gk20a_setup_rop_mapping */ gk104_grctx_generate_r418bb8(priv); for (i = 0; i < 8; i++) @@ -69,6 +73,7 @@ gm20b_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) nv_wr32(priv, 0x4041c4, tmp); gm204_grctx_generate_405b60(priv); + /* End init_fs_state (ctx_state_floorsweep) */ gf100_gr_wait_idle(priv); @@ -79,8 +84,13 @@ gm20b_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) gf100_gr_wait_idle(priv); gf100_gr_icmd(priv, priv->fuc_bundle); + /* commit_global_ctx_buffers */ oclass->pagepool(info); oclass->bundle(info); + /* commit_global_attrib_cb ops are done in ->attrib() */ + + /* flush L2 here? */ + /* write ctx header? */ } struct nvkm_oclass * diff --git a/drm/nouveau/nvkm/engine/gr/gk20a.c b/drm/nouveau/nvkm/engine/gr/gk20a.c index fc4a910b2..b6a7c2623 100644 --- a/drm/nouveau/nvkm/engine/gr/gk20a.c +++ b/drm/nouveau/nvkm/engine/gr/gk20a.c @@ -336,6 +336,8 @@ gk20a_gr_init(struct nvkm_object *object) gf100_gr_zbc_init(priv); + /* Missing LTC CBC init? */ + return gf100_gr_init_ctxctl(priv); } |