diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:17 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:36 +1000 |
commit | 406ca8c714825c2d9e2c866787150eae4e1a1cc3 (patch) | |
tree | 734d110e5a53aca14af62ce0e467d4ce47a643ad /drivers/gpu | |
parent | 5b1ab0c2c79c3556c4350f4f47d11745fdffad8f (diff) | |
download | talos-obmc-linux-406ca8c714825c2d9e2c866787150eae4e1a1cc3.tar.gz talos-obmc-linux-406ca8c714825c2d9e2c866787150eae4e1a1cc3.zip |
drm/nouveau/falcon: directly use instmem for ucode image
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/falcon.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h index 3ce0ffc8ef86..5e6f1f518ea5 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h @@ -35,7 +35,7 @@ struct nvkm_falcon { u8 version; u8 secret; - struct nvkm_gpuobj *core; + struct nvkm_memory *core; bool external; struct { diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c index ac39cb7e7299..27bc50e80a56 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c @@ -168,8 +168,9 @@ _nvkm_falcon_init(struct nvkm_object *object) /* ensure any "self-bootstrapping" firmware image is in vram */ if (!falcon->data.data && !falcon->core) { - ret = nvkm_gpuobj_new(object->parent, NULL, falcon->code.size, - 256, 0, &falcon->core); + ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, + falcon->code.size, 256, false, + &falcon->core); if (ret) { nvkm_error(subdev, "core allocation failed, %d\n", ret); return ret; @@ -183,12 +184,13 @@ _nvkm_falcon_init(struct nvkm_object *object) /* upload firmware bootloader (or the full code segments) */ if (falcon->core) { + u64 addr = nvkm_memory_addr(falcon->core); if (device->card_type < NV_C0) nvkm_wr32(device, base + 0x618, 0x04000000); else nvkm_wr32(device, base + 0x618, 0x00000114); nvkm_wr32(device, base + 0x11c, 0); - nvkm_wr32(device, base + 0x110, falcon->core->addr >> 8); + nvkm_wr32(device, base + 0x110, addr >> 8); nvkm_wr32(device, base + 0x114, 0); nvkm_wr32(device, base + 0x118, 0x00006610); } else { @@ -243,7 +245,7 @@ _nvkm_falcon_fini(struct nvkm_object *object, bool suspend) const u32 base = falcon->addr; if (!suspend) { - nvkm_gpuobj_ref(NULL, &falcon->core); + nvkm_memory_del(&falcon->core); if (falcon->external) { vfree(falcon->data.data); vfree(falcon->code.data); |