aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-03-24 09:32:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-03-30 14:44:00 -0400
commitc7217b2af83e85dd6053ff13dc4ac2d24d85b97c (patch)
treea5db8b3bc50e930689008a35d57f34c0209db063
parentbcf32a2371017c5de92cf9d36c811dc26076898a (diff)
drm/amdgpu: just disallow reading untouched registers
Not sure what the original intention was here, but returning a random piece of kernel memory to userspace because we didn't set the value at all is clearly not a good idea. This patch disallows reading the register and returns a proper error code instead. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vi.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 1fe654e8cb7f..b1132f5e84fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -464,15 +464,9 @@ static void vi_detect_hw_virtualization(struct amdgpu_device *adev)
464} 464}
465 465
466static const struct amdgpu_allowed_register_entry tonga_allowed_read_registers[] = { 466static const struct amdgpu_allowed_register_entry tonga_allowed_read_registers[] = {
467 {mmGB_MACROTILE_MODE7, true},
468}; 467};
469 468
470static const struct amdgpu_allowed_register_entry cz_allowed_read_registers[] = { 469static const struct amdgpu_allowed_register_entry cz_allowed_read_registers[] = {
471 {mmGB_TILE_MODE7, true},
472 {mmGB_TILE_MODE12, true},
473 {mmGB_TILE_MODE17, true},
474 {mmGB_TILE_MODE23, true},
475 {mmGB_MACROTILE_MODE7, true},
476}; 470};
477 471
478static const struct amdgpu_allowed_register_entry vi_allowed_read_registers[] = { 472static const struct amdgpu_allowed_register_entry vi_allowed_read_registers[] = {