From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/3] drm: do not sleep on vblank while holding a mutex Date: Fri, 28 Oct 2011 16:51:49 +0200 Message-ID: <20111028145149.GC2919@phenom.ffwll.local> References: <1319595614-9098-1-git-send-email-ihadzic@research.bell-labs.com> <1319595614-9098-4-git-send-email-ihadzic@research.bell-labs.com> <20111026075401.GD2889@phenom.ffwll.local> <20111027104315.GA2927@phenom.ffwll.local> <1319785144.7162.14.camel@thor.local> <20111028092032.GA2919@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wy0-f177.google.com (mail-wy0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id D12529EBCF for ; Fri, 28 Oct 2011 07:50:56 -0700 (PDT) Received: by wyg8 with SMTP id 8so4937647wyg.36 for ; Fri, 28 Oct 2011 07:50:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Ilija Hadzic Cc: Michel =?iso-8859-1?Q?D=E4nzer?= , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Oct 28, 2011 at 07:10:51AM -0500, Ilija Hadzic wrote: > I'll keep it then and figure out the best mutex/spinlock to use. It > can be anything that exists on one-per-CRTC basis (vblank waits on > different CTCs are not contending). The critical section is from > that switch in which vblwait->request.sequence is incremented until > it is assigned to dev->last_vblank_wait[crtc] (and we are only > protecting that section against itself, executed in contexts of > different PIDs). > > I guess we settled now on this patch (other comments will be > addressed in a different set of patches). If you settle on keeping ->last_vblank_wait I think the easiest is to wrap it with the dev->vbl_lock spinlock everywhere. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48