[PATCH] drm/amd/amdgpu: disable GFXOFF around debugfs access to MMIO

Alex Deucher alexdeucher at gmail.com
Wed Feb 19 15:07:43 UTC 2020


On Wed, Feb 19, 2020 at 10:04 AM Tom St Denis <tom.stdenis at amd.com> wrote:
>
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>

Please add a patch description.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 7379910790c9..66f763300c96 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -169,6 +169,7 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
>         if (pm_pg_lock)
>                 mutex_lock(&adev->pm.mutex);
>
> +       amdgpu_gfx_off_ctrl(adev, false);
>         while (size) {
>                 uint32_t value;
>
> @@ -192,6 +193,8 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
>         }
>
>  end:
> +       amdgpu_gfx_off_ctrl(adev, true);
> +
>         if (use_bank) {
>                 amdgpu_gfx_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
>                 mutex_unlock(&adev->grbm_idx_mutex);
> --
> 2.24.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list