Commit 2d5e0807 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: add HDP asic callbacks for SI

Needed to flush and invalidate the HDP block using the CPU.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSamuel Li <Samuel.Li@amd.com>
parent 2df1b8b6
...@@ -1230,6 +1230,18 @@ static void si_detect_hw_virtualization(struct amdgpu_device *adev) ...@@ -1230,6 +1230,18 @@ static void si_detect_hw_virtualization(struct amdgpu_device *adev)
adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE; adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
} }
static void si_flush_hdp(struct amdgpu_device *adev)
{
WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 1);
RREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL);
}
static void si_invalidate_hdp(struct amdgpu_device *adev)
{
WREG32(mmHDP_DEBUG0, 1);
RREG32(mmHDP_DEBUG0);
}
static const struct amdgpu_asic_funcs si_asic_funcs = static const struct amdgpu_asic_funcs si_asic_funcs =
{ {
.read_disabled_bios = &si_read_disabled_bios, .read_disabled_bios = &si_read_disabled_bios,
...@@ -1241,6 +1253,8 @@ static const struct amdgpu_asic_funcs si_asic_funcs = ...@@ -1241,6 +1253,8 @@ static const struct amdgpu_asic_funcs si_asic_funcs =
.set_uvd_clocks = &si_set_uvd_clocks, .set_uvd_clocks = &si_set_uvd_clocks,
.set_vce_clocks = NULL, .set_vce_clocks = NULL,
.get_config_memsize = &si_get_config_memsize, .get_config_memsize = &si_get_config_memsize,
.flush_hdp = &si_flush_hdp,
.invalidate_hdp = &si_invalidate_hdp,
}; };
static uint32_t si_get_rev_id(struct amdgpu_device *adev) static uint32_t si_get_rev_id(struct amdgpu_device *adev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment