aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-03-28 10:44:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-06-27 19:40:05 -0400
commitfa4b5471bd6231d293a2de9ad016e39eb2c9c70e (patch)
treedf0e718c364b50457e1b72e2930f3be5b8e39c19 /drivers
parenta9e61410921bcc1aa8f594ffa6301d5baba90f3b (diff)
drm/radeon/dpm: add dpm_enable failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/btc_dpm.c25
-rw-r--r--drivers/gpu/drm/radeon/cypress_dpm.c31
-rw-r--r--drivers/gpu/drm/radeon/ni_dpm.c48
-rw-r--r--drivers/gpu/drm/radeon/rv770_dpm.c17
4 files changed, 87 insertions, 34 deletions
diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index 52fd2c8eed5f..4a50b508d302 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -2353,14 +2353,18 @@ int btc_dpm_enable(struct radeon_device *rdev)
2353 if (pi->voltage_control) { 2353 if (pi->voltage_control) {
2354 rv770_enable_voltage_control(rdev, true); 2354 rv770_enable_voltage_control(rdev, true);
2355 ret = cypress_construct_voltage_tables(rdev); 2355 ret = cypress_construct_voltage_tables(rdev);
2356 if (ret) 2356 if (ret) {
2357 DRM_ERROR("cypress_construct_voltage_tables failed\n");
2357 return ret; 2358 return ret;
2359 }
2358 } 2360 }
2359 2361
2360 if (pi->mvdd_control) { 2362 if (pi->mvdd_control) {
2361 ret = cypress_get_mvdd_configuration(rdev); 2363 ret = cypress_get_mvdd_configuration(rdev);
2362 if (ret) 2364 if (ret) {
2365 DRM_ERROR("cypress_get_mvdd_configuration failed\n");
2363 return ret; 2366 return ret;
2367 }
2364 } 2368 }
2365 2369
2366 if (eg_pi->dynamic_ac_timing) { 2370 if (eg_pi->dynamic_ac_timing) {
@@ -2391,27 +2395,34 @@ int btc_dpm_enable(struct radeon_device *rdev)
2391 btc_enable_dynamic_pcie_gen2(rdev, true); 2395 btc_enable_dynamic_pcie_gen2(rdev, true);
2392 2396
2393 ret = rv770_upload_firmware(rdev); 2397 ret = rv770_upload_firmware(rdev);
2394 if (ret) 2398 if (ret) {
2399 DRM_ERROR("rv770_upload_firmware failed\n");
2395 return ret; 2400 return ret;
2396 2401 }
2397 ret = cypress_get_table_locations(rdev); 2402 ret = cypress_get_table_locations(rdev);
2398 if (ret) 2403 if (ret) {
2404 DRM_ERROR("cypress_get_table_locations failed\n");
2399 return ret; 2405 return ret;
2406 }
2400 ret = btc_init_smc_table(rdev, boot_ps); 2407 ret = btc_init_smc_table(rdev, boot_ps);
2401 if (ret) 2408 if (ret)
2402 return ret; 2409 return ret;
2403 2410
2404 if (eg_pi->dynamic_ac_timing) { 2411 if (eg_pi->dynamic_ac_timing) {
2405 ret = cypress_populate_mc_reg_table(rdev, boot_ps); 2412 ret = cypress_populate_mc_reg_table(rdev, boot_ps);
2406 if (ret) 2413 if (ret) {
2414 DRM_ERROR("cypress_populate_mc_reg_table failed\n");
2407 return ret; 2415 return ret;
2416 }
2408 } 2417 }
2409 2418
2410 cypress_program_response_times(rdev); 2419 cypress_program_response_times(rdev);
2411 r7xx_start_smc(rdev); 2420 r7xx_start_smc(rdev);
2412 ret = cypress_notify_smc_display_change(rdev, false); 2421 ret = cypress_notify_smc_display_change(rdev, false);
2413 if (ret) 2422 if (ret) {
2423 DRM_ERROR("cypress_notify_smc_display_change failed\n");
2414 return ret; 2424 return ret;
2425 }
2415 cypress_enable_sclk_control(rdev, true); 2426 cypress_enable_sclk_control(rdev, true);
2416 2427
2417 if (eg_pi->memory_transition) 2428 if (eg_pi->memory_transition)
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 9bf7ff7907b2..f90e5498785c 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -1813,14 +1813,18 @@ int cypress_dpm_enable(struct radeon_device *rdev)
1813 if (pi->voltage_control) { 1813 if (pi->voltage_control) {
1814 rv770_enable_voltage_control(rdev, true); 1814 rv770_enable_voltage_control(rdev, true);
1815 ret = cypress_construct_voltage_tables(rdev); 1815 ret = cypress_construct_voltage_tables(rdev);
1816 if (ret) 1816 if (ret) {
1817 DRM_ERROR("cypress_construct_voltage_tables failed\n");
1817 return ret; 1818 return ret;
1819 }
1818 } 1820 }
1819 1821
1820 if (pi->mvdd_control) { 1822 if (pi->mvdd_control) {
1821 ret = cypress_get_mvdd_configuration(rdev); 1823 ret = cypress_get_mvdd_configuration(rdev);
1822 if (ret) 1824 if (ret) {
1825 DRM_ERROR("cypress_get_mvdd_configuration failed\n");
1823 return ret; 1826 return ret;
1827 }
1824 } 1828 }
1825 1829
1826 if (eg_pi->dynamic_ac_timing) { 1830 if (eg_pi->dynamic_ac_timing) {
@@ -1854,21 +1858,27 @@ int cypress_dpm_enable(struct radeon_device *rdev)
1854 cypress_enable_dynamic_pcie_gen2(rdev, true); 1858 cypress_enable_dynamic_pcie_gen2(rdev, true);
1855 1859
1856 ret = rv770_upload_firmware(rdev); 1860 ret = rv770_upload_firmware(rdev);
1857 if (ret) 1861 if (ret) {
1862 DRM_ERROR("rv770_upload_firmware failed\n");
1858 return ret; 1863 return ret;
1864 }
1859 1865
1860 ret = cypress_get_table_locations(rdev); 1866 ret = cypress_get_table_locations(rdev);
1861 if (ret) 1867 if (ret) {
1868 DRM_ERROR("cypress_get_table_locations failed\n");
1862 return ret; 1869 return ret;
1863 1870 }
1864 ret = cypress_init_smc_table(rdev, boot_ps); 1871 ret = cypress_init_smc_table(rdev, boot_ps);
1865 if (ret) 1872 if (ret) {
1873 DRM_ERROR("cypress_init_smc_table failed\n");
1866 return ret; 1874 return ret;
1867 1875 }
1868 if (eg_pi->dynamic_ac_timing) { 1876 if (eg_pi->dynamic_ac_timing) {
1869 ret = cypress_populate_mc_reg_table(rdev, boot_ps); 1877 ret = cypress_populate_mc_reg_table(rdev, boot_ps);
1870 if (ret) 1878 if (ret) {
1879 DRM_ERROR("cypress_populate_mc_reg_table failed\n");
1871 return ret; 1880 return ret;
1881 }
1872 } 1882 }
1873 1883
1874 cypress_program_response_times(rdev); 1884 cypress_program_response_times(rdev);
@@ -1876,9 +1886,10 @@ int cypress_dpm_enable(struct radeon_device *rdev)
1876 r7xx_start_smc(rdev); 1886 r7xx_start_smc(rdev);
1877 1887
1878 ret = cypress_notify_smc_display_change(rdev, false); 1888 ret = cypress_notify_smc_display_change(rdev, false);
1879 if (ret) 1889 if (ret) {
1890 DRM_ERROR("cypress_notify_smc_display_change failed\n");
1880 return ret; 1891 return ret;
1881 1892 }
1882 cypress_enable_sclk_control(rdev, true); 1893 cypress_enable_sclk_control(rdev, true);
1883 1894
1884 if (eg_pi->memory_transition) 1895 if (eg_pi->memory_transition)
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index 649d94979bb2..94007e4826a6 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -3530,8 +3530,10 @@ int ni_dpm_enable(struct radeon_device *rdev)
3530 if (pi->voltage_control) { 3530 if (pi->voltage_control) {
3531 rv770_enable_voltage_control(rdev, true); 3531 rv770_enable_voltage_control(rdev, true);
3532 ret = cypress_construct_voltage_tables(rdev); 3532 ret = cypress_construct_voltage_tables(rdev);
3533 if (ret) 3533 if (ret) {
3534 DRM_ERROR("cypress_construct_voltage_tables failed\n");
3534 return ret; 3535 return ret;
3536 }
3535 } 3537 }
3536 if (eg_pi->dynamic_ac_timing) { 3538 if (eg_pi->dynamic_ac_timing) {
3537 ret = ni_initialize_mc_reg_table(rdev); 3539 ret = ni_initialize_mc_reg_table(rdev);
@@ -3552,42 +3554,64 @@ int ni_dpm_enable(struct radeon_device *rdev)
3552 if (pi->dynamic_pcie_gen2) 3554 if (pi->dynamic_pcie_gen2)
3553 ni_enable_dynamic_pcie_gen2(rdev, true); 3555 ni_enable_dynamic_pcie_gen2(rdev, true);
3554 ret = rv770_upload_firmware(rdev); 3556 ret = rv770_upload_firmware(rdev);
3555 if (ret) 3557 if (ret) {
3558 DRM_ERROR("rv770_upload_firmware failed\n");
3556 return ret; 3559 return ret;
3560 }
3557 ret = ni_process_firmware_header(rdev); 3561 ret = ni_process_firmware_header(rdev);
3558 if (ret) 3562 if (ret) {
3563 DRM_ERROR("ni_process_firmware_header failed\n");
3559 return ret; 3564 return ret;
3565 }
3560 ret = ni_initial_switch_from_arb_f0_to_f1(rdev); 3566 ret = ni_initial_switch_from_arb_f0_to_f1(rdev);
3561 if (ret) 3567 if (ret) {
3568 DRM_ERROR("ni_initial_switch_from_arb_f0_to_f1 failed\n");
3562 return ret; 3569 return ret;
3570 }
3563 ret = ni_init_smc_table(rdev); 3571 ret = ni_init_smc_table(rdev);
3564 if (ret) 3572 if (ret) {
3573 DRM_ERROR("ni_init_smc_table failed\n");
3565 return ret; 3574 return ret;
3575 }
3566 ret = ni_init_smc_spll_table(rdev); 3576 ret = ni_init_smc_spll_table(rdev);
3567 if (ret) 3577 if (ret) {
3578 DRM_ERROR("ni_init_smc_spll_table failed\n");
3568 return ret; 3579 return ret;
3580 }
3569 ret = ni_init_arb_table_index(rdev); 3581 ret = ni_init_arb_table_index(rdev);
3570 if (ret) 3582 if (ret) {
3583 DRM_ERROR("ni_init_arb_table_index failed\n");
3571 return ret; 3584 return ret;
3585 }
3572 if (eg_pi->dynamic_ac_timing) { 3586 if (eg_pi->dynamic_ac_timing) {
3573 ret = ni_populate_mc_reg_table(rdev, boot_ps); 3587 ret = ni_populate_mc_reg_table(rdev, boot_ps);
3574 if (ret) 3588 if (ret) {
3589 DRM_ERROR("ni_populate_mc_reg_table failed\n");
3575 return ret; 3590 return ret;
3591 }
3576 } 3592 }
3577 ret = ni_initialize_smc_cac_tables(rdev); 3593 ret = ni_initialize_smc_cac_tables(rdev);
3578 if (ret) 3594 if (ret) {
3595 DRM_ERROR("ni_initialize_smc_cac_tables failed\n");
3579 return ret; 3596 return ret;
3597 }
3580 ret = ni_initialize_hardware_cac_manager(rdev); 3598 ret = ni_initialize_hardware_cac_manager(rdev);
3581 if (ret) 3599 if (ret) {
3600 DRM_ERROR("ni_initialize_hardware_cac_manager failed\n");
3582 return ret; 3601 return ret;
3602 }
3583 ret = ni_populate_smc_tdp_limits(rdev, boot_ps); 3603 ret = ni_populate_smc_tdp_limits(rdev, boot_ps);
3584 if (ret) 3604 if (ret) {
3605 DRM_ERROR("ni_populate_smc_tdp_limits failed\n");
3585 return ret; 3606 return ret;
3607 }
3586 ni_program_response_times(rdev); 3608 ni_program_response_times(rdev);
3587 r7xx_start_smc(rdev); 3609 r7xx_start_smc(rdev);
3588 ret = cypress_notify_smc_display_change(rdev, false); 3610 ret = cypress_notify_smc_display_change(rdev, false);
3589 if (ret) 3611 if (ret) {
3612 DRM_ERROR("cypress_notify_smc_display_change failed\n");
3590 return ret; 3613 return ret;
3614 }
3591 cypress_enable_sclk_control(rdev, true); 3615 cypress_enable_sclk_control(rdev, true);
3592 if (eg_pi->memory_transition) 3616 if (eg_pi->memory_transition)
3593 cypress_enable_mclk_control(rdev, true); 3617 cypress_enable_mclk_control(rdev, true);
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index 0c9a495aba87..cdf823d9fae6 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -1886,8 +1886,10 @@ int rv770_dpm_enable(struct radeon_device *rdev)
1886 if (pi->voltage_control) { 1886 if (pi->voltage_control) {
1887 rv770_enable_voltage_control(rdev, true); 1887 rv770_enable_voltage_control(rdev, true);
1888 ret = rv770_construct_vddc_table(rdev); 1888 ret = rv770_construct_vddc_table(rdev);
1889 if (ret) 1889 if (ret) {
1890 DRM_ERROR("rv770_construct_vddc_table failed\n");
1890 return ret; 1891 return ret;
1892 }
1891 } 1893 }
1892 1894
1893 if (pi->dcodt) 1895 if (pi->dcodt)
@@ -1895,8 +1897,10 @@ int rv770_dpm_enable(struct radeon_device *rdev)
1895 1897
1896 if (pi->mvdd_control) { 1898 if (pi->mvdd_control) {
1897 ret = rv770_get_mvdd_configuration(rdev); 1899 ret = rv770_get_mvdd_configuration(rdev);
1898 if (ret) 1900 if (ret) {
1901 DRM_ERROR("rv770_get_mvdd_configuration failed\n");
1899 return ret; 1902 return ret;
1903 }
1900 } 1904 }
1901 1905
1902 if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_BACKBIAS) 1906 if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_BACKBIAS)
@@ -1921,12 +1925,15 @@ int rv770_dpm_enable(struct radeon_device *rdev)
1921 rv770_enable_dynamic_pcie_gen2(rdev, true); 1925 rv770_enable_dynamic_pcie_gen2(rdev, true);
1922 1926
1923 ret = rv770_upload_firmware(rdev); 1927 ret = rv770_upload_firmware(rdev);
1924 if (ret) 1928 if (ret) {
1929 DRM_ERROR("rv770_upload_firmware failed\n");
1925 return ret; 1930 return ret;
1926 1931 }
1927 ret = rv770_init_smc_table(rdev, boot_ps); 1932 ret = rv770_init_smc_table(rdev, boot_ps);
1928 if (ret) 1933 if (ret) {
1934 DRM_ERROR("rv770_init_smc_table failed\n");
1929 return ret; 1935 return ret;
1936 }
1930 1937
1931 rv770_program_response_times(rdev); 1938 rv770_program_response_times(rdev);
1932 r7xx_start_smc(rdev); 1939 r7xx_start_smc(rdev);