Skip to content

Commit

Permalink
drm/radeon: Fix sparc regression in r300_scratch()
Browse files Browse the repository at this point in the history
Commit b4fe945 ("drm/radeon: Fix
memory allocation failures in the preKMS command stream checking.")
added a regression in that it completely tossed the get_unaligned()
done by r300_scratch() which we added in commit
958a6f8 ("drm: radeon: Fix unaligned
access in r300_scratch().").

Put it back.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
David Miller authored and Dave Airlie committed Apr 26, 2010
1 parent e32ee7f commit 88b0450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/r300_cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ static int r300_scratch(drm_radeon_private_t *dev_priv,

ptr_addr = drm_buffer_read_object(cmdbuf->buffer,
sizeof(stack_ptr_addr), &stack_ptr_addr);
ref_age_base = (u32 *)(unsigned long)*ptr_addr;
ref_age_base = (u32 *)(unsigned long)get_unaligned(ptr_addr);

for (i=0; i < header.scratch.n_bufs; i++) {
buf_idx = drm_buffer_pointer_to_dword(cmdbuf->buffer, 0);
Expand Down

0 comments on commit 88b0450

Please sign in to comment.