From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6B01C7EE23 for ; Thu, 1 Jun 2023 04:18:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3341B10E20F; Thu, 1 Jun 2023 04:18:08 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8546510E20F for ; Thu, 1 Jun 2023 04:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685593084; x=1717129084; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=FoITQTxLTFZYtumwZTy8fTBbFYD1HluLHKqU1np9g6Y=; b=libMC8V35yHgMPMw37h0Gnx7F7ko/rUQse0UJ0YtmDqqUB7TEhDa6H2W 8gFs6+w9oXjGYT3fnKdKSdxKkGYt2nKtRyenynuNPW7nF+rjW3+b0yLRL e0aC8XhFBrryaxPtsmXWEXkiydoeLLIdTQqsocdKCFDWIdW7dpIfsCVFg 8otQ0L1DqELZ2gyUP8skiqBymhTreYirZ7x0TFcVTsdh2xddKHfJTkBg7 2khE0myOtJGdwGRWW6No+xDh1Nyk1fIvaPh/iia6ew2xLvwgTtIawm68C Ni5vCuqJKHudh9Q/YeCKsVCUMkO8x+v+FQksyNLqt6LIxCajw6HfF3HGd A==; X-IronPort-AV: E=McAfee;i="6600,9927,10727"; a="421222773" X-IronPort-AV: E=Sophos;i="6.00,209,1681196400"; d="scan'208";a="421222773" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2023 21:18:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10727"; a="831436324" X-IronPort-AV: E=Sophos;i="6.00,209,1681196400"; d="scan'208";a="831436324" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.206.78]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2023 21:18:04 -0700 Date: Wed, 31 May 2023 21:07:37 -0700 Message-ID: <87zg5jvn92.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20230531235634.1309525-3-umesh.nerlige.ramappa@intel.com> References: <20230531235634.1309525-1-umesh.nerlige.ramappa@intel.com> <20230531235634.1309525-3-umesh.nerlige.ramappa@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-gfx] [PATCH 2/3] i915/perf: Do not add ggtt offset to hw_tail X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lionel G Landwerlin , intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 31 May 2023 16:56:33 -0700, Umesh Nerlige Ramappa wrote: > > ggtt offset for hw_tail is not required for the calculations, so drop > it. > > Signed-off-by: Umesh Nerlige Ramappa > --- > drivers/gpu/drm/i915/i915_perf.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c > index 29124dcba8e2..beb1269422ca 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -565,7 +565,7 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream) > partial_report_size %= report_size; > > /* Subtract partial amount off the tail */ > - hw_tail = gtt_offset + OA_TAKEN(hw_tail, partial_report_size); > + hw_tail = OA_TAKEN(hw_tail, partial_report_size); > > > /* NB: The head we observe here might effectively be a little > @@ -575,7 +575,6 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream) > head = stream->oa_buffer.head - gtt_offset; > aged_tail = stream->oa_buffer.tail - gtt_offset; > > - hw_tail -= gtt_offset; Yes gtt_offset addition/subtraction is now redundant after we drop the if-else. Reviewed-by: Ashutosh Dixit > tail = hw_tail; > > /* Walk the stream backward until we find a report with report > -- > 2.36.1 >