aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils.wallmenius@gmail.com>2016-03-19 11:12:13 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-02 13:08:56 -0400
commit379548f509b5d4bdfcf252dd33093a45c01ce0d8 (patch)
treec76d63101faa7a04b4b78d0fee45ccdc6864da0d
parent16fae6502d797a95cd40a21664b5715ecacef599 (diff)
drm/amdgpu: do not store bios_header_start in amdgpu_device
It is only used locally in amdgpu_get_bios Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c8
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index e33b18587769..2c2f2349dd82 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1924,7 +1924,6 @@ struct amdgpu_device {
1924 /* BIOS */ 1924 /* BIOS */
1925 uint8_t *bios; 1925 uint8_t *bios;
1926 bool is_atom_bios; 1926 bool is_atom_bios;
1927 uint16_t bios_header_start;
1928 struct amdgpu_bo *stollen_vga_memory; 1927 struct amdgpu_bo *stollen_vga_memory;
1929 uint32_t bios_scratch[AMDGPU_BIOS_NUM_SCRATCH]; 1928 uint32_t bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];
1930 1929
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
index 80add22375ee..99ca75baa47d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
@@ -349,7 +349,7 @@ static inline bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev)
349bool amdgpu_get_bios(struct amdgpu_device *adev) 349bool amdgpu_get_bios(struct amdgpu_device *adev)
350{ 350{
351 bool r; 351 bool r;
352 uint16_t tmp; 352 uint16_t tmp, bios_header_start;
353 353
354 r = amdgpu_atrm_get_bios(adev); 354 r = amdgpu_atrm_get_bios(adev);
355 if (r == false) 355 if (r == false)
@@ -383,11 +383,11 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
383 goto free_bios; 383 goto free_bios;
384 } 384 }
385 385
386 adev->bios_header_start = RBIOS16(0x48); 386 bios_header_start = RBIOS16(0x48);
387 if (!adev->bios_header_start) { 387 if (!bios_header_start) {
388 goto free_bios; 388 goto free_bios;
389 } 389 }
390 tmp = adev->bios_header_start + 4; 390 tmp = bios_header_start + 4;
391 if (!memcmp(adev->bios + tmp, "ATOM", 4) || 391 if (!memcmp(adev->bios + tmp, "ATOM", 4) ||
392 !memcmp(adev->bios + tmp, "MOTA", 4)) { 392 !memcmp(adev->bios + tmp, "MOTA", 4)) {
393 adev->is_atom_bios = true; 393 adev->is_atom_bios = true;