summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorAlex Deucher2017-12-08 19:07:58 +0100
committerAlex Deucher2017-12-13 23:28:07 +0100
commitbf383fb64e7c8ccc96d382e38e829737389708a7 (patch)
treeddc3dba79d8a6fda4441bcc6aee1a46a5ee5e39a /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentdrm/amdgpu: make function names consistent in nbio files (diff)
downloadkernel-qcow2-linux-bf383fb64e7c8ccc96d382e38e829737389708a7.tar.gz
kernel-qcow2-linux-bf383fb64e7c8ccc96d382e38e829737389708a7.tar.xz
kernel-qcow2-linux-bf383fb64e7c8ccc96d382e38e829737389708a7.zip
drm/amdgpu: convert nbio to use callbacks (v2)
Cleans up and consolidates all of the per-asic logic. v2: squash in "drm/amdgpu: fix NULL err for sriov detect" (Chunming) Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 30b41fc082e6..e9a668bae194 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3552,12 +3552,7 @@ static void gfx_v9_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)
{
struct amdgpu_device *adev = ring->adev;
u32 ref_and_mask, reg_mem_engine;
- const struct nbio_hdp_flush_reg *nbio_hf_reg;
-
- if (ring->adev->flags & AMD_IS_APU)
- nbio_hf_reg = &nbio_v7_0_hdp_flush_reg;
- else
- nbio_hf_reg = &nbio_v6_1_hdp_flush_reg;
+ const struct nbio_hdp_flush_reg *nbio_hf_reg = adev->nbio_funcs->hdp_flush_reg;
if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
switch (ring->me) {