]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/radeon/kms/atom: fix handling of FB scratch indices
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Oct 2011 00:10:05 +0000 (20:10 -0400)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:04 +0000 (11:17 -0800)
commit3f4e533dc6b03c95254ddcad3c3bb8dad86fe867
tree27c67b1df702b047cca4afd696e6d3b348d2f5eb
parent575d667a7cd8ba24ee62a3d9a8746b004b48c8d4
drm/radeon/kms/atom: fix handling of FB scratch indices

commit 5a6e8482a16e61250a9121fc9ec719ab0529e760 upstream.

FB scratch indices are dword indices, but we were treating
them as byte indices.  As such, we were getting the wrong
FB scratch data for non-0 indices.  Fix the indices and
guard the indexing against indices larger than the scratch
allocation.

Fixes memory corruption on some boards if data was written
past the end of the FB scratch array.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reported-by: Dave Airlie <airlied@redhat.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/radeon/atom.c
drivers/gpu/drm/radeon/atom.h