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 6FA52E7717F for ; Fri, 13 Dec 2024 17:19:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AD9910E26D; Fri, 13 Dec 2024 17:19:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="I8KpkA4V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9F2410E26D for ; Fri, 13 Dec 2024 17:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734110371; x=1765646371; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=thhdDO4VqBY0uzMK86OQZn5/39TlPMODDINcn15J+VY=; b=I8KpkA4VhXCiTKZ3Hnk5vAEYNYj/JVUJH1WjDub/mcXGXoK0/oZVpEJ8 DJaKeBxS7Y+8FIbAzfiQ8Q4RnFxK7iy9wMPTWYRgBTyna9eH1lXcp+yVw D/WrTZzslvhKzEsrpAvu7MMPOeHjCyM2ATwmTMZISYqkOxw4UPI/5HuGu 0HQqsClQAbBDZLnbUra76fYgaU/WQfcLvMhCBLwhz98W0PEBd5IH+8806 zTR4kSyR0lfqw04BMe7YJTC1ZqKieJgncQxEkD4IGWAlyHDgRQ/8ILI7X QiC3kdcjssYl9x0/NTZ9EN8lqlWJuHM889Sxiz3fZtt8FFW2FtcMl843O Q==; X-CSE-ConnectionGUID: rFx11MsBR5GstqPtrBrAqA== X-CSE-MsgGUID: ibPepMHbSmSYkIa1/CW1Ag== X-IronPort-AV: E=McAfee;i="6700,10204,11285"; a="34471794" X-IronPort-AV: E=Sophos;i="6.12,231,1728975600"; d="scan'208";a="34471794" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2024 09:19:30 -0800 X-CSE-ConnectionGUID: VcSy+k+1SEGa5VsrR5kRAg== X-CSE-MsgGUID: zFI/xWXfTdKa1f9qUNyPxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,231,1728975600"; d="scan'208";a="96493599" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2024 09:19:30 -0800 Date: Fri, 13 Dec 2024 09:19:30 -0800 Message-ID: <85bjxf33h9.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: "Cavitt, Jonathan" Cc: "intel-xe@lists.freedesktop.org" , "Nerlige Ramappa, Umesh" Subject: Re: [PATCH] drm/xe/oa/uapi: Expose an unblock after N reports OA property In-Reply-To: References: <20241212224903.1853862-1-ashutosh.dixit@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-redhat-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: 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 Thu, 12 Dec 2024 14:59:35 -0800, Cavitt, Jonathan wrote: > > > diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c > > index d2a816f71bf26..226b234d07110 100644 > > --- a/drivers/gpu/drm/xe/xe_query.c > > +++ b/drivers/gpu/drm/xe/xe_query.c > > @@ -672,7 +672,7 @@ static int query_oa_units(struct xe_device *xe, > > du->oa_unit_type = u->type; > > du->oa_timestamp_freq = xe_oa_timestamp_frequency(gt); > > du->capabilities = DRM_XE_OA_CAPS_BASE | DRM_XE_OA_CAPS_SYNCS | > > - DRM_XE_OA_CAPS_OA_BUFFER_SIZE; > > + DRM_XE_OA_CAPS_OA_BUFFER_SIZE | DRM_XE_OA_CAPS_WAIT_NUM_REPORTS; > > This should probably be kept inline: > """ > du->capabilities = DRM_XE_OA_CAPS_BASE | DRM_XE_OA_CAPS_SYNCS | > DRM_XE_OA_CAPS_OA_BUFFER_SIZE | > DRM_XE_OA_CAPS_WAIT_NUM_REPORTS; > """ > But otherwise: > Reviewed-by: Jonathan Cavitt Thanks, sure I will make this change. Also the MDAPI UMD PR for this kernel change is: https://github.com/intel/metrics-discovery/pull/32 Thanks. -- Ashutosh > > j = 0; > > for_each_hw_engine(hwe, gt, hwe_id) { > > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h > > index 0383b52cbd869..f62689ca861a4 100644 > > --- a/include/uapi/drm/xe_drm.h > > +++ b/include/uapi/drm/xe_drm.h > > @@ -1487,6 +1487,7 @@ struct drm_xe_oa_unit { > > #define DRM_XE_OA_CAPS_BASE (1 << 0) > > #define DRM_XE_OA_CAPS_SYNCS (1 << 1) > > #define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2) > > +#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3) > > > > /** @oa_timestamp_freq: OA timestamp freq */ > > __u64 oa_timestamp_freq; > > @@ -1660,6 +1661,12 @@ enum drm_xe_oa_property_id { > > * buffer is allocated by default. > > */ > > DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE, > > + > > + /** > > + * @DRM_XE_OA_PROPERTY_WAIT_NUM_REPORTS: Number of reports to wait > > + * for before unblocking poll or read > > + */ > > + DRM_XE_OA_PROPERTY_WAIT_NUM_REPORTS, > > }; > > > > /** > > -- > > 2.47.1 > > > >