diff options
author | Dave Airlie <airlied@redhat.com> | 2017-05-11 23:58:29 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-05-11 23:58:29 -0400 |
commit | 7ec27233e62b5efe795563896577de5340dc7473 (patch) | |
tree | 7cf654cf27518d5e0b1a7718ad454fa3a5d45af8 /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | |
parent | bab1e2fe4b82a853076e6752a49a456244110f8b (diff) | |
parent | afa31879f0a62f769cdeeffc8cfec613da2bc482 (diff) |
Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-next
Fixes for 4.12. This is a bit bigger than usual since it's 3 weeks
worth of fixes and most of these changes are for vega10 which is
new for 4.12 and still in a fair amount of flux. It looks like
you missed my last pull request, so those patches are included here
as well. Highlights:
- Lots of vega10 fixes
- Fix interruptable wait mixup
- Fan control method fixes
- Misc display fixes for radeon and amdgpu
- Misc bug fixes
* 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux: (132 commits)
drm/amd/powerplay: refine pwm1_enable callback functions for CI.
drm/amd/powerplay: refine pwm1_enable callback functions for vi.
drm/amd/powerplay: refine pwm1_enable callback functions for Vega10.
drm/amdgpu: refine amdgpu pwm1_enable sysfs interface.
drm/amdgpu: add amd fan ctrl mode enums.
drm/amd/powerplay: add more smu message on Vega10.
drm/amdgpu: fix dependency issue
drm/amd: fix init order of sched job
drm/amdgpu: add some additional vega10 pci ids
drm/amdgpu/soc15: use atomfirmware for setting bios scratch for reset
drm/amdgpu/atomfirmware: add function to update engine hang status
drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty
drm/amdgpu: fix mutex list null pointer reference
drm/amd/powerplay: fix bug sclk/mclk level can't be set on vega10.
drm/amd/powerplay: Setup sw CTF to allow graceful exit when temperature exceeds maximum.
drm/amd/powerplay: delete dead code in powerplay.
drm/amdgpu: Use less generic enum definitions
drm/amdgpu/gfx9: derive tile pipes from golden settings
drm/amdgpu/gfx: drop max_gs_waves_per_vgt
drm/amd/powerplay: disable engine spread spectrum feature on Vega10.
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c index 4b9abd68e04f..4bdda56fccee 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "atomfirmware.h" | 26 | #include "atomfirmware.h" |
27 | #include "amdgpu_atomfirmware.h" | 27 | #include "amdgpu_atomfirmware.h" |
28 | #include "atom.h" | 28 | #include "atom.h" |
29 | #include "atombios.h" | ||
29 | 30 | ||
30 | #define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t)) | 31 | #define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t)) |
31 | 32 | ||
@@ -77,10 +78,29 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev) | |||
77 | { | 78 | { |
78 | int i; | 79 | int i; |
79 | 80 | ||
81 | /* | ||
82 | * VBIOS will check ASIC_INIT_COMPLETE bit to decide if | ||
83 | * execute ASIC_Init posting via driver | ||
84 | */ | ||
85 | adev->bios_scratch[7] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; | ||
86 | |||
80 | for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) | 87 | for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) |
81 | WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); | 88 | WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); |
82 | } | 89 | } |
83 | 90 | ||
91 | void amdgpu_atomfirmware_scratch_regs_engine_hung(struct amdgpu_device *adev, | ||
92 | bool hung) | ||
93 | { | ||
94 | u32 tmp = RREG32(adev->bios_scratch_reg_offset + 3); | ||
95 | |||
96 | if (hung) | ||
97 | tmp |= ATOM_S3_ASIC_GUI_ENGINE_HUNG; | ||
98 | else | ||
99 | tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG; | ||
100 | |||
101 | WREG32(adev->bios_scratch_reg_offset + 3, tmp); | ||
102 | } | ||
103 | |||
84 | int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev) | 104 | int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev) |
85 | { | 105 | { |
86 | struct atom_context *ctx = adev->mode_info.atom_context; | 106 | struct atom_context *ctx = adev->mode_info.atom_context; |