Commit 7afefb81 authored by Andrey Grodzovsky's avatar Andrey Grodzovsky

drm/amdgpu: Rename flag which prevents HW access

Make it's name not feature but function descriptive.
Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-1-andrey.grodzovsky@amd.com
parent 4a791cb6
...@@ -1078,7 +1078,7 @@ struct amdgpu_device { ...@@ -1078,7 +1078,7 @@ struct amdgpu_device {
uint32_t ras_hw_enabled; uint32_t ras_hw_enabled;
uint32_t ras_enabled; uint32_t ras_enabled;
bool in_pci_err_recovery; bool no_hw_access;
struct pci_saved_state *pci_state; struct pci_saved_state *pci_state;
struct amdgpu_reset_control *reset_cntl; struct amdgpu_reset_control *reset_cntl;
......
...@@ -341,7 +341,7 @@ void amdgpu_device_vram_access(struct amdgpu_device *adev, loff_t pos, ...@@ -341,7 +341,7 @@ void amdgpu_device_vram_access(struct amdgpu_device *adev, loff_t pos,
/* Check if hw access should be skipped because of hotplug or device error */ /* Check if hw access should be skipped because of hotplug or device error */
bool amdgpu_device_skip_hw_access(struct amdgpu_device *adev) bool amdgpu_device_skip_hw_access(struct amdgpu_device *adev)
{ {
if (adev->in_pci_err_recovery) if (adev->no_hw_access)
return true; return true;
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
...@@ -5350,9 +5350,9 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev) ...@@ -5350,9 +5350,9 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev)
set_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags); set_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
set_bit(AMDGPU_SKIP_HW_RESET, &reset_context.flags); set_bit(AMDGPU_SKIP_HW_RESET, &reset_context.flags);
adev->in_pci_err_recovery = true; adev->no_hw_access = true;
r = amdgpu_device_pre_asic_reset(adev, &reset_context); r = amdgpu_device_pre_asic_reset(adev, &reset_context);
adev->in_pci_err_recovery = false; adev->no_hw_access = false;
if (r) if (r)
goto out; goto out;
......
...@@ -234,7 +234,7 @@ int psp_wait_for(struct psp_context *psp, uint32_t reg_index, ...@@ -234,7 +234,7 @@ int psp_wait_for(struct psp_context *psp, uint32_t reg_index,
int i; int i;
struct amdgpu_device *adev = psp->adev; struct amdgpu_device *adev = psp->adev;
if (psp->adev->in_pci_err_recovery) if (psp->adev->no_hw_access)
return 0; return 0;
for (i = 0; i < adev->usec_timeout; i++) { for (i = 0; i < adev->usec_timeout; i++) {
...@@ -263,7 +263,7 @@ psp_cmd_submit_buf(struct psp_context *psp, ...@@ -263,7 +263,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
bool ras_intr = false; bool ras_intr = false;
bool skip_unsupport = false; bool skip_unsupport = false;
if (psp->adev->in_pci_err_recovery) if (psp->adev->no_hw_access)
return 0; return 0;
if (!drm_dev_enter(&psp->adev->ddev, &idx)) if (!drm_dev_enter(&psp->adev->ddev, &idx))
......
...@@ -7396,7 +7396,7 @@ static int gfx_v10_0_hw_fini(void *handle) ...@@ -7396,7 +7396,7 @@ static int gfx_v10_0_hw_fini(void *handle)
amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0); amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
if (!adev->in_pci_err_recovery) { if (!adev->no_hw_access) {
#ifndef BRING_UP_DEBUG #ifndef BRING_UP_DEBUG
if (amdgpu_async_gfx_ring) { if (amdgpu_async_gfx_ring) {
r = gfx_v10_0_kiq_disable_kgq(adev); r = gfx_v10_0_kiq_disable_kgq(adev);
......
...@@ -126,7 +126,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, ...@@ -126,7 +126,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
struct amdgpu_device *adev = smu->adev; struct amdgpu_device *adev = smu->adev;
int ret = 0, index = 0; int ret = 0, index = 0;
if (smu->adev->in_pci_err_recovery) if (smu->adev->no_hw_access)
return 0; return 0;
index = smu_cmn_to_asic_specific_index(smu, index = smu_cmn_to_asic_specific_index(smu,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment