From patchwork Fri Nov 16 14:22:24 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: 1755451 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id BFE16DF230 for ; Fri, 16 Nov 2012 14:37:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F22F43720 for ; Fri, 16 Nov 2012 06:37:45 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EB8B436E9; Fri, 16 Nov 2012 06:23:14 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 16 Nov 2012 06:23:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,265,1352102400"; d="scan'208";a="243294417" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by orsmga002.jf.intel.com with SMTP; 16 Nov 2012 06:23:11 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 16 Nov 2012 16:23:11 +0200 From: ville.syrjala@linux.intel.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 12/13] drm/i915: Add post flush DSL readout for surflive debug Date: Fri, 16 Nov 2012 16:22:24 +0200 Message-Id: <1353075745-30115-13-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1353075745-30115-1-git-send-email-ville.syrjala@linux.intel.com> References: <1353075745-30115-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Cc: intel-gfx@lists.freedesktop.org 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ä Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915_trace.h | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_atomic.c | 4 ++++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index 754a204..fb35edd 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h @@ -16,6 +16,25 @@ /* object tracking */ +TRACE_EVENT(i915_atomic_flush, + TP_PROTO(u32 dsl0, u32 dsl1, u32 dsl2), + TP_ARGS(dsl0, dsl1, dsl2), + + TP_STRUCT__entry( + __field(u32, dsl0) + __field(u32, dsl1) + __field(u32, dsl2) + ), + TP_fast_assign( + __entry->dsl0 = dsl0; + __entry->dsl1 = dsl1; + __entry->dsl2 = dsl2; + ), + + TP_printk("dsl(0)=%u dsl(1)=%u dsl(2)=%u", __entry->dsl0, __entry->dsl1, __entry->dsl2) +); + + TRACE_EVENT(i915_atomic_flip, TP_PROTO(bool sprite, int pipe, int action, u32 commit_surf, u32 commit_surflive, u32 surf, u32 surflive, u32 iir, u32 commit_dsl, u32 dsl, u32 flip_vbl_count, u32 vbl_count), TP_ARGS(sprite, pipe, action, commit_surf, commit_surflive, surf, surflive, iir, commit_dsl, dsl, flip_vbl_count, vbl_count), diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index c6531b0..945ba75 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -1855,6 +1855,10 @@ static void intel_flip_driver_flush(struct drm_flip_driver *driver) /* Flush posted writes */ I915_READ(PIPEDSL(PIPE_A)); +#ifdef SURFLIVE_DEBUG + trace_i915_atomic_flush(I915_READ(PIPEDSL(0)), I915_READ(PIPEDSL(1)), I915_READ(PIPEDSL(2))); +#endif + #ifdef FLIP_TIME_DEBUG tend = ktime_get(); tdiff = ktime_sub(tend, tstart);