aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/scheduler/sched_fence.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-11-19 13:15:17 +1000
committerDave Airlie <airlied@redhat.com>2015-11-19 13:15:17 +1000
commit8ed59fd6d4691bd1e67b71f84e473f440fc7c821 (patch)
treeeaa922f934eda8197d4ac326c017296c8d6dec51 /drivers/gpu/drm/amd/scheduler/sched_fence.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux (diff)
parentdrm/amdgpu: reserve/unreserve objects out of map/unmap operations (diff)
downloadlinux-dev-8ed59fd6d4691bd1e67b71f84e473f440fc7c821.tar.xz
linux-dev-8ed59fd6d4691bd1e67b71f84e473f440fc7c821.zip
Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Radeon and amdgpu fixes for 4.4. A bit more the usual since I missed last week. Misc fixes all over the place. The big changes are the tiling configuration fixes for Fiji. * 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux: (35 commits) drm/amdgpu: reserve/unreserve objects out of map/unmap operations drm/amdgpu: move bo_reserve out of amdgpu_vm_clear_bo drm/amdgpu: add lock for interval tree in vm drm/amdgpu: keep the owner for VMIDs drm/amdgpu: move VM manager clean into the VM code again drm/amdgpu: cleanup VM coding style drm/amdgpu: remove unused VM manager field drm/amdgpu: cleanup scheduler command submission drm/amdgpu: fix typo in firmware name drm/amdgpu: remove the unnecessary parameter adev for amdgpu_sa_bo_new() drm/amdgpu: wait interruptible when semaphores are disabled v2 drm/amdgpu: update pd while updating vm as well drm/amdgpu: fix handling order in scheduler CS drm/amdgpu: fix incorrect mutex usage v3 drm/amdgpu: cleanup scheduler fence get/put dance drm/amdgpu: add command submission workflow tracepoint drm/amdgpu: update Fiji's tiling mode table drm/amdgpu: fix bug that can't enter thermal interrupt for bonaire. drm/amdgpu: fix seq_printf format string drm/radeon: fix quirk for MSI R7 370 Armor 2X ...
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/sched_fence.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/sched_fence.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/sched_fence.c b/drivers/gpu/drm/amd/scheduler/sched_fence.c
index d802638094f4..8d2130b9ff05 100644
--- a/drivers/gpu/drm/amd/scheduler/sched_fence.c
+++ b/drivers/gpu/drm/amd/scheduler/sched_fence.c
@@ -32,7 +32,7 @@ struct amd_sched_fence *amd_sched_fence_create(struct amd_sched_entity *s_entity
struct amd_sched_fence *fence = NULL;
unsigned seq;
- fence = kzalloc(sizeof(struct amd_sched_fence), GFP_KERNEL);
+ fence = kmem_cache_zalloc(sched_fence_slab, GFP_KERNEL);
if (fence == NULL)
return NULL;
fence->owner = owner;
@@ -71,11 +71,17 @@ static bool amd_sched_fence_enable_signaling(struct fence *f)
return true;
}
+static void amd_sched_fence_release(struct fence *f)
+{
+ struct amd_sched_fence *fence = to_amd_sched_fence(f);
+ kmem_cache_free(sched_fence_slab, fence);
+}
+
const struct fence_ops amd_sched_fence_ops = {
.get_driver_name = amd_sched_fence_get_driver_name,
.get_timeline_name = amd_sched_fence_get_timeline_name,
.enable_signaling = amd_sched_fence_enable_signaling,
.signaled = NULL,
.wait = fence_default_wait,
- .release = NULL,
+ .release = amd_sched_fence_release,
};