[PATCH 2/2] drm/amdgpu: Fix use of interruptible waiting
Michel Dänzer
michel at daenzer.net
Thu Apr 27 07:39:01 UTC 2017
On 27/04/17 04:19 AM, Alex Xie wrote:
> Hi,
>
> I knew this is part of ioctl. And I intended to fix this interruptible
> waiting in an ioctl.
It's by design, nothing that needs fixing in the case of an ioctl.
> 1. The wait is short. There is not much benefit by interruptible
> waiting. The BO is a frame buffer BO. Are there many competitors to
> lock this BO? If not, the wait is very short. This is my main reason to
> change.
Irrelevant. If amdgpu_bo_reserve returns -EINTR, so will other functions
down the line, and amdgpu_crtc_page_flip_target will have to propagate
that anyway. So doing an uninterruptible wait will just delay the
inevitable and delivery of the signal to userspace.
> 2. In this function and caller functions, the error handling for such
> interrupt is complicated and risky.
If you're concerned about the cascade of cleanup functions, let's just
revert commit 0169b52ce575 ("drm/amdgpu: Refactor flip into prepare
submit and submit. (v2)"). amdgpu_crtc_prepare_flip was split out to be
used by DC, but DC is now using a DRM core atomic helper for flips and
no longer using amdgpu_crtc_prepare_flip.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the amd-gfx
mailing list