Commit fcbc92e2 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: move stolen vga bo from amdgpu to amdgpu.gmc



Since that is where we store the other data related to
the stolen vga memory.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 81b54fb7
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -769,7 +769,6 @@ struct amdgpu_device {
	bool				is_atom_fw;
	uint8_t				*bios;
	uint32_t			bios_size;
	struct amdgpu_bo		*stolen_vga_memory;
	uint32_t			bios_scratch_reg_offset;
	uint32_t			bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];

+2 −1
Original line number Diff line number Diff line
@@ -213,7 +213,8 @@ struct amdgpu_gmc {
	uint8_t			vram_vendor;
	uint32_t                srbm_soft_reset;
	bool			prt_warning;
	uint64_t		stolen_size;
	uint64_t		stolen_vga_size;
	struct amdgpu_bo	*stolen_vga_memory;
	uint32_t		sdpif_register;
	/* apertures */
	u64			shared_aperture_start;
+3 −3
Original line number Diff line number Diff line
@@ -1979,9 +1979,9 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
	 * This is used for VGA emulation and pre-OS scanout buffers to
	 * avoid display artifacts while transitioning between pre-OS
	 * and driver.  */
	r = amdgpu_bo_create_kernel_at(adev, 0, adev->gmc.stolen_size,
	r = amdgpu_bo_create_kernel_at(adev, 0, adev->gmc.stolen_vga_size,
				       AMDGPU_GEM_DOMAIN_VRAM,
				       &adev->stolen_vga_memory,
				       &adev->gmc.stolen_vga_memory,
				       &stolen_vga_buf);
	if (r)
		return r;
@@ -2043,7 +2043,7 @@ void amdgpu_ttm_late_init(struct amdgpu_device *adev)
{
	void *stolen_vga_buf;
	/* return the VGA stolen memory (if any) back to VRAM */
	amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, &stolen_vga_buf);
	amdgpu_bo_free_kernel(&adev->gmc.stolen_vga_memory, NULL, &stolen_vga_buf);
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -860,7 +860,7 @@ static int gmc_v10_0_sw_init(void *handle)
	if (r)
		return r;

	adev->gmc.stolen_size = gmc_v10_0_get_vbios_fb_size(adev);
	adev->gmc.stolen_vga_size = gmc_v10_0_get_vbios_fb_size(adev);

	/* Memory manager */
	r = amdgpu_bo_init(adev);
+1 −1
Original line number Diff line number Diff line
@@ -862,7 +862,7 @@ static int gmc_v6_0_sw_init(void *handle)
	if (r)
		return r;

	adev->gmc.stolen_size = gmc_v6_0_get_vbios_fb_size(adev);
	adev->gmc.stolen_vga_size = gmc_v6_0_get_vbios_fb_size(adev);

	r = amdgpu_bo_init(adev);
	if (r)
Loading