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 3A2EDE7E631 for ; Tue, 26 Sep 2023 13:03:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1559110E3E3; Tue, 26 Sep 2023 13:03:54 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C10F10E3DB for ; Tue, 26 Sep 2023 13:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695733430; x=1727269430; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XdlEgRCNjelSfraigszr/guFVPn46OPPb3GxWchMp/4=; b=jgAu9G5QXcdEDhJi8GT9leZv5LAeV4LlhP1EOvXkVfdKaCuiNBq9afWy uha/h6YAly2GimYMBoaGtHKpu5m20WuKVjVTTHzIS5YXNUKOO+gIa6fxT CCp8M6apR6hier/PN3VrzWMB7xMiiGghltRFCSyOVov0rfZkUOs9aHMBI FXdRkD1LbcLFrNPxKMdYZh9LpmC7BrQgfGPDzqo2Al0argDC++uz00sC+ QLAuiMdE8awITWTuw6yX2PzfE5MYfdY1J5qGt+XsYvCrggtTg7FH2U5Qn uorNZjLR4XGm2NBLwuPMBiVGuisWxkIYNksw1zhqWWh9sstMqzlCkDOir w==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="366617216" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="366617216" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 05:56:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="139611" Received: from hblancoa-mobl2.ger.corp.intel.com (HELO localhost.localdomain) ([10.252.50.200]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 05:56:19 -0700 From: Francois Dugast To: intel-xe@lists.freedesktop.org Date: Tue, 26 Sep 2023 12:55:27 +0000 Message-Id: <20230926125540.7-18-francois.dugast@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230926125540.7-1-francois.dugast@intel.com> References: <20230926125540.7-1-francois.dugast@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH v3 17/30] drm/xe/uapi: Replace useless 'instance' per unique gt_id 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: Francois Dugast , Rodrigo Vivi Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" From: Rodrigo Vivi Let's have a single GT ID per GT within the PCI Device Card. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost --- drivers/gpu/drm/xe/xe_gt_types.h | 2 +- drivers/gpu/drm/xe/xe_pci.c | 4 ---- drivers/gpu/drm/xe/xe_query.c | 2 +- include/uapi/drm/xe_drm.h | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h index d4310be3e1e7..d3f2793684e2 100644 --- a/drivers/gpu/drm/xe/xe_gt_types.h +++ b/drivers/gpu/drm/xe/xe_gt_types.h @@ -105,7 +105,7 @@ struct xe_gt { struct { /** @type: type of GT */ enum xe_gt_type type; - /** @id: id of GT */ + /** @id: Unique ID of this GT within the PCI Device */ u8 id; /** @clock_freq: clock frequency */ u32 clock_freq; diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index a11163b89a3f..48b46be7e755 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -599,10 +599,6 @@ static int xe_info_init(struct xe_device *xe, return PTR_ERR(tile->primary_gt); gt = tile->primary_gt; - /* - * FIXME: GT numbering scheme may change depending on UAPI - * decisions. - */ gt->info.id = xe->info.gt_count++; gt->info.type = XE_GT_TYPE_MAIN; gt->info.__engine_mask = graphics_desc->hw_engine_mask; diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c index be9affd4f181..fb448e76fb0f 100644 --- a/drivers/gpu/drm/xe/xe_query.c +++ b/drivers/gpu/drm/xe/xe_query.c @@ -379,7 +379,7 @@ static int query_gts(struct xe_device *xe, struct drm_xe_device_query *query) gts->gts[id].type = XE_QUERY_GT_TYPE_REMOTE; else gts->gts[id].type = XE_QUERY_GT_TYPE_MAIN; - gts->gts[id].instance = id; + gts->gts[id].gt_id = gt->info.id; gts->gts[id].clock_freq = gt->info.clock_freq; if (!IS_DGFX(xe)) gts->gts[id].native_mem_regions = 0x1; diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h index 35c0de344253..406a5472199e 100644 --- a/include/uapi/drm/xe_drm.h +++ b/include/uapi/drm/xe_drm.h @@ -351,8 +351,8 @@ struct drm_xe_query_gt { #define XE_QUERY_GT_TYPE_MEDIA 2 /** @type: GT type: Main, Remote, or Media */ __u16 type; - /** @instance: Instance of this GT in the GT list */ - __u16 instance; + /** @gt_id: Unique ID of this GT within the PCI Device */ + __u16 gt_id; /** @clock_freq: A clock frequency for timestamp */ __u32 clock_freq; /** @features: Reserved for future information about GT features */ -- 2.34.1