[PATCH 4/6] drm/amdgpu/vi: add HDP asic callbacks for VI
Samuel Li
Samuel.Li at amd.com
Wed Sep 6 22:06:24 UTC 2017
From: Alex Deucher <alexander.deucher at amd.com>
Needed to flush and invalidate the HDP block using the CPU.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Samuel Li <Samuel.Li at amd.com>
---
drivers/gpu/drm/amd/amdgpu/vi.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 18bb3cb..4ffb40b 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -852,6 +852,18 @@ static uint32_t vi_get_rev_id(struct amdgpu_device *adev)
>> PCIE_EFUSE4__STRAP_BIF_ATI_REV_ID__SHIFT;
}
+static void vi_flush_hdp(struct amdgpu_device *adev)
+{
+ WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 1);
+ RREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL);
+}
+
+static void vi_invalidate_hdp(struct amdgpu_device *adev)
+{
+ WREG32(mmHDP_DEBUG0, 1);
+ RREG32(mmHDP_DEBUG0);
+}
+
static const struct amdgpu_asic_funcs vi_asic_funcs =
{
.read_disabled_bios = &vi_read_disabled_bios,
@@ -863,6 +875,8 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
.set_uvd_clocks = &vi_set_uvd_clocks,
.set_vce_clocks = &vi_set_vce_clocks,
.get_config_memsize = &vi_get_config_memsize,
+ .flush_hdp = &vi_flush_hdp,
+ .invalidate_hdp = &vi_invalidate_hdp,
};
#define CZ_REV_BRISTOL(rev) \
--
2.7.4
More information about the amd-gfx
mailing list