From patchwork Mon Nov 12 17:33:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 1729561 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 39B993FCDE for ; Mon, 12 Nov 2012 17:53:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2880E9F36E for ; Mon, 12 Nov 2012 09:53:26 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 90EFE9F042 for ; Mon, 12 Nov 2012 09:34:14 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 12 Nov 2012 09:34:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,764,1344236400"; d="scan'208";a="216582496" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by azsmga001.ch.intel.com with SMTP; 12 Nov 2012 09:34:11 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 12 Nov 2012 19:34:11 +0200 From: ville.syrjala@linux.intel.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 22/22] drm/i915: Add debug print for flip queue length Date: Mon, 12 Nov 2012 19:33:00 +0200 Message-Id: <1352741580-12141-23-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1352741580-12141-1-git-send-email-ville.syrjala@linux.intel.com> References: <1352741580-12141-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Ville Syrjälä Print some information on how many flips are in the queue waiting for the GPU. There's no limit on the queue length currently. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_atomic.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 87f5cba..5c089b2 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -892,6 +892,7 @@ typedef struct drm_i915_private { struct work_struct work; struct workqueue_struct *wq; unsigned int next_flip_seq; + unsigned int queue_len; } flip; } drm_i915_private_t; diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index d3aa566..d7cc978 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -2106,6 +2106,7 @@ static void intel_atomic_postpone_flip(struct drm_device *dev, intel_flip->busy = ring != NULL; list_move_tail(&intel_flip->base.list, &dev_priv->flip.list); + dev_priv->flip.queue_len++; if (!ring) return; @@ -2186,6 +2187,7 @@ static void intel_atomic_process_flips_work(struct work_struct *work) if (intel_flip->flip_seq != flip_seq) break; list_move_tail(&intel_flip->base.list, &flips); + dev_priv->flip.queue_len--; } } @@ -2197,6 +2199,8 @@ static void intel_atomic_process_flips_work(struct work_struct *work) mutex_lock(&dev->mode_config.mutex); intel_atomic_schedule_flips(dev_priv, intel_crtc, &flips); mutex_unlock(&dev->mode_config.mutex); + + DRM_DEBUG_KMS("flip queue length = %u\n", dev_priv->flip.queue_len); } }