drm/amdgpu: cleanup fence queue init v2
authorChristian König <christian.koenig@amd.com>
Mon, 7 Sep 2015 16:43:02 +0000 (18:43 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Sep 2015 21:23:38 +0000 (17:23 -0400)
Move the fence related stuff into amdgpu_fence.c

v2: rework commit message, cause this is actually not a bug

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou<david1.zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c

index 8e8cd09d36c12b53f78819c097018c80f8b203d2..7f2d85e7e77a8930710df26471fe1cc395b37e65 100644 (file)
@@ -625,6 +625,8 @@ void amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring)
                        amdgpu_fence_check_lockup);
        ring->fence_drv.ring = ring;
 
+       init_waitqueue_head(&ring->fence_drv.fence_queue);
+
        if (amdgpu_enable_scheduler) {
                ring->sched = amd_sched_create(&amdgpu_sched_ops,
                                               ring->idx,
index 130292dcf243fe67a1f0f16aaac245ce986915b4..6e735431676d6f7c5e3165c136db32858cbd40a0 100644 (file)
@@ -360,8 +360,6 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                amdgpu_fence_driver_init_ring(ring);
        }
 
-       init_waitqueue_head(&ring->fence_drv.fence_queue);
-
        r = amdgpu_wb_get(adev, &ring->rptr_offs);
        if (r) {
                dev_err(adev->dev, "(%d) ring rptr_offs wb alloc failed\n", r);