From patchwork Thu May 29 09:40:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sourab.gupta@intel.com X-Patchwork-Id: 4263671 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 828069F1E7 for ; Thu, 29 May 2014 09:39:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C021A20320 for ; Thu, 29 May 2014 09:39:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DCF3D20303 for ; Thu, 29 May 2014 09:39:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 113676E995; Thu, 29 May 2014 02:39:32 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B3B26E275 for ; Thu, 29 May 2014 02:39:30 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 29 May 2014 02:39:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,933,1392192000"; d="scan'208";a="438473362" Received: from sourabgu-desktop.iind.intel.com ([10.223.82.83]) by azsmga001.ch.intel.com with ESMTP; 29 May 2014 02:39:28 -0700 From: sourab.gupta@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 29 May 2014 15:10:14 +0530 Message-Id: <1401356415-13406-3-git-send-email-sourab.gupta@intel.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1401356415-13406-1-git-send-email-sourab.gupta@intel.com> References: <20140528095653.GH18409@nuc-i3427.alporthouse.com> <1401356415-13406-1-git-send-email-sourab.gupta@intel.com> Cc: Deepak S , Akash Goel , Sourab Gupta Subject: [Intel-gfx] [PATCH 2/3] drm/i915: Selection of MMIO vs CS flip at page flip time X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sourab Gupta This patch enables the selection of MMIO flip vs CS flip at page flip time. Earlier, this selection was done only at the init time, so, once .queue_flip was set, it was used forever. This patch enables this selection of flip mechanism at a time when page flips is being issued. Signed-off-by: Sourab Gupta --- drivers/gpu/drm/i915/intel_display.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c75a925..9dda965 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9427,7 +9427,13 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, work->gtt_offset = i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset; - ret = dev_priv->display.queue_flip(dev, crtc, fb, obj, ring, page_flip_flags); + if (intel_use_mmio_flip(dev)) + ret = intel_queue_mmio_flip(dev, crtc, + fb, obj, ring, page_flip_flags); + else + ret = dev_priv->display.queue_flip(dev, crtc, + fb, obj, ring, page_flip_flags); + if (ret) goto cleanup_unpin; @@ -11652,9 +11658,6 @@ static void intel_init_display(struct drm_device *dev) break; } - if (intel_use_mmio_flip(dev)) - dev_priv->display.queue_flip = intel_queue_mmio_flip; - intel_panel_init_backlight_funcs(dev); }