]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu: do not store bios_header_start in amdgpu_device
authorNils Wallménius <nils.wallmenius@gmail.com>
Sat, 19 Mar 2016 15:12:13 +0000 (16:12 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 May 2016 17:08:56 +0000 (13:08 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c

index e33b1858776968d1a43bd2ab816332d030a98a91..2c2f2349dd820e0ff4df1b1fc76f197f80bdb8bc 100644 (file)
@@ -1924,7 +1924,6 @@ struct amdgpu_device {
        /* BIOS */
        uint8_t                         *bios;
        bool                            is_atom_bios;
-       uint16_t                        bios_header_start;
        struct amdgpu_bo                *stollen_vga_memory;
        uint32_t                        bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];
 
index 80add22375eed29e6d10de506b19941183ce8755..99ca75baa47d7b8e018a856936fffd016d808742 100644 (file)
@@ -349,7 +349,7 @@ static inline bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev)
 bool amdgpu_get_bios(struct amdgpu_device *adev)
 {
        bool r;
-       uint16_t tmp;
+       uint16_t tmp, bios_header_start;
 
        r = amdgpu_atrm_get_bios(adev);
        if (r == false)
@@ -383,11 +383,11 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
                goto free_bios;
        }
 
-       adev->bios_header_start = RBIOS16(0x48);
-       if (!adev->bios_header_start) {
+       bios_header_start = RBIOS16(0x48);
+       if (!bios_header_start) {
                goto free_bios;
        }
-       tmp = adev->bios_header_start + 4;
+       tmp = bios_header_start + 4;
        if (!memcmp(adev->bios + tmp, "ATOM", 4) ||
            !memcmp(adev->bios + tmp, "MOTA", 4)) {
                adev->is_atom_bios = true;