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 007A8C35FF1 for ; Wed, 19 Mar 2025 05:27:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 90E7610E289; Wed, 19 Mar 2025 05:27:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WkNV9lTu"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8630710E289 for ; Wed, 19 Mar 2025 05:27:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742362029; x=1773898029; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=MPx07MuY8Fgl3Ss8/fqJUX2Jv9pIHpGeU17Jqizpn8w=; b=WkNV9lTuWLjcUww4Q/vQivtE6W/t3zugzADDhgDQ8MJgpqp5hfF028UN AYAg1nmQNmkxo7IQyuyZHvcRYw241dwZ6UNnOxJtD/kbXOdKAUdh1umAJ Z5wjfglmT2jgYv14WzBZqumsroKE6516/e5gYR+yMRX/W9MGo/BN2qaeu QXP0BcWpEIlgBBg19VUr+Y2kO9chdE6QuTv3hu/pXK13f11z0+5eG5c+c SR8RU+4K4Z4sfBBUHbtvckPRqFQYs/cLKdyABqHOVXLeM8/dtrpItLTb6 FpHZFvZx6CJuHCiWFxT9fNhNy5vy0v2W/4ryS+VcbmF6bjpmE7w2E/FHb w==; X-CSE-ConnectionGUID: wujBp2+SSF+GejMXLwY50w== X-CSE-MsgGUID: HpgYA1RhQKmD97VgkaKUtg== X-IronPort-AV: E=McAfee;i="6700,10204,11377"; a="54916645" X-IronPort-AV: E=Sophos;i="6.14,258,1736841600"; d="scan'208";a="54916645" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2025 22:27:08 -0700 X-CSE-ConnectionGUID: DgQXjmRpTeu7kmWhqtLvVw== X-CSE-MsgGUID: Pd4n/j7fSuGMNfzF2HMNog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,258,1736841600"; d="scan'208";a="153321429" Received: from nnguyen2-mobl1.amr.corp.intel.com (HELO adixit-MOBL3.intel.com) ([10.125.49.131]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2025 22:27:08 -0700 Date: Tue, 18 Mar 2025 22:27:07 -0700 Message-ID: <87bjtx380k.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Sai Teja Pottumuttu Cc: , Subject: Re: [PATCH i-g-t v2] tests/intel/xe_oa: Keep OA user buffer size dynamic In-Reply-To: <20250319042336.3280115-1-sai.teja.pottumuttu@intel.com> References: <20250319042336.3280115-1-sai.teja.pottumuttu@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/29.4 (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 X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" On Tue, 18 Mar 2025 21:23:36 -0700, Sai Teja Pottumuttu wrote: > > non-zero-reason OA test has a hardcoded user buffer size for > any kernel OA buffer. This makes the test act differently for > different sizes. Thus make the user buffer size to be in line > with the kernel OA buffer being allocated. > > v2: Address operator precedence (Ashutosh) > > Signed-off-by: Sai Teja Pottumuttu > --- > tests/intel/xe_oa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c > index 9bc62c5b9..5c768e4cf 100644 > --- a/tests/intel/xe_oa.c > +++ b/tests/intel/xe_oa.c > @@ -2480,7 +2480,7 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b > .num_properties = ARRAY_SIZE(properties) / 2, > .properties_ptr = to_user_pointer(properties), > }; > - uint32_t buf_size = 3 * 65536 * report_size; > + uint32_t buf_size = 3 * (oa_buffer_size ?: buffer_fill_size); Looks ok. For "non-zero-reason" buf_size is 3 * OA buffer size. For "buffer-size" buf_size can be smaller or larger than 3 * OA buffer size. Reviewed-by: Ashutosh Dixit > uint8_t *buf = malloc(buf_size); > uint32_t total_len = 0; > const uint32_t *last_report; > -- > 2.34.1 >