tizen 2.3 release
[framework/system/deviced.git] / src / pass / pass-table.h
1 /*
2  * deviced
3  *
4  * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19
20 #ifndef __PASS_TABLE__
21 #define __PASS_TABLE__
22
23 #include "pass.h"
24
25 static struct pass_table pass_table_exynos4412[] = {
26         {
27         /* Low Level */
28                 /* Maximum constraint for Level */
29                 .limit_max_freq = 1000000,
30                 .limit_max_cpu = 3,
31
32                 /* Level up for condition */
33                 .num_up_cond = 1,
34                 .up_cond = {
35                         [0] = {
36                                 .freq = 800000,
37                                 .nr_running = 200,
38                                 .busy_cpu = 2,
39                         },
40                 },
41         }, {
42                 /* Maximum constraint for Level */
43                 .limit_max_freq = 1000000,
44                 .limit_max_cpu = 4,
45
46                 /* Level up for condition */
47                 .num_up_cond = 1,
48                 .up_cond = {
49                         [0] = {
50                                 .freq = 800000,
51                                 .nr_running = 200,
52                                 .busy_cpu = 2,
53                         },
54                 },
55
56                 /* Level down for condition */
57                 .num_down_cond = 1,
58                 .down_cond = {
59                         [0] = {
60                                 .freq = 500000,
61                                 .nr_running = 200,
62                                 .busy_cpu = 1,
63                         },
64                 },
65         }, {
66                 /* Maximum constraint for Level */
67                 .limit_max_freq = 1100000,
68                 .limit_max_cpu = 3,
69
70                 /* Level up for condition */
71                 .num_up_cond = 1,
72                 .up_cond = {
73                         [0] = {
74                                 .freq = 900000,
75                                 .nr_running = 200,
76                                 .busy_cpu = 2,
77                         },
78                 },
79
80                 /* Level down for condition */
81                 .num_down_cond = 1,
82                 .down_cond = {
83                         [0] = {
84                                 .freq = 500000,
85                                 .nr_running = 200,
86                                 .busy_cpu = 1,
87                         },
88                 },
89         }, {
90                 /* Maximum constraint for Level */
91                 .limit_max_freq = 1100000,
92                 .limit_max_cpu = 4,
93
94                 /* Level up for condition */
95                 .num_up_cond = 1,
96                 .up_cond = {
97                         [0] = {
98                                 .freq = 900000,
99                                 .nr_running = 200,
100                                 .busy_cpu = 2,
101                         },
102                 },
103
104                 /* Level down for condition */
105                 .num_down_cond = 1,
106                 .down_cond = {
107                         [0] = {
108                                 .freq = 500000,
109                                 .nr_running = 200,
110                                 .busy_cpu = 1,
111                         },
112                 },
113         }, {
114         /* Middle Level */
115                 /* Maximum constraint for Level */
116                 .limit_max_freq = 1200000,
117                 .limit_max_cpu = 3,
118
119                 /* Level up for condition */
120                 .num_up_cond = 1,
121                 .up_cond = {
122                         [0] = {
123                                 .freq = 1100000,
124                                 .nr_running = 300,
125                                 .busy_cpu = 3,
126                         },
127                 },
128
129                 /* Level down for condition */
130                 .num_down_cond = 1,
131                 .down_cond = {
132                         [0] = {
133                                 .freq = 1000000,
134                                 .nr_running = 200,
135                                 .busy_cpu = 1,
136                         },
137                 },
138         }, {
139                 /* Maximum constraint for Level */
140                 .limit_max_freq = 1200000,
141                 .limit_max_cpu = 4,
142
143                 /* Level up for condition */
144                 .num_up_cond = 1,
145                 .up_cond = {
146                         [0] = {
147                                 .freq = 1100000,
148                                 .nr_running =300,
149                                 .busy_cpu = 3,
150                         },
151                 },
152
153                 /* Level down for condition */
154                 .num_down_cond = 1,
155                 .down_cond = {
156                         [0] = {
157                                 .freq = 1000000,
158                                 .nr_running = 200,
159                                 .busy_cpu = 2,
160                         },
161                 },
162         }, {
163                 /* Maximum constraint for Level */
164                 .limit_max_freq = 1300000,
165                 .limit_max_cpu = 3,
166
167                 /* Level up for condition */
168                 .num_up_cond = 1,
169                 .up_cond = {
170                         [0] = {
171                                 .freq = 1200000,
172                                 .nr_running = 300,
173                                 .busy_cpu = 3,
174                         },
175                 },
176
177                 /* Level down for condition */
178                 .num_down_cond = 1,
179                 .down_cond = {
180                         [0] = {
181                                 .freq = 1000000,
182                                 .nr_running = 200,
183                                 .busy_cpu = 2,
184                         },
185                 },
186         }, {
187                 /* Maximum constraint for Level */
188                 .limit_max_freq = 1300000,
189                 .limit_max_cpu = 4,
190
191                 /* Level up for condition */
192                 .num_up_cond = 1,
193                 .up_cond = {
194                         [0] = {
195                                 .freq = 1200000,
196                                 .nr_running = 300,
197                                 .busy_cpu = 3,
198                         },
199                 },
200
201                 /* Level down for condition */
202                 .num_down_cond = 1,
203                 .down_cond = {
204                         [0] = {
205                                 .freq = 1000000,
206                                 .nr_running = 200,
207                                 .busy_cpu = 2,
208                         },
209                 },
210         }, {
211         /* High Level */
212                 /* Maximum constraint for Level */
213                 .limit_max_freq = 1400000,
214                 .limit_max_cpu = 3,
215
216                 /* Level up for condition */
217                 .num_up_cond = 1,
218                 .up_cond = {
219                         [0] = {
220                                 .freq = 1300000,
221                                 .nr_running = 300,
222                                 .busy_cpu = 3,
223                         },
224                 },
225
226                 /* Level down for condition */
227                 .num_down_cond = 1,
228                 .down_cond = {
229                         [0] = {
230                                 .freq = 1000000,
231                                 .nr_running = 200,
232                                 .busy_cpu = 2,
233                         },
234                 },
235         }, {
236                 /* Maximum constraint for Level */
237                 .limit_max_freq = 1400000,
238                 .limit_max_cpu = 4,
239
240                 /* Level up for condition */
241                 .num_up_cond = 1,
242                 .up_cond = {
243                         [0] = {
244                                 .freq = 1300000,
245                                 .nr_running = 300,
246                                 .busy_cpu = 3,
247                         },
248                 },
249
250                 /* Level down for condition */
251                 .num_down_cond = 1,
252                 .down_cond = {
253                         [0] = {
254                                 .freq = 1000000,
255                                 .nr_running = 200,
256                                 .busy_cpu = 2,
257                         },
258                 },
259         }, {
260                 /* Maximum constraint for Level */
261                 .limit_max_freq = 1500000,
262                 .limit_max_cpu = 3,
263
264                 /* Level up for condition */
265                 .num_up_cond = 1,
266                 .up_cond = {
267                         [0] = {
268                                 .freq = 1300000,
269                                 .nr_running = 300,
270                                 .busy_cpu = 3,
271                         },
272                 },
273
274                 /* Level down for condition */
275                 .num_down_cond = 1,
276                 .down_cond = {
277                         [0] = {
278                                 .freq = 1100000,
279                                 .nr_running = 200,
280                                 .busy_cpu = 2,
281                         },
282                 },
283         }, {
284                 /* Maximum constraint for Level */
285                 .limit_max_freq = 1500000,
286                 .limit_max_cpu = 4,
287
288                 /* Level up for condition */
289                 .num_up_cond = 1,
290                 .up_cond = {
291                         [0] = {
292                                 .freq = 1300000,
293                                 .nr_running = 300,
294                                 .busy_cpu = 3,
295                         },
296                 },
297
298                 /* Level down for condition */
299                 .num_down_cond = 1,
300                 .down_cond = {
301                         [0] = {
302                                 .freq = 1100000,
303                                 .nr_running = 200,
304                                 .busy_cpu = 2,
305                         },
306                 },
307         }, {
308                 /* Maximum constraint for Level */
309                 .limit_max_freq = 1600000,
310                 .limit_max_cpu = 3,
311
312                 /* Level up for condition */
313                 .num_up_cond = 1,
314                 .up_cond = {
315                         [0] = {
316                                 .freq = 1400000,
317                                 .nr_running = 400,
318                                 .busy_cpu = 3,
319                         },
320                 },
321
322                 /* Level down for condition */
323                 .num_down_cond = 1,
324                 .down_cond = {
325                         [0] = {
326                                 .freq = 1200000,
327                                 .nr_running = 200,
328                                 .busy_cpu = 2,
329                         },
330                 },
331         }, {
332                 /* Maximum constraint for Level */
333                 .limit_max_freq = 1600000,
334                 .limit_max_cpu = -1,
335
336                 /* Level down for condition */
337                 .num_down_cond = 1,
338                 .down_cond = {
339                         [0] = {
340                                 .freq = 1200000,
341                                 .nr_running = 300,
342                                 .busy_cpu = 3,
343                         },
344                 },
345         },
346 };
347
348 static struct pass_table pass_table_exynos4412_radiation[] = {
349         {
350                 /* level 0 - 0,0 */
351                 .limit_max_freq = 1100000,
352                 .limit_max_cpu = 1,
353
354                 /* Level up/down/left/right for condition */
355                 .num_up_cond = 1,
356                 .up_cond = {
357                         [0] = {
358                                 .freq = 1000000,
359                         },
360                 },
361                 .num_right_cond = 1,
362                 .right_cond = {
363                         [0] = {
364                                 .nr_running = 100,
365                                 .busy_cpu = 1,
366                         },
367                 },
368         }, {
369                 /* level 1 - 0,1 */
370                 .limit_max_freq = 1100000,
371                 .limit_max_cpu = 2,
372
373                 /* Level up/down/left/right for condition */
374                 .num_up_cond = 1,
375                 .up_cond = {
376                         [0] = {
377                                 .freq = 1000000,
378                         },
379                 },
380                 .num_left_cond = 1,
381                 .left_cond = {
382                         [0] = {
383                                 .nr_running = 100,
384                                 .busy_cpu = 1,
385                         },
386                 },
387                 .num_right_cond = 1,
388                 .right_cond = {
389                         [0] = {
390                                 .nr_running = 200,
391                                 .busy_cpu = 2,
392                         },
393                 },
394         }, {
395                 /* level 2 - 0,2 */
396                 .limit_max_freq = 1100000,
397                 .limit_max_cpu = 3,
398
399                 /* Level up/down/left/right for condition */
400                 .num_up_cond = 1,
401                 .up_cond = {
402                         [0] = {
403                                 .freq = 1000000,
404                         },
405                 },
406                 .num_left_cond = 1,
407                 .left_cond = {
408                         [0] = {
409                                 .nr_running = 200,
410                                 .busy_cpu = 2,
411                         },
412                 },
413                 .num_right_cond = 1,
414                 .right_cond = {
415                         [0] = {
416                                 .nr_running = 300,
417                                 .busy_cpu = 2,
418                         },
419                 },
420         }, {
421                 /* level 3 - 0,3 */
422                 .limit_max_freq = 1100000,
423                 .limit_max_cpu = 4,
424
425                 /* Level up/down/left/right for condition */
426                 .num_up_cond = 1,
427                 .up_cond = {
428                         [0] = {
429                                 .freq = 1000000,
430                         },
431                 },
432                 .num_left_cond = 1,
433                 .left_cond = {
434                         [0] = {
435                                 .nr_running = 300,
436                                 .busy_cpu = 2,
437                         },
438                 },
439         }, {
440                 /* level 4 - 1,0 */
441                 .limit_max_freq = 1200000,
442                 .limit_max_cpu = 1,
443
444                 /* Level up/down/left/right for condition */
445                 .num_down_cond = 1,
446                 .down_cond = {
447                         [0] = {
448                                 .freq = 500000,
449                         },
450                 },
451                 .num_up_cond = 1,
452                 .up_cond = {
453                         [0] = {
454                                 .freq = 1200000,
455                         },
456                 },
457                 .num_right_cond = 1,
458                 .right_cond = {
459                         [0] = {
460                                 .nr_running = 100,
461                                 .busy_cpu = 1,
462                         },
463                 },
464         }, {
465                 /* level 5 - 1,1 */
466                 .limit_max_freq = 1200000,
467                 .limit_max_cpu = 2,
468
469                 /* Level up/down/left/right for condition */
470                 .num_down_cond = 1,
471                 .down_cond = {
472                         [0] = {
473                                 .freq = 200000,
474                         },
475                 },
476                 .num_up_cond = 1,
477                 .up_cond = {
478                         [0] = {
479                                 .freq = 1200000,
480                         },
481                 },
482                 .num_left_cond = 1,
483                 .left_cond = {
484                         [0] = {
485                                 .nr_running = 100,
486                                 .busy_cpu = 1,
487                         },
488                 },
489                 .num_right_cond = 1,
490                 .right_cond = {
491                         [0] = {
492                                 .nr_running = 200,
493                                 .busy_cpu = 2,
494                         },
495                 },
496         }, {
497                 /* level 6 - 1,2 */
498                 .limit_max_freq = 1200000,
499                 .limit_max_cpu = 3,
500
501                 /* Level up/down/left/right for condition */
502                 .num_down_cond = 1,
503                 .down_cond = {
504                         [0] = {
505                                 .freq = 200000,
506                         },
507                 },
508                 .num_up_cond = 1,
509                 .up_cond = {
510                         [0] = {
511                                 .freq = 1200000,
512                         },
513                 },
514                 .num_left_cond = 1,
515                 .left_cond = {
516                         [0] = {
517                                 .nr_running = 200,
518                                 .busy_cpu = 2,
519                         },
520                 },
521                 .num_right_cond = 1,
522                 .right_cond = {
523                         [0] = {
524                                 .nr_running = 300,
525                                 .busy_cpu = 2,
526                         },
527                 },
528         }, {
529                 /* level 7 - 1,3 */
530                 .limit_max_freq = 1200000,
531                 .limit_max_cpu = 4,
532
533                 /* Level up/down/left/right for condition */
534                 .num_down_cond = 1,
535                 .down_cond = {
536                         [0] = {
537                                 .freq = 200000,
538                         },
539                 },
540                 .num_up_cond = 1,
541                 .up_cond = {
542                         [0] = {
543                                 .freq = 1200000,
544                         },
545                 },
546                 .num_left_cond = 1,
547                 .left_cond = {
548                         [0] = {
549                                 .nr_running = 300,
550                                 .busy_cpu = 2,
551                         },
552                 },
553         }, {
554                 /* level 8 - 2,0 */
555                 .limit_max_freq = 1400000,
556                 .limit_max_cpu = 1,
557
558                 /* Level up/down/left/right for condition */
559                 .num_down_cond = 1,
560                 .down_cond = {
561                         [0] = {
562                                 .freq = 500000,
563                         },
564                 },
565                 .num_up_cond = 1,
566                 .up_cond = {
567                         [0] = {
568                                 .freq = 1400000,
569                         },
570                 },
571                 .num_right_cond = 1,
572                 .right_cond = {
573                         [0] = {
574                                 .nr_running = 100,
575                                 .busy_cpu = 1,
576                         },
577                 },
578         }, {
579                 /* level 9 - 2,1 */
580                 .limit_max_freq = 1400000,
581                 .limit_max_cpu = 2,
582
583                 /* Level up/down/left/right for condition */
584                 .num_down_cond = 1,
585                 .down_cond = {
586                         [0] = {
587                                 .freq = 500000,
588                         },
589                 },
590                 .num_up_cond = 1,
591                 .up_cond = {
592                         [0] = {
593                                 .freq = 1400000,
594                         },
595                 },
596                 .num_left_cond = 1,
597                 .left_cond = {
598                         [0] = {
599                                 .nr_running = 100,
600                                 .busy_cpu = 1,
601                         },
602                 },
603                 .num_right_cond = 1,
604                 .right_cond = {
605                         [0] = {
606                                 .nr_running = 200,
607                                 .busy_cpu = 2,
608                         },
609                 },
610         }, {
611                 /* level 10 - 2,2 */
612                 .limit_max_freq = 1400000,
613                 .limit_max_cpu = 3,
614
615                 /* Level up/down/left/right for condition */
616                 .num_down_cond = 1,
617                 .down_cond = {
618                         [0] = {
619                                 .freq = 500000,
620                         },
621                 },
622                 .num_up_cond = 1,
623                 .up_cond = {
624                         [0] = {
625                                 .freq = 1400000,
626                         },
627                 },
628                 .num_left_cond = 1,
629                 .left_cond = {
630                         [0] = {
631                                 .nr_running = 200,
632                                 .busy_cpu = 2,
633                         },
634                 },
635                 .num_right_cond = 1,
636                 .right_cond = {
637                         [0] = {
638                                 .nr_running = 300,
639                                 .busy_cpu = 2,
640                         },
641                 },
642         }, {
643                 /* level 11 - 2,3 */
644                 .limit_max_freq = 1400000,
645                 .limit_max_cpu = 4,
646
647                 /* Level up/down/left/right for condition */
648                 .num_down_cond = 1,
649                 .down_cond = {
650                         [0] = {
651                                 .freq = 500000,
652                         },
653                 },
654                 .num_up_cond = 1,
655                 .up_cond = {
656                         [0] = {
657                                 .freq = 1400000,
658                         },
659                 },
660                 .num_left_cond = 1,
661                 .left_cond = {
662                         [0] = {
663                                 .nr_running = 300,
664                                 .busy_cpu = 2,
665                         },
666                 },
667         }, {
668                 /* level 12 - 3,0 */
669                 .limit_max_freq = 1600000,
670                 .limit_max_cpu = 1,
671
672                 /* Level up/down/left/right for condition */
673                 .num_down_cond = 1,
674                 .down_cond = {
675                         [0] = {
676                                 .freq = 800000,
677                         },
678                 },
679                 .num_right_cond = 1,
680                 .right_cond = {
681                         [0] = {
682                                 .nr_running = 100,
683                                 .busy_cpu = 1,
684                         },
685                 },
686         }, {
687                 /* level 13 - 3,1 */
688                 .limit_max_freq = 1600000,
689                 .limit_max_cpu = 2,
690
691                 /* Level up/down/left/right for condition */
692                 .num_down_cond = 1,
693                 .down_cond = {
694                         [0] = {
695                                 .freq = 800000,
696                         },
697                 },
698                 .num_left_cond = 1,
699                 .left_cond = {
700                         [0] = {
701                                 .nr_running = 100,
702                                 .busy_cpu = 1,
703                         },
704                 },
705                 .num_right_cond = 1,
706                 .right_cond = {
707                         [0] = {
708                                 .nr_running = 200,
709                                 .busy_cpu = 2,
710                         },
711                 },
712         }, {
713                 /* level 14 - 3,2 */
714                 .limit_max_freq = 1600000,
715                 .limit_max_cpu = 3,
716
717                 /* Level up/down/left/right for condition */
718                 .num_down_cond = 1,
719                 .down_cond = {
720                         [0] = {
721                                 .freq = 800000,
722                         },
723                 },
724                 .num_left_cond = 1,
725                 .left_cond = {
726                         [0] = {
727                                 .nr_running = 200,
728                                 .busy_cpu = 2,
729                         },
730                 },
731                 .num_right_cond = 1,
732                 .right_cond = {
733                         [0] = {
734                                 .nr_running = 300,
735                                 .busy_cpu = 2,
736                         },
737                 },
738         }, {
739                 /* level 15 - 3,3 */
740                 .limit_max_freq = 1600000,
741                 .limit_max_cpu = 4,
742
743                 /* Level up/down/left/right for condition */
744                 .num_down_cond = 1,
745                 .down_cond = {
746                         [0] = {
747                                 .freq = 800000,
748                         },
749                 },
750                 .num_left_cond = 1,
751                 .left_cond = {
752                         [0] = {
753                                 .nr_running = 300,
754                                 .busy_cpu = 2,
755                         },
756                 },
757         },
758 };
759
760
761 static struct pass_table pass_table_w_exynos4212[] = {
762         {
763                 /* level 0 - 0,0 */
764                 .limit_max_freq = 600000,
765                 .limit_max_cpu = 1,
766
767                 /* Level up/down/left/right for condition */
768                 .num_down_cond  = 0,
769                 .num_up_cond    = 1,
770                 .up_cond = {
771                         [0] = {
772                                 .freq = 600000,
773                         },
774                 },
775                 .num_left_cond  = 0,
776                 .num_right_cond = 0,
777         }, {
778                 /* level 1 - 1,0 */
779                 .limit_max_freq = 700000,
780                 .limit_max_cpu = 1,
781
782                 /* Level up/down/left/right for condition */
783                 .num_down_cond  = 1,
784                 .down_cond = {
785                         [0] = {
786                                 .freq = 500000,
787                         },
788                 },
789                 .num_up_cond    = 1,
790                 .up_cond = {
791                         [0] = {
792                                 .freq = 700000,
793                         },
794                 },
795                 .num_left_cond  = 0,
796                 .num_right_cond = 0,
797         }, {
798                 /* level 2 - 2,0 */
799                 .limit_max_freq = 800000,
800                 .limit_max_cpu = 1,
801
802                 /* Level up/down/left/right for condition */
803                 .num_down_cond  = 1,
804                 .down_cond = {
805                         [0] = {
806                                 .freq = 700000,
807                         },
808                 },
809                 .num_up_cond    = 1,
810                 .up_cond = {
811                         [0] = {
812                                 .freq = 800000,
813                                 .nr_running = 200,
814                                 .busy_cpu = 1,
815                         },
816                 },
817                 .num_left_cond  = 0,
818                 .num_right_cond = 0,
819         }, {
820                 /* level 3 - 0,1 */
821                 .limit_max_freq = 600000,
822                 .limit_max_cpu = 2,
823
824                 .num_down_cond  = 1,
825                 .down_cond = {
826                         [0] = {
827                                 .freq = 500000,
828                                 .nr_running = 100,
829                                 .busy_cpu = 1,
830                         },
831                 },
832                 .num_up_cond    = 1,
833                 .up_cond = {
834                         [0] = { .freq = 600000,
835                                 .nr_running = 200,
836                                 .busy_cpu = 2,
837                         },
838                 },
839                 .num_left_cond  = 0,
840                 .num_right_cond = 0,
841         }, {
842                 /* level 4 - 1,1 */
843                 .limit_max_freq = 700000,
844                 .limit_max_cpu = 2,
845
846                 .num_down_cond  = 1,
847                 .down_cond = {
848                         [0] = {
849                                 .freq = 600000,
850                                 .nr_running = 100,
851                                 .busy_cpu = 1,
852                         },
853                 },
854                 .num_up_cond    = 1,
855                 .up_cond = {
856                         [0] = { .freq = 700000,
857                                 .nr_running = 200,
858                                 .busy_cpu = 2,
859                         },
860                 },
861                 .num_left_cond  = 0,
862                 .num_right_cond = 0,
863         }, {
864                 /* level 5 - 2,1 */
865                 .limit_max_freq = 800000,
866                 .limit_max_cpu = 2,
867
868                 .num_down_cond  = 1,
869                 .down_cond = {
870                         [0] = {
871                                 .freq = 600000,
872                                 .nr_running = 150,
873                                 .busy_cpu = 1,
874                         },
875                 },
876                 .num_up_cond    = 0,
877                 .num_left_cond  = 0,
878                 .num_right_cond = 0,
879         },
880 };
881 #endif  /* __PASS_TABLE__ */