diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-02-23 17:53:41 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-27 09:49:35 -0500 |
commit | a02fa397b09cf1e02ecb922642b4ebb5e39f9234 (patch) | |
tree | 8052db5ef66cc1c0f74327fab1a69bc199b55505 /drivers/gpu/drm/radeon/radeon_asic.c | |
parent | 0f9e006c9a8b264c1a391a58142f6c0e777e63c2 (diff) |
drm/radeon/kms: reorganize pm callbacks
tidy up the radeon_asic struct.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 204 |
1 files changed, 119 insertions, 85 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 839b18831699..9dc8f8dfeb65 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -172,11 +172,13 @@ static struct radeon_asic r100_asic = { | |||
172 | }, | 172 | }, |
173 | .ioctl_wait_idle = NULL, | 173 | .ioctl_wait_idle = NULL, |
174 | .gui_idle = &r100_gui_idle, | 174 | .gui_idle = &r100_gui_idle, |
175 | .pm_misc = &r100_pm_misc, | 175 | .pm = { |
176 | .pm_prepare = &r100_pm_prepare, | 176 | .misc = &r100_pm_misc, |
177 | .pm_finish = &r100_pm_finish, | 177 | .prepare = &r100_pm_prepare, |
178 | .pm_init_profile = &r100_pm_init_profile, | 178 | .finish = &r100_pm_finish, |
179 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 179 | .init_profile = &r100_pm_init_profile, |
180 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
181 | }, | ||
180 | .pflip = { | 182 | .pflip = { |
181 | .pre_page_flip = &r100_pre_page_flip, | 183 | .pre_page_flip = &r100_pre_page_flip, |
182 | .page_flip = &r100_page_flip, | 184 | .page_flip = &r100_page_flip, |
@@ -229,11 +231,13 @@ static struct radeon_asic r200_asic = { | |||
229 | }, | 231 | }, |
230 | .ioctl_wait_idle = NULL, | 232 | .ioctl_wait_idle = NULL, |
231 | .gui_idle = &r100_gui_idle, | 233 | .gui_idle = &r100_gui_idle, |
232 | .pm_misc = &r100_pm_misc, | 234 | .pm = { |
233 | .pm_prepare = &r100_pm_prepare, | 235 | .misc = &r100_pm_misc, |
234 | .pm_finish = &r100_pm_finish, | 236 | .prepare = &r100_pm_prepare, |
235 | .pm_init_profile = &r100_pm_init_profile, | 237 | .finish = &r100_pm_finish, |
236 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 238 | .init_profile = &r100_pm_init_profile, |
239 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
240 | }, | ||
237 | .pflip = { | 241 | .pflip = { |
238 | .pre_page_flip = &r100_pre_page_flip, | 242 | .pre_page_flip = &r100_pre_page_flip, |
239 | .page_flip = &r100_page_flip, | 243 | .page_flip = &r100_page_flip, |
@@ -287,11 +291,13 @@ static struct radeon_asic r300_asic = { | |||
287 | }, | 291 | }, |
288 | .ioctl_wait_idle = NULL, | 292 | .ioctl_wait_idle = NULL, |
289 | .gui_idle = &r100_gui_idle, | 293 | .gui_idle = &r100_gui_idle, |
290 | .pm_misc = &r100_pm_misc, | 294 | .pm = { |
291 | .pm_prepare = &r100_pm_prepare, | 295 | .misc = &r100_pm_misc, |
292 | .pm_finish = &r100_pm_finish, | 296 | .prepare = &r100_pm_prepare, |
293 | .pm_init_profile = &r100_pm_init_profile, | 297 | .finish = &r100_pm_finish, |
294 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 298 | .init_profile = &r100_pm_init_profile, |
299 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
300 | }, | ||
295 | .pflip = { | 301 | .pflip = { |
296 | .pre_page_flip = &r100_pre_page_flip, | 302 | .pre_page_flip = &r100_pre_page_flip, |
297 | .page_flip = &r100_page_flip, | 303 | .page_flip = &r100_page_flip, |
@@ -344,11 +350,13 @@ static struct radeon_asic r300_asic_pcie = { | |||
344 | }, | 350 | }, |
345 | .ioctl_wait_idle = NULL, | 351 | .ioctl_wait_idle = NULL, |
346 | .gui_idle = &r100_gui_idle, | 352 | .gui_idle = &r100_gui_idle, |
347 | .pm_misc = &r100_pm_misc, | 353 | .pm = { |
348 | .pm_prepare = &r100_pm_prepare, | 354 | .misc = &r100_pm_misc, |
349 | .pm_finish = &r100_pm_finish, | 355 | .prepare = &r100_pm_prepare, |
350 | .pm_init_profile = &r100_pm_init_profile, | 356 | .finish = &r100_pm_finish, |
351 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 357 | .init_profile = &r100_pm_init_profile, |
358 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
359 | }, | ||
352 | .pflip = { | 360 | .pflip = { |
353 | .pre_page_flip = &r100_pre_page_flip, | 361 | .pre_page_flip = &r100_pre_page_flip, |
354 | .page_flip = &r100_page_flip, | 362 | .page_flip = &r100_page_flip, |
@@ -402,11 +410,13 @@ static struct radeon_asic r420_asic = { | |||
402 | }, | 410 | }, |
403 | .ioctl_wait_idle = NULL, | 411 | .ioctl_wait_idle = NULL, |
404 | .gui_idle = &r100_gui_idle, | 412 | .gui_idle = &r100_gui_idle, |
405 | .pm_misc = &r100_pm_misc, | 413 | .pm = { |
406 | .pm_prepare = &r100_pm_prepare, | 414 | .misc = &r100_pm_misc, |
407 | .pm_finish = &r100_pm_finish, | 415 | .prepare = &r100_pm_prepare, |
408 | .pm_init_profile = &r420_pm_init_profile, | 416 | .finish = &r100_pm_finish, |
409 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 417 | .init_profile = &r420_pm_init_profile, |
418 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
419 | }, | ||
410 | .pflip = { | 420 | .pflip = { |
411 | .pre_page_flip = &r100_pre_page_flip, | 421 | .pre_page_flip = &r100_pre_page_flip, |
412 | .page_flip = &r100_page_flip, | 422 | .page_flip = &r100_page_flip, |
@@ -460,11 +470,13 @@ static struct radeon_asic rs400_asic = { | |||
460 | }, | 470 | }, |
461 | .ioctl_wait_idle = NULL, | 471 | .ioctl_wait_idle = NULL, |
462 | .gui_idle = &r100_gui_idle, | 472 | .gui_idle = &r100_gui_idle, |
463 | .pm_misc = &r100_pm_misc, | 473 | .pm = { |
464 | .pm_prepare = &r100_pm_prepare, | 474 | .misc = &r100_pm_misc, |
465 | .pm_finish = &r100_pm_finish, | 475 | .prepare = &r100_pm_prepare, |
466 | .pm_init_profile = &r100_pm_init_profile, | 476 | .finish = &r100_pm_finish, |
467 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 477 | .init_profile = &r100_pm_init_profile, |
478 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
479 | }, | ||
468 | .pflip = { | 480 | .pflip = { |
469 | .pre_page_flip = &r100_pre_page_flip, | 481 | .pre_page_flip = &r100_pre_page_flip, |
470 | .page_flip = &r100_page_flip, | 482 | .page_flip = &r100_page_flip, |
@@ -518,11 +530,13 @@ static struct radeon_asic rs600_asic = { | |||
518 | }, | 530 | }, |
519 | .ioctl_wait_idle = NULL, | 531 | .ioctl_wait_idle = NULL, |
520 | .gui_idle = &r100_gui_idle, | 532 | .gui_idle = &r100_gui_idle, |
521 | .pm_misc = &rs600_pm_misc, | 533 | .pm = { |
522 | .pm_prepare = &rs600_pm_prepare, | 534 | .misc = &rs600_pm_misc, |
523 | .pm_finish = &rs600_pm_finish, | 535 | .prepare = &rs600_pm_prepare, |
524 | .pm_init_profile = &r420_pm_init_profile, | 536 | .finish = &rs600_pm_finish, |
525 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 537 | .init_profile = &r420_pm_init_profile, |
538 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
539 | }, | ||
526 | .pflip = { | 540 | .pflip = { |
527 | .pre_page_flip = &rs600_pre_page_flip, | 541 | .pre_page_flip = &rs600_pre_page_flip, |
528 | .page_flip = &rs600_page_flip, | 542 | .page_flip = &rs600_page_flip, |
@@ -576,11 +590,13 @@ static struct radeon_asic rs690_asic = { | |||
576 | }, | 590 | }, |
577 | .ioctl_wait_idle = NULL, | 591 | .ioctl_wait_idle = NULL, |
578 | .gui_idle = &r100_gui_idle, | 592 | .gui_idle = &r100_gui_idle, |
579 | .pm_misc = &rs600_pm_misc, | 593 | .pm = { |
580 | .pm_prepare = &rs600_pm_prepare, | 594 | .misc = &rs600_pm_misc, |
581 | .pm_finish = &rs600_pm_finish, | 595 | .prepare = &rs600_pm_prepare, |
582 | .pm_init_profile = &r420_pm_init_profile, | 596 | .finish = &rs600_pm_finish, |
583 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 597 | .init_profile = &r420_pm_init_profile, |
598 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
599 | }, | ||
584 | .pflip = { | 600 | .pflip = { |
585 | .pre_page_flip = &rs600_pre_page_flip, | 601 | .pre_page_flip = &rs600_pre_page_flip, |
586 | .page_flip = &rs600_page_flip, | 602 | .page_flip = &rs600_page_flip, |
@@ -634,11 +650,13 @@ static struct radeon_asic rv515_asic = { | |||
634 | }, | 650 | }, |
635 | .ioctl_wait_idle = NULL, | 651 | .ioctl_wait_idle = NULL, |
636 | .gui_idle = &r100_gui_idle, | 652 | .gui_idle = &r100_gui_idle, |
637 | .pm_misc = &rs600_pm_misc, | 653 | .pm = { |
638 | .pm_prepare = &rs600_pm_prepare, | 654 | .misc = &rs600_pm_misc, |
639 | .pm_finish = &rs600_pm_finish, | 655 | .prepare = &rs600_pm_prepare, |
640 | .pm_init_profile = &r420_pm_init_profile, | 656 | .finish = &rs600_pm_finish, |
641 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 657 | .init_profile = &r420_pm_init_profile, |
658 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
659 | }, | ||
642 | .pflip = { | 660 | .pflip = { |
643 | .pre_page_flip = &rs600_pre_page_flip, | 661 | .pre_page_flip = &rs600_pre_page_flip, |
644 | .page_flip = &rs600_page_flip, | 662 | .page_flip = &rs600_page_flip, |
@@ -692,11 +710,13 @@ static struct radeon_asic r520_asic = { | |||
692 | }, | 710 | }, |
693 | .ioctl_wait_idle = NULL, | 711 | .ioctl_wait_idle = NULL, |
694 | .gui_idle = &r100_gui_idle, | 712 | .gui_idle = &r100_gui_idle, |
695 | .pm_misc = &rs600_pm_misc, | 713 | .pm = { |
696 | .pm_prepare = &rs600_pm_prepare, | 714 | .misc = &rs600_pm_misc, |
697 | .pm_finish = &rs600_pm_finish, | 715 | .prepare = &rs600_pm_prepare, |
698 | .pm_init_profile = &r420_pm_init_profile, | 716 | .finish = &rs600_pm_finish, |
699 | .pm_get_dynpm_state = &r100_pm_get_dynpm_state, | 717 | .init_profile = &r420_pm_init_profile, |
718 | .get_dynpm_state = &r100_pm_get_dynpm_state, | ||
719 | }, | ||
700 | .pflip = { | 720 | .pflip = { |
701 | .pre_page_flip = &rs600_pre_page_flip, | 721 | .pre_page_flip = &rs600_pre_page_flip, |
702 | .page_flip = &rs600_page_flip, | 722 | .page_flip = &rs600_page_flip, |
@@ -749,11 +769,13 @@ static struct radeon_asic r600_asic = { | |||
749 | }, | 769 | }, |
750 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 770 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
751 | .gui_idle = &r600_gui_idle, | 771 | .gui_idle = &r600_gui_idle, |
752 | .pm_misc = &r600_pm_misc, | 772 | .pm = { |
753 | .pm_prepare = &rs600_pm_prepare, | 773 | .misc = &r600_pm_misc, |
754 | .pm_finish = &rs600_pm_finish, | 774 | .prepare = &rs600_pm_prepare, |
755 | .pm_init_profile = &r600_pm_init_profile, | 775 | .finish = &rs600_pm_finish, |
756 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 776 | .init_profile = &r600_pm_init_profile, |
777 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
778 | }, | ||
757 | .pflip = { | 779 | .pflip = { |
758 | .pre_page_flip = &rs600_pre_page_flip, | 780 | .pre_page_flip = &rs600_pre_page_flip, |
759 | .page_flip = &rs600_page_flip, | 781 | .page_flip = &rs600_page_flip, |
@@ -806,11 +828,13 @@ static struct radeon_asic rs780_asic = { | |||
806 | }, | 828 | }, |
807 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 829 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
808 | .gui_idle = &r600_gui_idle, | 830 | .gui_idle = &r600_gui_idle, |
809 | .pm_misc = &r600_pm_misc, | 831 | .pm = { |
810 | .pm_prepare = &rs600_pm_prepare, | 832 | .misc = &r600_pm_misc, |
811 | .pm_finish = &rs600_pm_finish, | 833 | .prepare = &rs600_pm_prepare, |
812 | .pm_init_profile = &rs780_pm_init_profile, | 834 | .finish = &rs600_pm_finish, |
813 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 835 | .init_profile = &rs780_pm_init_profile, |
836 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
837 | }, | ||
814 | .pflip = { | 838 | .pflip = { |
815 | .pre_page_flip = &rs600_pre_page_flip, | 839 | .pre_page_flip = &rs600_pre_page_flip, |
816 | .page_flip = &rs600_page_flip, | 840 | .page_flip = &rs600_page_flip, |
@@ -863,11 +887,13 @@ static struct radeon_asic rv770_asic = { | |||
863 | }, | 887 | }, |
864 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 888 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
865 | .gui_idle = &r600_gui_idle, | 889 | .gui_idle = &r600_gui_idle, |
866 | .pm_misc = &rv770_pm_misc, | 890 | .pm = { |
867 | .pm_prepare = &rs600_pm_prepare, | 891 | .misc = &rv770_pm_misc, |
868 | .pm_finish = &rs600_pm_finish, | 892 | .prepare = &rs600_pm_prepare, |
869 | .pm_init_profile = &r600_pm_init_profile, | 893 | .finish = &rs600_pm_finish, |
870 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 894 | .init_profile = &r600_pm_init_profile, |
895 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
896 | }, | ||
871 | .pflip = { | 897 | .pflip = { |
872 | .pre_page_flip = &rs600_pre_page_flip, | 898 | .pre_page_flip = &rs600_pre_page_flip, |
873 | .page_flip = &rv770_page_flip, | 899 | .page_flip = &rv770_page_flip, |
@@ -920,11 +946,13 @@ static struct radeon_asic evergreen_asic = { | |||
920 | }, | 946 | }, |
921 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 947 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
922 | .gui_idle = &r600_gui_idle, | 948 | .gui_idle = &r600_gui_idle, |
923 | .pm_misc = &evergreen_pm_misc, | 949 | .pm = { |
924 | .pm_prepare = &evergreen_pm_prepare, | 950 | .misc = &evergreen_pm_misc, |
925 | .pm_finish = &evergreen_pm_finish, | 951 | .prepare = &evergreen_pm_prepare, |
926 | .pm_init_profile = &r600_pm_init_profile, | 952 | .finish = &evergreen_pm_finish, |
927 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 953 | .init_profile = &r600_pm_init_profile, |
954 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
955 | }, | ||
928 | .pflip = { | 956 | .pflip = { |
929 | .pre_page_flip = &evergreen_pre_page_flip, | 957 | .pre_page_flip = &evergreen_pre_page_flip, |
930 | .page_flip = &evergreen_page_flip, | 958 | .page_flip = &evergreen_page_flip, |
@@ -977,11 +1005,13 @@ static struct radeon_asic sumo_asic = { | |||
977 | }, | 1005 | }, |
978 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 1006 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
979 | .gui_idle = &r600_gui_idle, | 1007 | .gui_idle = &r600_gui_idle, |
980 | .pm_misc = &evergreen_pm_misc, | 1008 | .pm = { |
981 | .pm_prepare = &evergreen_pm_prepare, | 1009 | .misc = &evergreen_pm_misc, |
982 | .pm_finish = &evergreen_pm_finish, | 1010 | .prepare = &evergreen_pm_prepare, |
983 | .pm_init_profile = &sumo_pm_init_profile, | 1011 | .finish = &evergreen_pm_finish, |
984 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 1012 | .init_profile = &sumo_pm_init_profile, |
1013 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
1014 | }, | ||
985 | .pflip = { | 1015 | .pflip = { |
986 | .pre_page_flip = &evergreen_pre_page_flip, | 1016 | .pre_page_flip = &evergreen_pre_page_flip, |
987 | .page_flip = &evergreen_page_flip, | 1017 | .page_flip = &evergreen_page_flip, |
@@ -1034,11 +1064,13 @@ static struct radeon_asic btc_asic = { | |||
1034 | }, | 1064 | }, |
1035 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 1065 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
1036 | .gui_idle = &r600_gui_idle, | 1066 | .gui_idle = &r600_gui_idle, |
1037 | .pm_misc = &evergreen_pm_misc, | 1067 | .pm = { |
1038 | .pm_prepare = &evergreen_pm_prepare, | 1068 | .misc = &evergreen_pm_misc, |
1039 | .pm_finish = &evergreen_pm_finish, | 1069 | .prepare = &evergreen_pm_prepare, |
1040 | .pm_init_profile = &r600_pm_init_profile, | 1070 | .finish = &evergreen_pm_finish, |
1041 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 1071 | .init_profile = &r600_pm_init_profile, |
1072 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
1073 | }, | ||
1042 | .pflip = { | 1074 | .pflip = { |
1043 | .pre_page_flip = &evergreen_pre_page_flip, | 1075 | .pre_page_flip = &evergreen_pre_page_flip, |
1044 | .page_flip = &evergreen_page_flip, | 1076 | .page_flip = &evergreen_page_flip, |
@@ -1114,11 +1146,13 @@ static struct radeon_asic cayman_asic = { | |||
1114 | }, | 1146 | }, |
1115 | .ioctl_wait_idle = r600_ioctl_wait_idle, | 1147 | .ioctl_wait_idle = r600_ioctl_wait_idle, |
1116 | .gui_idle = &r600_gui_idle, | 1148 | .gui_idle = &r600_gui_idle, |
1117 | .pm_misc = &evergreen_pm_misc, | 1149 | .pm = { |
1118 | .pm_prepare = &evergreen_pm_prepare, | 1150 | .misc = &evergreen_pm_misc, |
1119 | .pm_finish = &evergreen_pm_finish, | 1151 | .prepare = &evergreen_pm_prepare, |
1120 | .pm_init_profile = &r600_pm_init_profile, | 1152 | .finish = &evergreen_pm_finish, |
1121 | .pm_get_dynpm_state = &r600_pm_get_dynpm_state, | 1153 | .init_profile = &r600_pm_init_profile, |
1154 | .get_dynpm_state = &r600_pm_get_dynpm_state, | ||
1155 | }, | ||
1122 | .pflip = { | 1156 | .pflip = { |
1123 | .pre_page_flip = &evergreen_pre_page_flip, | 1157 | .pre_page_flip = &evergreen_pre_page_flip, |
1124 | .page_flip = &evergreen_page_flip, | 1158 | .page_flip = &evergreen_page_flip, |