MALI: midgard: RK: add separate src dir of Midgard driver for RK Linux device
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard_for_linux / docs / policy_operation_diagram.dot
1 /*
2  *
3  * (C) COPYRIGHT 2010 ARM Limited. All rights reserved.
4  *
5  * This program is free software and is provided to you under the terms of the
6  * GNU General Public License version 2 as published by the Free Software
7  * Foundation, and any use by you of this program is subject to the terms
8  * of such GNU licence.
9  *
10  * A copy of the licence is included with the program, and can also be obtained
11  * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12  * Boston, MA  02110-1301, USA.
13  *
14  */
15
16
17
18
19
20 digraph policy_objects_diagram {
21         rankdir=LR;
22         size="12,8";
23         compound=true;
24
25         node [ shape = box ];
26
27         subgraph cluster_policy_queues {
28                 low_queue [ shape=record label = "LowP | {<ql>ctx_lo | ... | <qm>ctx_i | ... | <qr>ctx_hi}" ];
29                 queues_middle_sep [ label="" shape=plaintext width=0 height=0 ];
30
31                 rt_queue [ shape=record label = "RT | {<ql>ctx_lo | ... | <qm>ctx_j | ... | <qr>ctx_hi}" ];
32
33                 label = "Policy's Queue(s)";
34         }
35
36         call_enqueue [ shape=plaintext label="enqueue_ctx()" ];
37
38         {
39                 rank=same;
40                 ordering=out;
41                 call_dequeue [ shape=plaintext label="dequeue_head_ctx()\n+ runpool_add_ctx()" ];
42                 call_ctxfinish [ shape=plaintext label="runpool_remove_ctx()" ];
43
44                 call_ctxdone [ shape=plaintext label="don't requeue;\n/* ctx has no more jobs */" ];
45         }
46
47         subgraph cluster_runpool {
48
49                 as0 [ width=2 height = 0.25 label="AS0: Job_1, ..., Job_n" ];
50                 as1 [ width=2 height = 0.25 label="AS1: Job_1, ..., Job_m" ];
51                 as2 [ width=2 height = 0.25 label="AS2: Job_1, ..., Job_p" ];
52                 as3 [ width=2 height = 0.25 label="AS3: Job_1, ..., Job_q" ];
53
54                 label = "Policy's Run Pool";
55         }
56
57         {
58                 rank=same;
59                 call_jdequeue [ shape=plaintext label="dequeue_job()" ];
60                 sstop_dotfixup [ shape=plaintext label="" width=0 height=0 ];
61         }
62
63         {
64                 rank=same;
65                 ordering=out;
66                 sstop [ shape=ellipse label="SS-Timer expires" ]
67                 jobslots [ shape=record label="Jobslots: | <0>js[0] | <1>js[1] | <2>js[2]" ];
68
69                 irq [ label="IRQ" shape=ellipse ];
70
71                 job_finish [ shape=plaintext label="don't requeue;\n/* job done */" ];
72         }
73
74         hstop [ shape=ellipse label="HS-Timer expires" ]
75
76         /*
77          * Edges
78          */
79
80         call_enqueue -> queues_middle_sep [ lhead=cluster_policy_queues ];
81
82         low_queue:qr -> call_dequeue:w;
83         rt_queue:qr -> call_dequeue:w;
84
85         call_dequeue -> as1 [lhead=cluster_runpool];
86
87         as1->call_jdequeue         [ltail=cluster_runpool];
88         call_jdequeue->jobslots:0;
89         call_jdequeue->sstop_dotfixup [ arrowhead=none];
90         sstop_dotfixup->sstop      [label="Spawn SS-Timer"];
91         sstop->jobslots            [label="SoftStop"];
92         sstop->hstop               [label="Spawn HS-Timer"];
93         hstop->jobslots:ne            [label="HardStop"];
94
95
96         as3->call_ctxfinish:ne [ ltail=cluster_runpool ];
97         call_ctxfinish:sw->rt_queue:qm [ lhead=cluster_policy_queues label="enqueue_ctx()\n/* ctx still has jobs */" ];
98
99         call_ctxfinish->call_ctxdone [constraint=false];
100
101         call_ctxdone->call_enqueue [weight=0.1 labeldistance=20.0 labelangle=0.0 taillabel="Job submitted to the ctx" style=dotted constraint=false];
102
103
104         {
105         jobslots->irq   [constraint=false];
106
107         irq->job_finish [constraint=false];
108         }
109
110         irq->as2  [lhead=cluster_runpool label="requeue_job()\n/* timeslice expired */" ];
111
112 }