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 E5A33C02198 for ; Wed, 12 Feb 2025 17:44:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC82110E945; Wed, 12 Feb 2025 17:44:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hiTXedPb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3185110E945 for ; Wed, 12 Feb 2025 17:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739382271; x=1770918271; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=nFAJFB7YtQsv3EDNxdx5ct9QKD8x0fIGRF4JSp6Yx/Y=; b=hiTXedPbyZUS1hy2SsrLv6yXoZIpm8VGhwx7iP1EKKqXzi6RIzbP6iDC 4SqI7yFwzhmtXM2PmmBZyrnMvaKCFGMn6jfHS9iJ3+m8i9HrTrPjl1/i1 PT18n4tQojCl8ncg9Kp4KmtaUrsgOmpULvSnwoVSmnJt1AP4ymyEOstzN a9Gz6WWqTH8DLktpg2Y4OyMaoUdrf1D/VokYbz7PwVYo30Qaohwx3k8Qo ff2ijEXgQchjcWWVGin6kLHUJPG2N9kY+mi1cGIZqJ3bgErV2Lo8+Lfro RHPHyjtEKBOmLMo/wt+/NoJGynID4maRp50p/Zi7U+iWCxqBizROq/60a w==; X-CSE-ConnectionGUID: 7qukrtTeSguI3+ixUnO43g== X-CSE-MsgGUID: SwFWZMJGQt6KWKDMYu7mhg== X-IronPort-AV: E=McAfee;i="6700,10204,11343"; a="27649629" X-IronPort-AV: E=Sophos;i="6.13,280,1732608000"; d="scan'208";a="27649629" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2025 09:44:31 -0800 X-CSE-ConnectionGUID: cf1S2+EPR46xywi8Wc9XLA== X-CSE-MsgGUID: S/ahjD84S9CO4FK+Zw9g8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="136157248" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2025 09:44:30 -0800 Date: Wed, 12 Feb 2025 09:44:30 -0800 Message-ID: <855xlf2h35.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Cc: Subject: Re: [PATCH v2] drm/xe/oa: Allow oa_exponent value of 0 In-Reply-To: <857c5v2icz.wl-ashutosh.dixit@intel.com> References: <20250212162610.1432159-1-umesh.nerlige.ramappa@intel.com> <857c5v2icz.wl-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 Wed, 12 Feb 2025 09:17:00 -0800, Dixit, Ashutosh wrote: > > On Wed, 12 Feb 2025 08:26:10 -0800, Umesh Nerlige Ramappa wrote: > > > > OA exponent value of 0 is a valid value for periodic reports. Allow user > > to pass 0 for the OA sampling interval since it gets converted to 2 gt > > clock ticks. > > > > v2: Update the check in xe_oa_stream_init as well (Ashutosh) > > Reviewed-by: Ashutosh Dixit Sorry, maybe add a Fixes tag to this before you merge. > > > > Signed-off-by: Umesh Nerlige Ramappa > > --- > > drivers/gpu/drm/xe/xe_oa.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c > > index a692dffcb638..9c95ad742f7d 100644 > > --- a/drivers/gpu/drm/xe/xe_oa.c > > +++ b/drivers/gpu/drm/xe/xe_oa.c > > @@ -1690,7 +1690,7 @@ static int xe_oa_stream_init(struct xe_oa_stream *stream, > > stream->oa_buffer.format = &stream->oa->oa_formats[param->oa_format]; > > > > stream->sample = param->sample; > > - stream->periodic = param->period_exponent > 0; > > + stream->periodic = param->period_exponent >= 0; > > stream->period_exponent = param->period_exponent; > > stream->no_preempt = param->no_preempt; > > stream->wait_num_reports = param->wait_num_reports; > > @@ -2025,7 +2025,7 @@ int xe_oa_stream_open_ioctl(struct drm_device *dev, u64 data, struct drm_file *f > > goto err_exec_q; > > } > > > > - if (param.period_exponent > 0) { > > + if (param.period_exponent >= 0) { > > u64 oa_period, oa_freq_hz; > > > > /* Requesting samples from OAG buffer is a privileged operation */ > > -- > > 2.34.1 > >