From a3c059a608982b8f77c6178c8ffb35783be9fd3d Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 13 Feb 2010 20:20:19 -0500 Subject: [PATCH] --- yaml --- r: 180559 b: refs/heads/master c: ce36f00d599e0f988c2a1b7b276d9184ee9c5d82 h: refs/heads/master i: 180557: 2028faddf81f01251c3544286f6372595e0614e0 180555: 2ab169118275e3b57e8ab47eeeb9c416d3b8a247 180551: 8fa0aff8f3ecb882a2d2f7fe8bae9098f731202a 180543: 96dfc2e383757bd722329f6424eb0224456be558 v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/radeon/atom.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index a69cb382cee5..bdc264dad9cf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e22238ea37a870f70e34668a4992bde0c92bba8d +refs/heads/master: ce36f00d599e0f988c2a1b7b276d9184ee9c5d82 diff --git a/trunk/drivers/gpu/drm/radeon/atom.c b/trunk/drivers/gpu/drm/radeon/atom.c index e3b44562d265..2a3df5599ab4 100644 --- a/trunk/drivers/gpu/drm/radeon/atom.c +++ b/trunk/drivers/gpu/drm/radeon/atom.c @@ -24,6 +24,7 @@ #include #include +#include #define ATOM_DEBUG @@ -212,7 +213,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr, case ATOM_ARG_PS: idx = U8(*ptr); (*ptr)++; - val = le32_to_cpu(ctx->ps[idx]); + /* get_unaligned_le32 avoids unaligned accesses from atombios + * tables, noticed on a DEC Alpha. */ + val = get_unaligned_le32((u32 *)&ctx->ps[idx]); if (print) DEBUG("PS[0x%02X,0x%04X]", idx, val); break;