diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-07-04 03:11:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-07-04 03:11:41 +0000 |
commit | 9f1e6f6191e28d570edbafc3092bc1458f7f2b2f (patch) | |
tree | 3a25c6455a809d809c41c809a5c18f2835fc049c /sys/dev/pci | |
parent | 4c5f102df12a7a3bdb85227f4ebbea7bd934b002 (diff) |
drm/amdgpu: Add support of powerplay for picasso
From Likun Gao
186b073decbf7573971b1786ffeb2fe776d0d9e7 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/amd/powerplay/hwmgr/hwmgr.c | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/powerplay/hwmgr/processpptables.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/amd/powerplay/hwmgr/hwmgr.c b/sys/dev/pci/drm/amd/powerplay/hwmgr/hwmgr.c index 64596029b69..e60c5f501e3 100644 --- a/sys/dev/pci/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/sys/dev/pci/drm/amd/powerplay/hwmgr/hwmgr.c @@ -165,6 +165,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr) case AMDGPU_FAMILY_RV: switch (hwmgr->chip_id) { case CHIP_RAVEN: + case CHIP_PICASSO: hwmgr->od_enabled = false; hwmgr->smumgr_funcs = &smu10_smu_funcs; smu10_init_function_pointers(hwmgr); diff --git a/sys/dev/pci/drm/amd/powerplay/hwmgr/processpptables.c b/sys/dev/pci/drm/amd/powerplay/hwmgr/processpptables.c index 925e17104f9..82e7f588c91 100644 --- a/sys/dev/pci/drm/amd/powerplay/hwmgr/processpptables.c +++ b/sys/dev/pci/drm/amd/powerplay/hwmgr/processpptables.c @@ -832,7 +832,7 @@ static const ATOM_PPLIB_POWERPLAYTABLE *get_powerplay_table( uint16_t size; if (!table_addr) { - if (hwmgr->chip_id == CHIP_RAVEN) { + if (hwmgr->chip_id == CHIP_RAVEN || hwmgr->chip_id == CHIP_PICASSO) { table_addr = &soft_dummy_pp_table[0]; hwmgr->soft_pp_table = &soft_dummy_pp_table[0]; hwmgr->soft_pp_table_size = sizeof(soft_dummy_pp_table); @@ -1054,7 +1054,7 @@ static int init_overdrive_limits(struct pp_hwmgr *hwmgr, hwmgr->platform_descriptor.maxOverdriveVDDC = 0; hwmgr->platform_descriptor.overdriveVDDCStep = 0; - if (hwmgr->chip_id == CHIP_RAVEN) + if (hwmgr->chip_id == CHIP_RAVEN || hwmgr->chip_id == CHIP_PICASSO) return 0; /* We assume here that fw_info is unchanged if this call fails.*/ @@ -1593,7 +1593,7 @@ static int pp_tables_initialize(struct pp_hwmgr *hwmgr) int result; const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table; - if (hwmgr->chip_id == CHIP_RAVEN) + if (hwmgr->chip_id == CHIP_RAVEN || hwmgr->chip_id == CHIP_PICASSO) return 0; hwmgr->need_pp_table_upload = true; @@ -1642,7 +1642,7 @@ static int pp_tables_initialize(struct pp_hwmgr *hwmgr) static int pp_tables_uninitialize(struct pp_hwmgr *hwmgr) { - if (hwmgr->chip_id == CHIP_RAVEN) + if (hwmgr->chip_id == CHIP_RAVEN || hwmgr->chip_id == CHIP_PICASSO) return 0; kfree(hwmgr->dyn_state.vddc_dependency_on_sclk); |