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 4A006C5DF94 for ; Mon, 24 Aug 2026 15:39:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 09CC210E7EC; Mon, 24 Aug 2026 15:39:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WGfOK36V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC9D910E558 for ; Mon, 24 Aug 2026 15:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1787585954; x=1819121954; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version:content-transfer-encoding; bh=OJ3qOFc6MAndY7wnSVhRrtzUEJizXWWsnkVIdz7Qff4=; b=WGfOK36V8VuvW+sp4YayKUQQSV0B3ze5FQjw9BjcNTurpsQqSrkwQULe VxFQsLU4pefFIgtlHN4YIeUX/ziwEI2VjC86Ls64cmzwG6LhafcTgkX4f VHYsK3Aw0wNGU7+fH3/9FcYN7LKVByPcl2eJm6hvzGI/yPqs+q28k0Bby DRwgImGSGB96F2ZUYxTfx4rBq5PWLvZOpTBVk5btBjhmTX4+MRti7TgXu LMUFsgqJfAkBO/js7hDod7lw0ZEUL/6YiZTLoKYWT+DkzXgmXHJlctk4I /Z9AHAHRBL53XmJvgcDTkncH5fxLKCp4q7ENSpJFLacWUITZ8zulSa8v1 A==; X-CSE-ConnectionGUID: HLt62P1dQ62TfPFASA/Zlg== X-CSE-MsgGUID: +ve+pjPFRCG4wro8ImqdWA== X-IronPort-AV: E=McAfee;i="6800,10657,11885"; a="87807860" X-IronPort-AV: E=Sophos;i="6.25,240,1779174000"; d="scan'208";a="87807860" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2026 08:39:13 -0700 X-CSE-ConnectionGUID: nmlpinCiQJG9qt+TensRog== X-CSE-MsgGUID: ZTSyhCIQTlO9JSADb5JjpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,240,1779174000"; d="scan'208";a="305255252" Received: from kjfische-mobl2.amr.corp.intel.com (HELO adixit-MOBL3.intel.com) ([10.125.69.157]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2026 08:39:14 -0700 Date: Mon, 24 Aug 2026 08:39:12 -0700 Message-ID: <87ecfnh6jj.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Cc: Subject: Re: [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report In-Reply-To: <20260821222338.1053887-7-umesh.nerlige.ramappa@intel.com> References: <20260821222338.1053887-5-umesh.nerlige.ramappa@intel.com> <20260821222338.1053887-7-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/30.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=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Fri, 21 Aug 2026 15:23:41 -0700, Umesh Nerlige Ramappa wrote: > > @@ -260,7 +224,7 @@ static bool mert_wa_14026633728(struct xe_oa_stream *= s) > static bool xe_oa_buffer_check_unlocked(struct xe_oa_stream *stream) > { > u32 gtt_offset =3D xe_bo_ggtt_addr(stream->oa_buffer.bo); > - u32 tail, hw_tail, partial_report_size, available; > + u32 hw_tail, partial_report_size, available; > int report_size =3D stream->oa_buffer.format->size; > unsigned long flags; > > @@ -280,29 +244,7 @@ static bool xe_oa_buffer_check_unlocked(struct xe_oa= _stream *stream) > /* Subtract partial amount off the tail */ > hw_tail =3D xe_oa_circ_diff(stream, hw_tail, partial_report_size); > > - tail =3D hw_tail; > - > - /* > - * Walk the stream backward until we find a report with report id and t= imestamp > - * not 0. We can't tell whether a report has fully landed in memory bef= ore the > - * report id and timestamp of the following report have landed. > - * > - * This is assuming that the writes of the OA unit land in memory in th= e order > - * they were written. If not : (=E2=95=AF=C2=B0=E2=96=A1=C2=B0=EF=BC= =89=E2=95=AF=EF=B8=B5 =E2=94=BB=E2=94=81=E2=94=BB > - */ > - while (xe_oa_circ_diff(stream, tail, stream->oa_buffer.tail) >=3D repor= t_size) { > - if (oa_report_id(stream, tail) || oa_timestamp(stream, tail)) > - break; > - > - tail =3D xe_oa_circ_diff(stream, tail, report_size); > - } > - > - if (xe_oa_circ_diff(stream, hw_tail, tail) > report_size) > - drm_dbg(&stream->oa->xe->drm, > - "unlanded report(s) head=3D0x%x tail=3D0x%x hw_tail=3D0x%x\n", > - stream->oa_buffer.head, tail, hw_tail); > - > - stream->oa_buffer.tail =3D tail; > + stream->oa_buffer.tail =3D hw_tail; This line is added here and then is modified in Patch 3. So maybe we should not add this line here, just add the line in Patch 3? And just delete line in this patch? So this patch will only contain code deletion. Also take care of the issue reported by sashiko: - [Low] The macro `oa_report_header_64bit` is left defined but is completel= y unused after its only callers were removed. Apart from these nits, this is: Reviewed-by: Ashutosh Dixit