From patchwork Fri Feb 5 01:45:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 77272 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o151jDuj032724 for ; Fri, 5 Feb 2010 01:45:49 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EACA9E793; Thu, 4 Feb 2010 17:45:13 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fmsmga101.fm.intel.com (mga05.intel.com [192.55.52.89]) by gabe.freedesktop.org (Postfix) with ESMTP id C2E039E756 for ; Thu, 4 Feb 2010 17:45:11 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 04 Feb 2010 17:43:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,408,1262592000"; d="asc'?scan'208";a="537937428" Received: from zhen-devel.sh.intel.com (HELO zhen-devel) ([10.239.13.159]) by fmsmga002.fm.intel.com with ESMTP; 04 Feb 2010 17:44:42 -0800 Date: Fri, 5 Feb 2010 09:45:09 +0800 From: Zhenyu Wang To: Jesse Barnes Message-ID: <20100205014509.GB32470@zhen-devel.sh.intel.com> Mail-Followup-To: Jesse Barnes , Chris Wilson , intel-gfx@lists.freedesktop.org References: <20100126144005.23d1b4cf@jbarnes-piketon> <89k304$hjdgg5@orsmga001.jf.intel.com> <20100127084407.2433abb6@jbarnes-piketon> MIME-Version: 1.0 In-Reply-To: <20100127084407.2433abb6@jbarnes-piketon> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: untangle page flip completion X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: Zhenyu Wang List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 05 Feb 2010 01:45:49 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 50ddf4a..eabdb85 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -310,19 +310,17 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev) ironlake_opregion_gse_intr(dev); if (de_iir & DE_PLANEA_FLIP_DONE) - intel_prepare_page_flip(dev, 0); + intel_finish_page_flip(dev, 0); if (de_iir & DE_PLANEB_FLIP_DONE) - intel_prepare_page_flip(dev, 1); + intel_finish_page_flip(dev, 1); if (de_iir & DE_PIPEA_VBLANK) { drm_handle_vblank(dev, 0); - intel_finish_page_flip(dev, 0); } if (de_iir & DE_PIPEB_VBLANK) { drm_handle_vblank(dev, 1); - intel_finish_page_flip(dev, 1); } /* check event from PCH */ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0cf764a..26ea815 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4208,6 +4208,13 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, /* Reference the old fb object for the scheduled work. */ drm_gem_object_reference(work->obj); + /* On Ironlake, page flip irq is for 'done' event, so try to + make page flip prepare here, and will handle finish job after + receive page flip done irq. + */ + if (IS_IRONLAKE(dev)) + intel_prepare_page_flip(dev, intel_crtc->plane); + crtc->fb = fb; i915_gem_object_flush_write_domain(obj); drm_vblank_get(dev, intel_crtc->pipe);