drm/amd/display: Don't print error when bo_pin is interrupted
Subsystems (3)
PATCH v2 1/1 drm/amd/display: Don't print error when bo_pin is interrupted
v2: Also don't print for ERESTARTSYS or EAGAIN
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
@@ -2944,7 +2944,8 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,amdgpu_bo_unreserve (rbo);if (unlikely (r !=0 )) { -DRM_ERROR ("Failed to pin framebuffer\n" ); +if (!(r == -EINTR || r == -ERESTARTSYS || r ==EAGAIN )) +DRM_ERROR ("Failed to pin framebuffer with error %d\n" , r);return r; }
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20171026200801.14662-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
Andrey Grodzovsky
Reviewed-byQuoted 3 lines · Harry Wentland
v2: Also don't print for ERESTARTSYS or EAGAIN
Signed-off-by Harry Wentland <[email protected]>
Thanks,
Andrey
Quoted 9 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int dm_plane_helper_prepare_fb(struct drm_plane *plane, · line 2951
Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-1@@ -2944,7 +2944,8 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,amdgpu_bo_unreserve (rbo);if (unlikely (r !=0 )) { -DRM_ERROR ("Failed to pin framebuffer\n" ); +if (!(r == -EINTR || r == -ERESTARTSYS || r ==EAGAIN )) +DRM_ERROR ("Failed to pin framebuffer with error %d\n" , r);return r; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): ff616ee9-0e16-5278-1169-b75b61db6141-5C7GfCeVMHo@public.gmane.org
Hi Harry,
actually it's best practice that you only ignore ERESTARTSYS here, see other code in the driver as well.
EINTR means that the IOCTL was interrupted and can't be restarted because of some problem.
EAGAIN mean the we can't do this operation right now, but might be able to do it at some point in the future.
Both sound like a good idea to note to the user.
Regards,
Christian.
Am 26.10.2017 um 22:16 schrieb Andrey Grodzovsky:
Quoted 24 lines · Harry Wentland
Quoted 3 lines
v2: Also don't print for ERESTARTSYS or EAGAIN
Signed-off-by Harry Wentland<[email protected]>Reviewed-by Andrey Grodzovsky<[email protected]>Thanks,
AndreyQuoted 11 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0@@ -2944,7 +2944,8 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,amdgpu_bo_unreserve (rbo);
Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int dm_plane_helper_prepare_fb(struct drm_plane *plane, · line 2951
Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-1if (unlikely (r !=0 )) { -DRM_ERROR ("Failed to pin framebuffer\n" ); +if (!(r == -EINTR || r == -ERESTARTSYS || r ==EAGAIN )) +DRM_ERROR ("Failed to pin framebuffer with error %d\n" , r);return r; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 28547400-b0f2-d3b0-2f9d-14749a479257-5C7GfCeVMHo@public.gmane.org
Hi Christian,
thanks for clarifying the semantics. I wasn't fully clear on that. What you say makes sense. I'll respin the patch.
Harry
Quoted 6 lines · Christian König
Hi Harry,
actually it's best practice that you only ignore ERESTARTSYS here, see other code in the driver as well.
EINTR means that the IOCTL was interrupted and can't be restarted because of some problem.
Quoted 41 lines
EAGAIN mean the we can't do this operation right now, but might be able to do it at some point in the future.
Both sound like a good idea to note to the user.
Regards,
Christian.Am 26.10.2017 um 22:16 schrieb Andrey Grodzovsky:
Quoted 32 lines · Harry Wentland
Quoted 3 lines
v2: Also don't print for ERESTARTSYS or EAGAIN
Signed-off-by Harry Wentland <[email protected]>Reviewed-by Andrey Grodzovsky <[email protected]>Thanks,
AndreyQuoted 18 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-1@@ -2944,7 +2944,8 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,amdgpu_bo_unreserve (rbo);if (unlikely (r !=0 )) { -DRM_ERROR ("Failed to pin framebuffer\n" ); +if (!(r == -EINTR || r == -ERESTARTSYS || r ==EAGAIN )) +DRM_ERROR ("Failed to pin framebuffer with error %d\n" , r);return r; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx