Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88b04507 authored by David Miller's avatar David Miller Committed by Dave Airlie
Browse files

drm/radeon: Fix sparc regression in r300_scratch()



Commit b4fe9454 ("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
958a6f8c ("drm: radeon: Fix unaligned
access in r300_scratch().").

Put it back.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent e32ee7fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);