From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758578AbcILNc1 (ORCPT ); Mon, 12 Sep 2016 09:32:27 -0400 Received: from mga02.intel.com ([134.134.136.20]:60427 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756086AbcILNcY (ORCPT ); Mon, 12 Sep 2016 09:32:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,322,1470726000"; d="scan'208";a="7825859" Subject: Re: [PATCH v3] drm/fence: allow fence waiting to be interrupted by userspace To: Gustavo Padovan , dri-devel@lists.freedesktop.org References: <1472143678-1277-1-git-send-email-gustavo@padovan.org> Cc: linux-kernel@vger.kernel.org, Daniel Stone , Daniel Vetter , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Gustavo Padovan From: Maarten Lankhorst Message-ID: <00eca2cc-3a1b-19a4-8376-cd95851f892c@linux.intel.com> Date: Mon, 12 Sep 2016 15:32:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472143678-1277-1-git-send-email-gustavo@padovan.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Op 25-08-16 om 18:47 schreef Gustavo Padovan: > From: Gustavo Padovan > > If userspace is running an synchronously atomic commit and interrupts the > atomic operation during fence_wait() it will hang until the timer expires, > so here we change the wait to be interruptible so it stop immediately when > userspace wants to quit. > > Also adds the necessary error checking for fence_wait(). > > v2: Comment by Daniel Vetter > - Add error checking for fence_wait() > > v3: Rebase on top of new atomic noblocking support > > v4: Comment by Maarten Lankhorst > - remove 'swapped' bitfield as it was duplicating information > > v5: Comments by Maarten Lankhorst > - assign plane->state to plane_state if !intr > - squash previous patch into this one > > Signed-off-by: Gustavo Padovan Reviewed-by: Maarten Lankhorst