[PATCH 1/2] drm/amdgpu: save/restore bios scratch when gpu reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 21.06.2016 um 10:12 schrieb Chunming Zhou:
> Change-Id: If44008e814a2708095c2eb5c1760f331ca260283
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>

For both Reviewed-by: Christian König <christian.koenig at amd.com>.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 66d690e..c2acef9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1948,6 +1948,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
>   	if (amdgpu_device_has_dal_support(adev))
>   		state = drm_atomic_helper_suspend(adev->ddev);
>   
> +	/* save scratch */
> +	amdgpu_atombios_scratch_regs_save(adev);
>   	r = amdgpu_suspend(adev);
>   
>   	for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
> @@ -1972,7 +1974,8 @@ retry:
>   		dev_info(adev->dev, "GPU reset succeeded, trying to resume\n");
>   		r = amdgpu_resume(adev);
>   	}
> -
> +	/* restore scratch */
> +	amdgpu_atombios_scratch_regs_restore(adev);
>   	if (!r) {
>   		for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
>   			struct amdgpu_ring *ring = adev->rings[i];



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux