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 89BB1C4725D for ; Sat, 20 Jan 2024 02:44:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32D5710EAF5; Sat, 20 Jan 2024 02:44:43 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC9BC10EAF5 for ; Sat, 20 Jan 2024 02:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705718681; x=1737254681; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=2YFKNgz/xLJB4KKfYGjcKAPsMbGW1MTC7fAjUqnYEPY=; b=fUp/LJNNO69ZLyyYgr20aILdHgWt48rC6tsWj8SgaHm1OslvvMce9cv7 NmjnG38lgoRsDyv6HDbuhlcVW/PpkyqfYzYz8VSHQva/NkNgDfxs9nRAQ UQmSq9Luhgx4N3UqOoKG3nwAyY76QFT5zuCkeVUCtYUzT1A9naOmKs7j7 noAT1TWS2P6rsKTp1DMY2kuET3Xwr4x795yRbW6LCIuKxe+pSCnfD+3EX uEuC7DDSJVJ6/Z/zs64yGfMlzkML1+kBvJZbfqWIAOEmPrlcK2xr5s/kn H9zgEC4d0nGKpJeqjIOygE1HkT8LdEUNSPqzhl0K8sVHd6v3K4hM6LzJq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10957"; a="465174666" X-IronPort-AV: E=Sophos;i="6.05,206,1701158400"; d="scan'208";a="465174666" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2024 18:44:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,206,1701158400"; d="scan'208";a="827830" Received: from orsosgc001.jf.intel.com (HELO unerlige-ril.intel.com) ([10.165.21.138]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2024 18:44:42 -0800 Date: Fri, 19 Jan 2024 18:44:41 -0800 Message-ID: <8534usd8py.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Subject: Re: [PATCH 06/17] drm/xe/oa/uapi: Add/remove OA config perf ops In-Reply-To: References: <20231208064329.2387604-1-ashutosh.dixit@intel.com> <20231208064329.2387604-7-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: , Cc: intel-xe@lists.freedesktop.org Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Tue, 19 Dec 2023 11:10:22 -0800, Umesh Nerlige Ramappa wrote: > Hi Umesh, > > +static bool xe_oa_reg_in_range_table(u32 addr, const struct xe_mmio_range *table) > > +{ > > + while (table->start || table->end) { > > nit: why not start && end? I would expect both start and end defined for a > range. Done (it was carry over from i915). Note that the plan here is to clean up these checks (remove separate mux/flex/b_c counter register checks) eventually, as discussed in a previous review. I am tracking this task but haven't got round to it yet. We can do this cleanup later since it doesn't affect uapi. > > + /* Config id 0 is invalid, id 1 for kernel stored test config */ > > kernel doesn't store a test config anymore, so the comment can be > updated. You can start with 1 below though, but that's up to you. > > > + oa_config->id = idr_alloc(&oa->metrics_idr, oa_config, 2, 0, GFP_KERNEL); > > + if (oa_config->id < 0) { > > + drm_dbg(&oa->xe->drm, "Failed to create sysfs entry for OA config\n"); > > + err = oa_config->id; > > + goto sysfs_err; > > + } Done, dropped comment and starting with 1 now. > minor nits above, otherwise lgtm, > > Reviewed-by: Umesh Nerlige Ramappa Thanks. -- Ashutosh