Ilia Mirkin
2013-Jul-19 10:27 UTC
[Nouveau] [PATCH] drm/nouveau/xtensa: firmware size needs to be 0x40000 no matter what
The current logic is wrong since we send fw->size >> 8 to the card. Rounding the size up by 0x100 and 0x1000 didn't seem to help, the card still hung, so go back to what the blob does -- 0x40000. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- What's currently in the tree causes the card to hang. Looking back at all the patches I sent, I always had the firmware size at 0x40000. But I never got around to testing what had actually made it into the tree, so my bad. I tried doing ALING(fw->size, 0x100) (since we send the size >> 8) and also ALIGN(fw->size, 0x1000) (page size, who knows), with no effect. Might as well just leave it hard-coded at 0x40000. Please make sure that this hits 3.11, otherwise it will not be useable for video decoding. drivers/gpu/drm/nouveau/core/engine/xtensa.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/xtensa.c b/drivers/gpu/drm/nouveau/core/engine/xtensa.c index 0639bc5..5f6ede7 100644 --- a/drivers/gpu/drm/nouveau/core/engine/xtensa.c +++ b/drivers/gpu/drm/nouveau/core/engine/xtensa.c @@ -118,7 +118,13 @@ _nouveau_xtensa_init(struct nouveau_object *object) return ret; } - ret = nouveau_gpuobj_new(object, NULL, fw->size, 0x1000, 0, + if (fw->size > 0x40000) { + nv_warn(xtensa, "firmware %s too large\n", name); + release_firmware(fw); + return -EINVAL; + } + + ret = nouveau_gpuobj_new(object, NULL, 0x40000, 0x1000, 0, &xtensa->gpu_fw); if (ret) { release_firmware(fw); -- 1.8.1.5
Apparently Analagous Threads
- [PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
- [PATCH v2] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
- [PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
- [PATCH 0/5] nouveau: unified firmware loading functions
- xtensa backend