root/drivers/gpu/drm/i915/gt/selftests/mock_timeline.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. mock_timeline_init
  2. mock_timeline_fini

   1 /*
   2  * SPDX-License-Identifier: MIT
   3  *
   4  * Copyright © 2017-2018 Intel Corporation
   5  */
   6 
   7 #include "../intel_timeline.h"
   8 
   9 #include "mock_timeline.h"
  10 
  11 void mock_timeline_init(struct intel_timeline *timeline, u64 context)
  12 {
  13         timeline->gt = NULL;
  14         timeline->fence_context = context;
  15 
  16         mutex_init(&timeline->mutex);
  17 
  18         INIT_ACTIVE_REQUEST(&timeline->last_request, &timeline->mutex);
  19         INIT_LIST_HEAD(&timeline->requests);
  20 
  21         i915_syncmap_init(&timeline->sync);
  22 
  23         INIT_LIST_HEAD(&timeline->link);
  24 }
  25 
  26 void mock_timeline_fini(struct intel_timeline *timeline)
  27 {
  28         i915_syncmap_free(&timeline->sync);
  29 }

/* [<][>][^][v][top][bottom][index][help] */