Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 102 lines (87 sloc) 2.565 kB
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
Shinpei Kato authored
1 /*
2 * Copyright 2012 Shinpei Kato
3 *
4 * University of California, Santa Cruz
5 * Systems Research Lab.
6 *
7 * All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 */
28
29 #include "gdev_sched.h"
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
30 #include "gdev_system.h"
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
Shinpei Kato authored
31
32 struct gdev_sched_entity *sched_entity_ptr[GDEV_CONTEXT_MAX_COUNT];
33
34 /**
35 * initialize the scheduler for the device.
36 */
37 int gdev_init_scheduler(struct gdev_device *gdev)
38 {
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
39 gdev_sched_create_scheduler(gdev);
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
Shinpei Kato authored
40
41 return 0;
42 }
43
44 /**
45 * finalized the scheduler for the device.
46 */
47 void gdev_exit_scheduler(struct gdev_device *gdev)
48 {
b96dab7 gdev: refactored code and cleaned up files
Shinpei Kato authored
49 gdev_sched_destroy_scheduler(gdev);
50 }
51
52 /**
53 * create a new scheduling entity.
54 */
55 struct gdev_sched_entity *gdev_sched_entity_create(struct gdev_device *gdev, gdev_ctx_t *ctx)
56 {
57 struct gdev_sched_entity *se;
58
59 if (!(se= MALLOC(sizeof(*se))))
60 return NULL;
61
62 /* set up the scheduling entity. */
63 se->gdev = gdev;
64 se->task = gdev_sched_get_current_task();
65 se->ctx = ctx;
66 se->rt_prio = GDEV_PRIO_DEFAULT;
67 sched_entity_ptr[gdev_ctx_get_cid(ctx)] = se;
68
69 return se;
70 }
71
72 /**
73 * destroy the scheduling entity.
74 */
75 void gdev_sched_entity_destroy(struct gdev_sched_entity *se)
76 {
77 FREE(se);
3ddab5e gdev: made QUERY_CHIPSET and QUERY_DEVICE_MEM_SIZE and QUERY_DMA_MEM_…
Shinpei Kato authored
78 }
79
80 /**
81 * schedule kernel-launch calls.
82 */
83 void gdev_schedule_launch(struct gdev_sched_entity *se)
84 {
85 }
86
87 /**
88 * schedule memcpy-copy calls.
89 */
90 void gdev_schedule_memcpy(struct gdev_sched_entity *se)
91 {
92 }
93
94 /**
95 * schedule next contexts.
96 * invoked upon the completion of preceding contexts.
97 */
98 void gdev_schedule_invoked(int subc, uint32_t data)
99 {
100 }
101
Something went wrong with that request. Please try again.