diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2017-01-26 15:00:45 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-03-07 17:05:12 +1000 |
commit | 65d9376b74ff651a8d4c6736d32a3bb3aa47bf09 (patch) | |
tree | 25a9c323f4d9698855c80b5553a788eb6ffff64f /drivers/gpu/drm/nouveau/nvkm/falcon | |
parent | 1106459e9f691e0655d3559734f2ff2084711474 (diff) | |
download | linux-65d9376b74ff651a8d4c6736d32a3bb3aa47bf09.tar.bz2 |
drm/nouveau/falcon: use NXTCTX register instead of NEW_INSTBLK
Both registers allow to bind a new context, but NXTCTX will work on all
falcons, while legacy NEW_INSTBLK is reserved to PMU.
After setting NXTCTX we trigger a context switch by writing 0x090 and
0x0a4.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/falcon')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c b/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c index 7085432dc861..c8283e2cc1f4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c @@ -149,9 +149,12 @@ nvkm_falcon_v1_bind_context(struct nvkm_falcon *falcon, struct nvkm_gpuobj *ctx) /* Enable context */ nvkm_falcon_mask(falcon, 0x048, 0x1, 0x1); - nvkm_falcon_wr32(falcon, 0x480, + nvkm_falcon_wr32(falcon, 0x054, ((ctx->addr >> 12) & 0xfffffff) | (inst_loc << 28) | (1 << 30)); + + nvkm_falcon_mask(falcon, 0x090, 0x10000, 0x10000); + nvkm_falcon_mask(falcon, 0x0a4, 0x8, 0x8); } static void |