drm/amdgpu: Switch error code when bo pin fails. (v3)
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Sun, 18 Dec 2016 21:16:53 +0000 (16:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 16:13:31 +0000 (11:13 -0500)
Switching to -ENOMEM resolves a hang in case the driver
uses this function in atomic code path.

v2: Update commit message.
v3:
Remove forcing -EINVAL in case of amdgpu_bo_pin fail
since there is no apparent reason for not just passing
through the the return value.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

index 48a3f677feca9dfae9caace09f144042e72832d8..4986340326e29c3072efc4e066f7947777baf823 100644 (file)
@@ -189,7 +189,6 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
 
        r = amdgpu_bo_pin(new_abo, AMDGPU_GEM_DOMAIN_VRAM, &base);
        if (unlikely(r != 0)) {
-               r = -EINVAL;
                DRM_ERROR("failed to pin new abo buffer before flip\n");
                goto unreserve;
        }