diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2014-05-02 18:32:40 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-06-10 16:05:50 +1000 |
commit | 370eec76b67430f6055ebda07c820f02288d93b8 (patch) | |
tree | 39bf0bdebd8c947a5ec71b40cb68cdadc1dbe1cc | |
parent | b7c852a646b12051e61c4dde4ddaa6c14af9c80b (diff) | |
download | blackbird-op-linux-370eec76b67430f6055ebda07c820f02288d93b8.tar.gz blackbird-op-linux-370eec76b67430f6055ebda07c820f02288d93b8.zip |
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 <acourbot@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c index 83dca0700ae5..bf7bdb1f291e 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 |