Skip to content

Commit

Permalink
drm/nvc0-/gr: shift wrapping bug in nvc0_grctx_generate_r406800
Browse files Browse the repository at this point in the history
We care about the upper 32 bits here so we have to use 1ULL instead of 1
to avoid a shift wrapping bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Dan Carpenter authored and Ben Skeggs committed Nov 14, 2013
1 parent 35c3367 commit 377cfdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ nvc0_grctx_generate_r406800(struct nvc0_graph_priv *priv)
} while (!tpcnr[gpc]);
tpc = priv->tpc_nr[gpc] - tpcnr[gpc]--;

tpc_set |= 1 << ((gpc * 8) + tpc);
tpc_set |= 1ULL << ((gpc * 8) + tpc);
}

nv_wr32(priv, 0x406800 + (i * 0x20), lower_32_bits(tpc_set));
Expand Down

0 comments on commit 377cfdc

Please sign in to comment.