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 50F25CD8CAF for ; Tue, 10 Oct 2023 18:42:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AA3C10E0D3; Tue, 10 Oct 2023 18:42:10 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 005EE10E0D3 for ; Tue, 10 Oct 2023 18:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696963328; x=1728499328; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XpMkQaofZru4hGfMi1e5YOal6PhO/saNHcsmEGj+q7o=; b=GErvEMvhbRTYa2NPR+uZUqL+/2kjrMhVvIv4KjJJpOu6GBfWMLetDMbq EhTTJKHFaIHhopu8agmaHJSq2P5qwGiXs0jWwomsRBH90y8iLJYkLigy8 nWlZtYZ67WJLugIT1sGqk7GkkLKDF772lU7HcZuVhJ3ivrPzhamVZVRaA HbFrpnfwZWurpS+Z+36LV1TrySlR5x+isPLzpJ7wdLl1zTA3A4drZqhnc QSeJHwbSXtJ68J7NpaDnzbpxcgwh2dMi4EGrrKQ0jrL2G22BtjgosziO9 9THaSiN82QEe6abPOznR3SUXyIUiOWgnvxrQZZW/LIfPZHPJu4UcjiCPV w==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="364774284" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="364774284" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 11:41:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="753507755" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="753507755" Received: from josouza-mobl2.bz.intel.com ([10.87.243.88]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 11:41:55 -0700 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= To: intel-xe@lists.freedesktop.org Date: Tue, 10 Oct 2023 11:41:49 -0700 Message-ID: <20231010184151.91195-1-jose.souza@intel.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH v3 1/3] drm/xe: Store xe_he_engine in xe_hw_engine_snapshot 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: Matt Roper , Rodrigo Vivi Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" A future patch will require gt and xe device structs, so here replacing class by hwe. Cc: Rodrigo Vivi Cc: Matt Roper Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/xe/xe_hw_engine.c | 6 +++--- drivers/gpu/drm/xe/xe_hw_engine_types.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c index b5b0845908887..37b3ee1268090 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -684,7 +684,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe) if (snapshot->name) strscpy(snapshot->name, hwe->name, len); - snapshot->class = hwe->class; + snapshot->hwe = hwe; snapshot->logical_instance = hwe->logical_instance; snapshot->forcewake.domain = hwe->domain; snapshot->forcewake.ref = xe_force_wake_ref(gt_to_fw(hwe->gt), @@ -731,7 +731,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe) hw_engine_mmio_read32(hwe, RING_DMA_FADD(0)); snapshot->reg.ipehr = hw_engine_mmio_read32(hwe, RING_IPEHR(0)); - if (snapshot->class == XE_ENGINE_CLASS_COMPUTE) + if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE) snapshot->reg.rcu_mode = xe_mmio_read32(hwe->gt, RCU_MODE); return snapshot; @@ -786,7 +786,7 @@ void xe_hw_engine_snapshot_print(struct xe_hw_engine_snapshot *snapshot, snapshot->reg.ring_dma_fadd_udw, snapshot->reg.ring_dma_fadd); drm_printf(p, "\tIPEHR: 0x%08x\n\n", snapshot->reg.ipehr); - if (snapshot->class == XE_ENGINE_CLASS_COMPUTE) + if (snapshot->hwe->class == XE_ENGINE_CLASS_COMPUTE) drm_printf(p, "\tRCU_MODE: 0x%08x\n", snapshot->reg.rcu_mode); } diff --git a/drivers/gpu/drm/xe/xe_hw_engine_types.h b/drivers/gpu/drm/xe/xe_hw_engine_types.h index 5d4ee29042407..71c0a0169e62a 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine_types.h +++ b/drivers/gpu/drm/xe/xe_hw_engine_types.h @@ -156,8 +156,8 @@ struct xe_hw_engine { struct xe_hw_engine_snapshot { /** @name: name of the hw engine */ char *name; - /** @class: class of this hw engine */ - enum xe_engine_class class; + /** @hwe: hw engine */ + struct xe_hw_engine *hwe; /** @logical_instance: logical instance of this hw engine */ u16 logical_instance; /** @forcewake: Force Wake information snapshot */ -- 2.42.0