[PATCH 1/3] drm/amdgpu: fix indent
Deucher, Alexander
Alexander.Deucher at amd.com
Fri Apr 21 16:07:38 UTC 2017
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Roger.He
> Sent: Friday, April 21, 2017 3:07 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhou, David(ChunMing); He, Hongbo
> Subject: [PATCH 1/3] drm/amdgpu: fix indent
>
> Change-Id: I3a81680648fbaca74662c85709c864fa3a4a75bd
> Signed-off-by: Roger.He <Hongbo.He at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 34 +++++++++++++++--
> -------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index a09ad3cf..3d8f227 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2476,25 +2476,25 @@ static int
> amdgpu_recover_vram_from_shadow(struct amdgpu_device *adev,
> uint32_t domain;
> int r;
>
> - if (!bo->shadow)
> - return 0;
> -
> - r = amdgpu_bo_reserve(bo, false);
> - if (r)
> - return r;
> - domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type);
> - /* if bo has been evicted, then no need to recover */
> - if (domain == AMDGPU_GEM_DOMAIN_VRAM) {
> - r = amdgpu_bo_restore_from_shadow(adev, ring, bo,
> + if (!bo->shadow)
> + return 0;
> +
> + r = amdgpu_bo_reserve(bo, false);
> + if (r)
> + return r;
> + domain = amdgpu_mem_type_to_domain(bo-
> >tbo.mem.mem_type);
> + /* if bo has been evicted, then no need to recover */
> + if (domain == AMDGPU_GEM_DOMAIN_VRAM) {
> + r = amdgpu_bo_restore_from_shadow(adev, ring, bo,
> NULL, fence, true);
> - if (r) {
> - DRM_ERROR("recover page table failed!\n");
> - goto err;
> - }
> - }
> + if (r) {
> + DRM_ERROR("recover page table failed!\n");
> + goto err;
> + }
> + }
> err:
> - amdgpu_bo_unreserve(bo);
> - return r;
> + amdgpu_bo_unreserve(bo);
> + return r;
> }
>
> /**
> --
> 2.7.4
>
> _______________________________________________
> 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