From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 09/24] drm/i915: Keep vblank interrupts enabled while enabling/disabling planes Date: Tue, 8 Apr 2014 21:19:00 +0300 Message-ID: <20140408181900.GD18465@intel.com> References: <1394209951-9963-1-git-send-email-ville.syrjala@linux.intel.com> <1394209951-9963-10-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 mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C49E6E499 for ; Tue, 8 Apr 2014 11:25:08 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Paulo Zanoni Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Mon, Apr 07, 2014 at 06:21:08PM -0300, Paulo Zanoni wrote: > 2014-03-07 13:32 GMT-03:00 : > > From: Ville Syrj=E4l=E4 > > > > We may have use for vblank interrupts during plane enabling/disabling, = so > > don't call drm_vblank_off() until planes are off, and call > > drm_vblank_on() just before we start to enable the planes. > = > Just like the previous patch, this one also needs a more precise > description of the reasons and consequences. If this is going to be > needed in the future, it is probably a good idea to briefly describe > why and the use case you are planning. Because if, in the future, we > ever bisect a bug to this patch, and need to revert, we won't know if > the revert breaks some other feature. Yeah I guess I should s/may/will/ and say that it's required for watermark updates. > = > > > > Signed-off-by: Ville Syrj=E4l=E4 > > --- > > drivers/gpu/drm/i915/intel_display.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index 4986887..c028b5c 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -3545,6 +3545,8 @@ static void ilk_crtc_enable_planes(struct drm_crt= c *crtc) > > int pipe =3D intel_crtc->pipe; > > int plane =3D intel_crtc->plane; > > > > + drm_vblank_on(dev, pipe); > > + > > intel_enable_primary_plane(dev_priv, plane, pipe); > > intel_enable_planes(crtc); > > intel_crtc_update_cursor(crtc, true); > > @@ -3555,8 +3557,6 @@ static void ilk_crtc_enable_planes(struct drm_crt= c *crtc) > > mutex_lock(&dev->struct_mutex); > > intel_update_fbc(dev); > > mutex_unlock(&dev->struct_mutex); > > - > > - drm_vblank_on(dev, pipe); > > } > > > > static void ilk_crtc_disable_planes(struct drm_crtc *crtc) > > @@ -3568,7 +3568,6 @@ static void ilk_crtc_disable_planes(struct drm_cr= tc *crtc) > > int plane =3D intel_crtc->plane; > > > > intel_crtc_wait_for_pending_flips(crtc); > > - drm_vblank_off(dev, pipe); > > > > if (dev_priv->fbc.plane =3D=3D plane) > > intel_disable_fbc(dev); > > @@ -3579,6 +3578,8 @@ static void ilk_crtc_disable_planes(struct drm_cr= tc *crtc) > > intel_disable_planes(crtc); > > intel_disable_primary_plane(dev_priv, plane, pipe); > > intel_wait_for_vblank(dev, pipe); > > + > > + drm_vblank_off(dev, pipe); > > } > > > > static void ironlake_crtc_enable(struct drm_crtc *crtc) > > -- > > 1.8.3.2 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > = > = > = > -- = > Paulo Zanoni -- = Ville Syrj=E4l=E4 Intel OTC