diff options
author | Prarit Bhargava <prarit@redhat.com> | 2010-05-24 10:24:07 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-24 10:24:07 +1000 |
commit | f49d273df9087d92e20c485fe9f8355d4f55b933 (patch) | |
tree | e99874b3b7bed5cea1d8a9d0fa901ebc5153c859 /drivers/gpu/drm/nouveau/nv40_graph.c | |
parent | 579766020d2eee2f1c51af1641ef9a7dbc6a5798 (diff) | |
download | kernel_samsung_aries-f49d273df9087d92e20c485fe9f8355d4f55b933.zip kernel_samsung_aries-f49d273df9087d92e20c485fe9f8355d4f55b933.tar.gz kernel_samsung_aries-f49d273df9087d92e20c485fe9f8355d4f55b933.tar.bz2 |
drm: Fixes linux-next & linux-2.6 checkstack warnings:
drivers/gpu/drm/nouveau/nv40_graph.c: In function `nv40_graph_init':
drivers/gpu/drm/nouveau/nv40_graph.c:400: warning: the frame size of 1184 bytes is larger than 1024 bytes
drivers/gpu/drm/radeon/radeon_atombios.c: In function `radeon_get_atom_connector_info_from_supported_devices_table':
drivers/gpu/drm/radeon/radeon_atombios.c:857: warning: the frame size of 1872 bytes is larger than 1024 bytes
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv40_graph.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv40_graph.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 0616c96..704a25d 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c @@ -253,7 +253,11 @@ nv40_graph_init(struct drm_device *dev) if (!dev_priv->engine.graph.ctxprog) { struct nouveau_grctx ctx = {}; - uint32_t cp[256]; + uint32_t *cp; + + cp = kmalloc(sizeof(*cp) * 256, GFP_KERNEL); + if (!cp) + return -ENOMEM; ctx.dev = dev; ctx.mode = NOUVEAU_GRCTX_PROG; @@ -265,6 +269,8 @@ nv40_graph_init(struct drm_device *dev) nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0); for (i = 0; i < ctx.ctxprog_len; i++) nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, cp[i]); + + kfree(cp); } /* No context present currently */ |