From: Alexandre Courbot Date: Fri, 2 May 2014 09:32:40 +0000 (+0900) Subject: drm/nouveau/graph: pad firmware code at load time X-Git-Tag: v4.14-rc1~7391^2~2^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=370eec76b67430f6055ebda07c820f02288d93b8;p=platform%2Fkernel%2Flinux-rpi.git drm/nouveau/graph: pad firmware code at load time Pad the microcode to a multiple of 0x40 words, otherwise firmware will fail to run from non-prepadded firmware files. Signed-off-by: Alexandre Courbot Reviewed-by: Thierry Reding Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c index 83dca07..bf7bdb1 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c @@ -894,6 +894,10 @@ nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base, nv_wr32(priv, fuc_base + 0x0188, i >> 6); nv_wr32(priv, fuc_base + 0x0184, code->data[i]); } + + /* code must be padded to 0x40 words */ + for (; i & 0x3f; i++) + nv_wr32(priv, fuc_base + 0x0184, 0); } static void