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 13EB0CD1296 for ; Fri, 5 Apr 2024 18:23:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A8AF110E42E; Fri, 5 Apr 2024 18:23:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kTCwB80R"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id E599410E42E for ; Fri, 5 Apr 2024 18:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712341414; x=1743877414; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=P4z5uR+BWs1Rj+dORoorAnph+CyKU0D6wDwARaOm/lQ=; b=kTCwB80RASMGYnvujd3Tn/IEAe3LK1Xb8u4rWwRP+Z3wnE7gKY6Dz4SM W5sAG5sjqwm8eqts07HNOrXFJmovV5CAIO1wFh2fzrm1wGbO7s0BapKU6 txmyPcfOHj1WtdXE7tQBsES9MXuT41CaoZkljKsJxCmSoEg1XJxszLnxr I1llXxQEbNsAGD0eKj1TLoJBQpUEzD/MnOmsH/VGRTHWoaUa4Yki2l14P HWZZaJCngBmdJiTJCX4vN9pj9XnAocM0nc5XlkwY8c0l5+BmPAgKE+Rwu I5j8U1icNbW+mp3Q91AgLF4x8dNKeBLTv1VqU++F923yD3Q8JOyMySm28 A==; X-CSE-ConnectionGUID: rQwtDTfbRX2MoxRwLfuRWQ== X-CSE-MsgGUID: RrUpFYaVQd6AhP+MWsJKSA== X-IronPort-AV: E=McAfee;i="6600,9927,11035"; a="25125209" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="25125209" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 11:23:34 -0700 X-CSE-ConnectionGUID: ZwiMOaIySX+mupz/4OMNfg== X-CSE-MsgGUID: vxhj73wjTPa7QrYaupwYbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="19356617" Received: from josouza-mobl2.bz.intel.com ([10.87.243.88]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 11:23:31 -0700 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= To: intel-xe@lists.freedesktop.org Cc: Rodrigo Vivi , Matt Roper , Zhanjun Dong , =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Subject: [PATCH v6 1/3] drm/xe: Store xe_he_engine in xe_hw_engine_snapshot Date: Fri, 5 Apr 2024 11:23:24 -0700 Message-ID: <20240405182326.72157-1-jose.souza@intel.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" A future patch will require gt and xe device structs, so here replacing class by hwe. Cc: Rodrigo Vivi Cc: Matt Roper Cc: Zhanjun Dong 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 a688bb2d96ce3..669753f0a9c50 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -795,7 +795,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe) return NULL; snapshot->name = kstrdup(hwe->name, GFP_ATOMIC); - 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), @@ -846,7 +846,7 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe) snapshot->reg.ring_eir = hw_engine_mmio_read32(hwe, RING_EIR(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; @@ -891,7 +891,7 @@ void xe_hw_engine_snapshot_print(struct xe_hw_engine_snapshot *snapshot, drm_printf(p, "\tBBADDR: 0x%016llx\n", snapshot->reg.ring_bbaddr); drm_printf(p, "\tDMA_FADDR: 0x%016llx\n", snapshot->reg.ring_dma_fadd); drm_printf(p, "\tIPEHR: 0x%08x\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 d7f828c76cc5f..27deaa31efd31 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine_types.h +++ b/drivers/gpu/drm/xe/xe_hw_engine_types.h @@ -158,8 +158,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.44.0