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

Commit 0c8c0847 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amdgpu: export gfxhub sw_init into gmc

parent 1e4eccda
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -337,19 +337,8 @@ void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
	WREG32(SOC15_REG_OFFSET(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL), tmp);
}

static int gfxhub_v1_0_early_init(void *handle)
{
	return 0;
}

static int gfxhub_v1_0_late_init(void *handle)
void gfxhub_v1_0_init(struct amdgpu_device *adev)
{
	return 0;
}

static int gfxhub_v1_0_sw_init(void *handle)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
	struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB];

	hub->ctx0_ptb_addr_lo32 =
@@ -368,7 +357,20 @@ static int gfxhub_v1_0_sw_init(void *handle)
		SOC15_REG_OFFSET(GC, 0, mmVM_L2_PROTECTION_FAULT_STATUS);
	hub->vm_l2_pro_fault_cntl =
		SOC15_REG_OFFSET(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL);
}

static int gfxhub_v1_0_early_init(void *handle)
{
	return 0;
}

static int gfxhub_v1_0_late_init(void *handle)
{
	return 0;
}

static int gfxhub_v1_0_sw_init(void *handle)
{
	return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev);
void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev);
void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
					  bool value);
void gfxhub_v1_0_init(struct amdgpu_device *adev);
u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev);
extern const struct amd_ip_funcs gfxhub_v1_0_ip_funcs;
extern const struct amdgpu_ip_block_version gfxhub_v1_0_ip_block;
+2 −0
Original line number Diff line number Diff line
@@ -532,6 +532,8 @@ static int gmc_v9_0_sw_init(void *handle)
	int dma_bits;
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

	gfxhub_v1_0_init(adev);

	spin_lock_init(&adev->mc.invalidate_lock);

	if (adev->flags & AMD_IS_APU) {