diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-09-06 18:06:45 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:17:13 -0500 |
commit | 73c732405fddfe16b122c77de83397289463b557 (patch) | |
tree | 4d2c61074161c4ada4678d6599340a5865916bfe /drivers/gpu/drm/amd/amdgpu | |
parent | dd8d07f2fb2a5acb972e62a5cd00f6d56e7d2b8c (diff) |
drm/amdgpu: add HDP asic callbacks for SOC15 (v2)
Needed to flush and invalidate the HDP block using the CPU.
v2: use preferred register on soc15.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Samuel Li <Samuel.Li@amd.com> (v1)
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc15.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index a04a033f57de..ad39ffd012bc 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c | |||
@@ -583,6 +583,16 @@ static uint32_t soc15_get_rev_id(struct amdgpu_device *adev) | |||
583 | return adev->nbio_funcs->get_rev_id(adev); | 583 | return adev->nbio_funcs->get_rev_id(adev); |
584 | } | 584 | } |
585 | 585 | ||
586 | static void soc15_flush_hdp(struct amdgpu_device *adev) | ||
587 | { | ||
588 | adev->nbio_funcs->hdp_flush(adev); | ||
589 | } | ||
590 | |||
591 | static void soc15_invalidate_hdp(struct amdgpu_device *adev) | ||
592 | { | ||
593 | WREG32_SOC15_NO_KIQ(NBIO, 0, mmHDP_READ_CACHE_INVALIDATE, 1); | ||
594 | } | ||
595 | |||
586 | static const struct amdgpu_asic_funcs soc15_asic_funcs = | 596 | static const struct amdgpu_asic_funcs soc15_asic_funcs = |
587 | { | 597 | { |
588 | .read_disabled_bios = &soc15_read_disabled_bios, | 598 | .read_disabled_bios = &soc15_read_disabled_bios, |
@@ -594,6 +604,8 @@ static const struct amdgpu_asic_funcs soc15_asic_funcs = | |||
594 | .set_uvd_clocks = &soc15_set_uvd_clocks, | 604 | .set_uvd_clocks = &soc15_set_uvd_clocks, |
595 | .set_vce_clocks = &soc15_set_vce_clocks, | 605 | .set_vce_clocks = &soc15_set_vce_clocks, |
596 | .get_config_memsize = &soc15_get_config_memsize, | 606 | .get_config_memsize = &soc15_get_config_memsize, |
607 | .flush_hdp = &soc15_flush_hdp, | ||
608 | .invalidate_hdp = &soc15_invalidate_hdp, | ||
597 | }; | 609 | }; |
598 | 610 | ||
599 | static int soc15_common_early_init(void *handle) | 611 | static int soc15_common_early_init(void *handle) |