From: Daniel Vetter Subject: Re: [PATCH] drm/i915: fix wait ioctl with negative timeout Date: Tue, 21 Oct 2014 17:03:29 +0200 Message-ID: <20141021150328.GO26941@phenom.ffwll.local> References: <1413048069-1436-1-git-send-email-olvaffe@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 4994D6E1FB for ; Tue, 21 Oct 2014 08:10:36 -0700 (PDT) Received: by mail-wi0-f173.google.com with SMTP id fb4so10384972wid.6 for ; Tue, 21 Oct 2014 08:10:31 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chia-I Wu Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Oct 13, 2014 at 12:40:48AM +0800, Chia-I Wu wrote: > On Sun, Oct 12, 2014 at 1:21 AM, Chia-I Wu wrote: > > > When timeout_ns is negative, it really means to wait indefinitely instead > > of > > returning immediately. But since userspace can no longer rely on that, I > > am > > not sure if there is any point fixing it. > > > Note that userspace may use GL_TIMEOUT_IGNORED for timeout_ns to wait > indefinitely. The macro is defined to > > #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull > > Prior to 3.17, the kernel would behave as expected. But on 3.17, it would > return immediately with -ETIME if the bo is busy. That sounds like a regression, for which we need a testcase in igt and a special-case in our wait ioctl to make sure that we have an infinite timeout for this input value. Can you please take care of both? I guess we could also restore the bevahiour for negative timeouts, just for the sake of it. Would again need a testcase though. Also note that I've recently refactored the wait ioctl testcase, so adding new subtests should be a lot easier now. Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch