summary refs log tree commit diff
path: root/drivers/gpu/drm/radeon/atom.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2011-10-18 20:10:05 -0400
committerDave Airlie <airlied@redhat.com>2011-10-19 09:47:47 +0100
commit5a6e8482a16e61250a9121fc9ec719ab0529e760 (patch)
treed69c0e903f122acff0accf0e6f6e9bb4b9f2ce5d /drivers/gpu/drm/radeon/atom.h
parenta4863ca93ccc52a83e7fbfc068b411b7faa03805 (diff)
downloadlinux-5a6e8482a16e61250a9121fc9ec719ab0529e760.tar.gz
drm/radeon/kms/atom: fix handling of FB scratch indices
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>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atom.h')
-rw-r--r--drivers/gpu/drm/radeon/atom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h
index a589a55b223e..93cfe2086ba0 100644
--- a/drivers/gpu/drm/radeon/atom.h
+++ b/drivers/gpu/drm/radeon/atom.h
@@ -137,6 +137,7 @@ struct atom_context {
 	int cs_equal, cs_above;
 	int io_mode;
 	uint32_t *scratch;
+	int scratch_size_bytes;
 };
 
 extern int atom_debug;