]> Git Repo - linux.git/commitdiff
drm/amdgpu: add HDP asic callbacks for VI
authorAlex Deucher <[email protected]>
Wed, 6 Sep 2017 22:06:24 +0000 (18:06 -0400)
committerAlex Deucher <[email protected]>
Mon, 19 Feb 2018 19:17:13 +0000 (14:17 -0500)
Needed to flush and invalidate the HDP block using the CPU.

Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Samuel Li <[email protected]>
drivers/gpu/drm/amd/amdgpu/vi.c

index 1e3e05a11f7a47ab476677b00f8731c79608f914..fbb77b959f8a9892250ed49af39dc09a92beefc2 100644 (file)
@@ -856,6 +856,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,
@@ -867,6 +879,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)     \
This page took 0.051791 seconds and 4 git commands to generate.