Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 379548f5 authored by Nils Wallménius's avatar Nils Wallménius Committed by Alex Deucher
Browse files

drm/amdgpu: do not store bios_header_start in amdgpu_device



It is only used locally in amdgpu_get_bios

Signed-off-by: default avatarNils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 16fae650
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -1924,7 +1924,6 @@ struct amdgpu_device {
	/* BIOS */
	/* BIOS */
	uint8_t				*bios;
	uint8_t				*bios;
	bool				is_atom_bios;
	bool				is_atom_bios;
	uint16_t			bios_header_start;
	struct amdgpu_bo		*stollen_vga_memory;
	struct amdgpu_bo		*stollen_vga_memory;
	uint32_t			bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];
	uint32_t			bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];


+4 −4
Original line number Original line Diff line number Diff line
@@ -349,7 +349,7 @@ static inline bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev)
bool amdgpu_get_bios(struct amdgpu_device *adev)
bool amdgpu_get_bios(struct amdgpu_device *adev)
{
{
	bool r;
	bool r;
	uint16_t tmp;
	uint16_t tmp, bios_header_start;


	r = amdgpu_atrm_get_bios(adev);
	r = amdgpu_atrm_get_bios(adev);
	if (r == false)
	if (r == false)
@@ -383,11 +383,11 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
		goto free_bios;
		goto free_bios;
	}
	}


	adev->bios_header_start = RBIOS16(0x48);
	bios_header_start = RBIOS16(0x48);
	if (!adev->bios_header_start) {
	if (!bios_header_start) {
		goto free_bios;
		goto free_bios;
	}
	}
	tmp = adev->bios_header_start + 4;
	tmp = bios_header_start + 4;
	if (!memcmp(adev->bios + tmp, "ATOM", 4) ||
	if (!memcmp(adev->bios + tmp, "ATOM", 4) ||
	    !memcmp(adev->bios + tmp, "MOTA", 4)) {
	    !memcmp(adev->bios + tmp, "MOTA", 4)) {
		adev->is_atom_bios = true;
		adev->is_atom_bios = true;