All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/6] drm/amdgpu/vi: add HDP asic callbacks for SI
@ 2017-09-06 22:05 Samuel Li
  0 siblings, 0 replies; only message in thread
From: Samuel Li @ 2017-09-06 22:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher, Samuel Li

From: Alex Deucher <alexander.deucher@amd.com>

Needed to flush and invalidate the HDP block using the CPU.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Samuel Li <Samuel.Li@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/si.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index 99760c8..ad4b19e 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -1230,6 +1230,18 @@ static void si_detect_hw_virtualization(struct amdgpu_device *adev)
 		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 =
 {
 	.read_disabled_bios = &si_read_disabled_bios,
@@ -1241,6 +1253,8 @@ static const struct amdgpu_asic_funcs si_asic_funcs =
 	.set_uvd_clocks = &si_set_uvd_clocks,
 	.set_vce_clocks = NULL,
 	.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)
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-06 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 22:05 [PATCH 2/6] drm/amdgpu/vi: add HDP asic callbacks for SI Samuel Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.