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 9E5C1D18153 for ; Mon, 14 Oct 2024 21:26:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 553B510E4D5; Mon, 14 Oct 2024 21:26:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="h/fhDutS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1B21510E4D5 for ; Mon, 14 Oct 2024 21:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728941210; x=1760477210; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=tUSfGNQe3OQ0BXfcCnda+0DLZxSVeGX03DZp1WzFMJc=; b=h/fhDutSnbiAMZNo4VdHe3gLMJo6rU99aD1nwvnpt4+IvqtZ/dIhFedS CU6Z5nLtCl8gufRQIcbND5m1y4B3v8FHe8TlYI5ILqluTYB++yoECWQrc q7rCV+bp0Sv9QO1OImDtirqsnmMsG8DjJFqP1Ta2hR2bV4XZtNyy946dS u5RCbJlO6iwMOR+nb7XcO0UY0SIJeFdDifxFQQ9Hg+yONqEVGtkmY/f0j 7W32WCgtmcYPPqHC3vlfUzHuApV8/csMAmM4zJPpIap9AcB940c1eyt3/ +cL0RBzk4Fzt7nRfiE5H+0e8jT2JBKumJh2ubVn/lzafuNUQU7x8Qwvni g==; X-CSE-ConnectionGUID: MLbd2r/OQ2GDT0BgvP2gDQ== X-CSE-MsgGUID: 4RiBXPdyQn2FB96mea8fFQ== X-IronPort-AV: E=McAfee;i="6700,10204,11225"; a="45820092" X-IronPort-AV: E=Sophos;i="6.11,203,1725346800"; d="scan'208";a="45820092" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 14:26:49 -0700 X-CSE-ConnectionGUID: 8uBQVJ0dQQ2OWCATw18tew== X-CSE-MsgGUID: lWEPqaJpTHGCX5YE4+uQMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,203,1725346800"; d="scan'208";a="108471644" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 14:26:49 -0700 Date: Mon, 14 Oct 2024 14:26:49 -0700 Message-ID: <85ldyq2x5y.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Harish Chegondi Cc: , , , , , , Subject: Re: [PATCH v4 1/5] drm/xe/topology: Add a function to find the index of the last DSS in a mask In-Reply-To: References: 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 Sun, 13 Oct 2024 23:00:32 -0700, Harish Chegondi wrote: > > Signed-off-by: Harish Chegondi > --- > drivers/gpu/drm/xe/xe_gt_topology.c | 9 +++++++++ > drivers/gpu/drm/xe/xe_gt_topology.h | 3 +++ > 2 files changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c > index df2042db7ee6..1e7476f71906 100644 > --- a/drivers/gpu/drm/xe/xe_gt_topology.c > +++ b/drivers/gpu/drm/xe/xe_gt_topology.c > @@ -278,6 +278,15 @@ xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum) > return find_next_bit(mask, XE_MAX_DSS_FUSE_BITS, groupnum * groupsize); > } > > +/* > + * Used to obtain the index of the last DSS. > + */ > +unsigned int > +xe_dss_mask_last_dss(const xe_dss_mask_t mask) > +{ > + return find_last_bit(mask, XE_MAX_DSS_FUSE_BITS); Does this need to be exposed from xe_gt_topology.c/.h, can't this just be local to eu stall? > +} > + > bool xe_dss_mask_empty(const xe_dss_mask_t mask) > { > return bitmap_empty(mask, XE_MAX_DSS_FUSE_BITS); > diff --git a/drivers/gpu/drm/xe/xe_gt_topology.h b/drivers/gpu/drm/xe/xe_gt_topology.h > index 746b325bbf6e..7ee022784397 100644 > --- a/drivers/gpu/drm/xe/xe_gt_topology.h > +++ b/drivers/gpu/drm/xe/xe_gt_topology.h > @@ -28,6 +28,9 @@ void xe_gt_topology_dump(struct xe_gt *gt, struct drm_printer *p); > unsigned int > xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum); > > +unsigned int > +xe_dss_mask_last_dss(const xe_dss_mask_t mask); > + > bool xe_dss_mask_empty(const xe_dss_mask_t mask); > > bool > -- > 2.45.1 >