From: Dave Airlie Date: Sun, 23 Apr 2006 08:14:00 +0000 (+1000) Subject: drm: fixup r300 scratch on BE machines X-Git-Tag: v2.6.17-rc3~29^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caa98c41c0db9bfda5bc9a0e680f304283089268;p=linux-2.6 drm: fixup r300 scratch on BE machines This fixes the r300 scratch stuff to work on PPC, from Ben Herrenschmidt on IRC. Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/r300_cmdbuf.c b/drivers/char/drm/r300_cmdbuf.c index b108c7f913..26bdf2ca59 100644 --- a/drivers/char/drm/r300_cmdbuf.c +++ b/drivers/char/drm/r300_cmdbuf.c @@ -723,7 +723,7 @@ static int r300_scratch(drm_radeon_private_t *dev_priv, dev_priv->scratch_ages[header.scratch.reg]++; - ref_age_base = *(u32 **)cmdbuf->buf; + ref_age_base = (u32 *)(unsigned long)*((uint64_t *)cmdbuf->buf); cmdbuf->buf += sizeof(u64); cmdbuf->bufsz -= sizeof(u64);