From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915/dp: Flush any outstanding work to turn the VDD off Date: Mon, 16 Apr 2012 22:01:42 +0100 Message-ID: <1334610116_9592@CP5-2952> References: <1334585913-9831-1-git-send-email-chris@chris-wilson.co.uk> <20120416203951.GH4199@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id F00A09F675 for ; Mon, 16 Apr 2012 14:02:01 -0700 (PDT) In-Reply-To: <20120416203951.GH4199@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, 16 Apr 2012 22:39:51 +0200, Daniel Vetter wrote: > On Mon, Apr 16, 2012 at 03:18:33PM +0100, Chris Wilson wrote: > > As we may kick off a delayed workqueue task to switch of the VDD lines, we > > need to complete that task prior to turning off the panel (which itself > > depends upon VDD being off). > > > > Signed-off-by: Chris Wilson > > Cc: Keith Packard > > I've looked a bit at this and I think we just need a call to > ironlake_panel_vdd_off_sync instead of the WARN. The work will do the > right thing when the vdd is already off, so no problem there. The WARN is valid and did help to document the design of the code. Good point about the cancel_sync taking the mutex again, oops, and indeed all we need here is just the call to sync. As far as I can see, the timer will expire gracefully under normal conditions with the only cancel_sync being during shutdown, so serialisation of the tasklet under mode_config looks robust. -Chris -- Chris Wilson, Intel Open Source Technology Centre