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 85887C02198 for ; Wed, 12 Feb 2025 17:17:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34A0810E93E; Wed, 12 Feb 2025 17:17:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="It2wo9d6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 259CE10E93E for ; Wed, 12 Feb 2025 17:17:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739380622; x=1770916622; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=B8UnLZM7DIIzahTf+ZuPE5KtvTuM8L5n+4lnHh3b1FE=; b=It2wo9d6vT7/6yvS/DHbTrmOECnRgI564Rit2d1HW7whD7oE78AgRdtX y6QEyLZFvMxbXunXIVB6iytNMjBKmqJ5UdLL+qDdN18J0+mC6yCMnTe16 uuT0IL/m8830HvCBj4HQSjyMfyqhhrWUU4gNK5DFjflzbdEq/SaPFKeS6 qKbyakrupAltRGl1bxJzs8vA9CaVY+3ashBBgriUTBuNX3FiGtXQyc6N8 X1XJAZFJGZ1tPla+hawxU93vIRV530WDrL9DXeRz8n0FEQu/U8NtTq3aP /bYaBfaROWpcYTRTNCb2oQF+pG9zzTOA1JRewlvV1b1RkNPa5uDqkFvZL w==; X-CSE-ConnectionGUID: GHwRh3NUTHCCKuUgS8jOSg== X-CSE-MsgGUID: ArP6V5hYTAycTC3CNIvuMg== X-IronPort-AV: E=McAfee;i="6700,10204,11343"; a="57454528" X-IronPort-AV: E=Sophos;i="6.13,280,1732608000"; d="scan'208";a="57454528" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2025 09:17:02 -0800 X-CSE-ConnectionGUID: 89zqDR9VQquGwWKeFD1Bhg== X-CSE-MsgGUID: oug/z+VvStWfAWGnWZvixQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,280,1732608000"; d="scan'208";a="113088239" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2025 09:17:01 -0800 Date: Wed, 12 Feb 2025 09:17:00 -0800 Message-ID: <857c5v2icz.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: <20250212162610.1432159-1-umesh.nerlige.ramappa@intel.com> References: <20250212162610.1432159-1-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-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 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 > > 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 >