drm/amdgpu/swsmu: init the baco mutex in early_init
Subsystems (3)
PATCH 1/1 drm/amdgpu/swsmu: init the baco mutex in early_init
GPU reset might get called during init time, before sw_init has been called.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +3 -4
@@ -422,6 +422,9 @@ static int smu_early_init(void *handle) smu->pm_enabled = !!amdgpu_dpm; smu->is_apu = false;mutex_init (&smu->mutex); +mutex_init (&smu->smu_baco.mutex); + smu->smu_baco.state =SMU_BACO_STATE_EXIT ; + smu->smu_baco.platform_support = false;return smu_set_funcs (adev); }
@@ -803,10 +806,6 @@ static int smu_sw_init(void *handle)bitmap_zero (smu->smu_feature.enabled,SMU_FEATURE_MAX );bitmap_zero (smu->smu_feature.allowed,SMU_FEATURE_MAX ); -mutex_init (&smu->smu_baco.mutex); - smu->smu_baco.state =SMU_BACO_STATE_EXIT ; - smu->smu_baco.platform_support = false; -mutex_init (&smu->sensor_lock);mutex_init (&smu->metrics_lock);mutex_init (&smu->message_lock);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by Kevin Wang <[email protected]>
Quoted 42 lines · 在 2020年10月13日,20:15,Alex Deucher <[email protected]> 写道:
GPU reset might get called during init time, before
sw_inithas been called.Signed-off-by Alex Deucher <[email protected]>---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c| 7 +++----1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +3
-4@@ -422,6 +422,9 @@ static int smu_early_init(void *handle) smu->pm_enabled = !!amdgpu_dpm; smu->is_apu = false;mutex_init (&smu->mutex); +mutex_init (&smu->smu_baco.mutex); + smu->smu_baco.state =SMU_BACO_STATE_EXIT ; + smu->smu_baco.platform_support = false;return smu_set_funcs (adev); }@@ -803,10 +806,6 @@ static int smu_sw_init(void *handle)bitmap_zero (smu->smu_feature.enabled,SMU_FEATURE_MAX );bitmap_zero (smu->smu_feature.allowed,SMU_FEATURE_MAX ); -mutex_init (&smu->smu_baco.mutex); - smu->smu_baco.state =SMU_BACO_STATE_EXIT ; - smu->smu_baco.platform_support = false; -mutex_init (&smu->sensor_lock);mutex_init (&smu->metrics_lock);mutex_init (&smu->message_lock);Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx