From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 2/2] drm/i915: Wait for pending flips in intel_pipe_set_base() Date: Wed, 31 Oct 2012 20:17:48 +0200 Message-ID: <20121031181748.GI3791@intel.com> References: <1351705121-17627-1-git-send-email-ville.syrjala@linux.intel.com> <1351705121-17627-3-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id EFA71A09B0 for ; Wed, 31 Oct 2012 11:17:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Oct 31, 2012 at 05:43:16PM +0000, Chris Wilson wrote: > On Wed, 31 Oct 2012 19:38:41 +0200, ville.syrjala@linux.intel.com wrote: > > From: Ville Syrj=E4l=E4 > > = > > intel_pipe_set_base() never actually waited for any pending page flips > > on the CRTC. It looks like it tried to, by calling intel_finish_fb() on > > the current front buffer. But the pending flips were actually tracked > > in the BO of the previous front buffer, so the call to intel_finish_fb() > > never did anything useful. > > = > > Now even the pending_flip counter is gone, so we should just > > use intel_crtc_wait_for_pending_flips(), but since we're already holding > > struct_mutex when we would call that function, we need another version > > of it, that itself doesn't lock struct_mutex. > = > That function call is now superfluous as you pointed out in an earlier > review... I think we still need it when we're not doing a full modeset. Without it, intel_pipe_set_base() could overtake the flip. So the call could be moved outside of intel_pipe_set_base() so that it wouldn't be called for the full modeset path. But I suppose it's a bit more efficient to do it after we've pinned the new buffer, so simply moving it might not be the best idea. > But yes, not waking up the pending_flip_queue after a GPU hang is a > recent bug, and could explain the lockup in > https://bugs.freedesktop.org/show_bug.cgi?id=3D56337. OK. I suppose I'll cook up a quick patch for that as well. -- = Ville Syrj=E4l=E4 Intel OTC