[PATCH] drm/amdgpu: stop/resume fb access when gpu reset V3

Deucher, Alexander Alexander.Deucher at amd.com
Wed Jun 29 12:59:31 UTC 2016


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Chunming Zhou
> Sent: Monday, June 27, 2016 10:39 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhou, David(ChunMing)
> Subject: [PATCH] drm/amdgpu: stop/resume fb access when gpu reset V3
> 
> V2: Add wait_for_mc_idle after stopping fb access
> V3:
> 	1. Remove resume fb access since there is no need to
>    	do that for gpu reset.
> 	2. Move stop fb access to amdgpu_gpu_reset function,
> 	since it's the same for all asics.
> 
> Change-Id: I86b5c2b8c78a17ef43ade2a97ef8a33853650be0
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
> Reviewed-by: Christian König <christian.koenig at amd.com> (V1)

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 449cc3e..c04ca4a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2015,6 +2015,13 @@ int amdgpu_gpu_reset(struct amdgpu_device
> *adev)
>  	}
> 
>  retry:
> +	/* Disable fb access */
> +	if (adev->mode_info.num_crtc) {
> +		struct amdgpu_mode_mc_save save;
> +		amdgpu_display_stop_mc_access(adev, &save);
> +		amdgpu_wait_for_idle(adev, AMD_IP_BLOCK_TYPE_GMC);
> +	}
> +
>  	r = amdgpu_asic_reset(adev);
>  	/* post card */
>  	amdgpu_atom_asic_init(adev->mode_info.atom_context);
> --
> 1.9.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