From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 02/19] drm/i915: Call intel_update_watermarks() in specific place during modeset Date: Fri, 30 Aug 2013 23:49:52 +0300 Message-ID: <20130830204952.GQ11428@intel.com> References: <1377862239-17052-1-git-send-email-ville.syrjala@linux.intel.com> <1377862239-17052-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 E833DE5D2E for ; Fri, 30 Aug 2013 13:49:59 -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: Paulo Zanoni Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Fri, Aug 30, 2013 at 05:26:29PM -0300, Paulo Zanoni wrote: > 2013/8/30 : > > From: Ville Syrj=E4l=E4 > > > > Make the call to intel_update_watermarks() just once or twice during > > modeset. Ideally it should happen independently when each plane gets > > enabled/disabled, but for now it seems better to keep it in central > > place. We can improve things when we get all the planes sorted out > > in a better way. > > > > When enabling set up the watermarks just before the pipe is enabled. > > And when disabling we need to wait until we've marked the crtc as > > inactive. > = > Why do we need to wait until we've marked the CRTC as inactive? > (Daniel/Ville should put the answer in the commit message) Because the watermark compute code looks at intel_crtc->active. If we compute the watermarks before, the code thinks the pipe is active. Hmm. BTW now that I look at intel_crtc_active() I start to wonder why it looks at the clock in the user specified mode. In fact most (maybe all?) of the pre-hsw watermark code is fscked up and it looks at the wrong mode. Sigh. Suppose I need to make a quick for all that as well... -- = Ville Syrj=E4l=E4 Intel OTC