[Nouveau] [PATCH 4/5] xtensa: use the nvkm_firmware functions
Alexandre Courbot
acourbot at nvidia.com
Sun Jan 17 22:07:12 PST 2016
Use the newly-introduced nvkm_firmware functions. Note that this will
change the expected location of firmware files.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau/nvkm/engine/xtensa.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drm/nouveau/nvkm/engine/xtensa.c b/drm/nouveau/nvkm/engine/xtensa.c
index a3d4f5bcec7a..608741a52fed 100644
--- a/drm/nouveau/nvkm/engine/xtensa.c
+++ b/drm/nouveau/nvkm/engine/xtensa.c
@@ -22,6 +22,7 @@
#include <engine/xtensa.h>
#include <core/gpuobj.h>
+#include <core/firmware.h>
#include <engine/fifo.h>
static int
@@ -104,10 +105,9 @@ nvkm_xtensa_init(struct nvkm_engine *engine)
u32 tmp;
if (!xtensa->gpu_fw) {
- snprintf(name, sizeof(name), "nouveau/nv84_xuc%03x",
- xtensa->addr >> 12);
+ snprintf(name, sizeof(name), "xuc%03x", xtensa->addr >> 12);
- ret = request_firmware(&fw, name, device->dev);
+ ret = nvkm_firmware_get(device, name, &fw);
if (ret) {
nvkm_warn(subdev, "unable to load firmware %s\n", name);
return ret;
@@ -115,7 +115,7 @@ nvkm_xtensa_init(struct nvkm_engine *engine)
if (fw->size > 0x40000) {
nvkm_warn(subdev, "firmware %s too large\n", name);
- release_firmware(fw);
+ nvkm_firmware_put(fw);
return -EINVAL;
}
@@ -123,7 +123,7 @@ nvkm_xtensa_init(struct nvkm_engine *engine)
0x40000, 0x1000, false,
&xtensa->gpu_fw);
if (ret) {
- release_firmware(fw);
+ nvkm_firmware_put(fw);
return ret;
}
@@ -131,7 +131,7 @@ nvkm_xtensa_init(struct nvkm_engine *engine)
for (i = 0; i < fw->size / 4; i++)
nvkm_wo32(xtensa->gpu_fw, i * 4, *((u32 *)fw->data + i));
nvkm_done(xtensa->gpu_fw);
- release_firmware(fw);
+ nvkm_firmware_put(fw);
}
addr = nvkm_memory_addr(xtensa->gpu_fw);
--
2.7.0
More information about the Nouveau
mailing list