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 9AF2FC27C5E for ; Thu, 6 Jun 2024 09:56:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 48F2510E8B9; Thu, 6 Jun 2024 09:56:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jCNo27so"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85E4010E8B9 for ; Thu, 6 Jun 2024 09:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717667792; x=1749203792; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5LzGRrObPzFU274NlkOiEYhHcBvjQpFJXRRBXrplUFo=; b=jCNo27socsx8TZAK79+YixxEXhhKwuTwopykHvK+oXw4Ty5S5kbDY7Qc 9k+X95cLcXTM26M2jZo9Pi1qB7HA752zNpWTBgR3DmVKkwliGcUlHBFZj MoSXvKbOwhRuYREVdfQyGX4qKk4vcj/TX1eML4yIwi9+pLK+nyB7N18Ny kRwIWQqRq7zoBH713WP76iFpAmjdQFdJRomUgfnWZtuLp1KsmKDMtxjw+ p2xkJk9L6A6DsuvhzzpeDH/PguygCo2VUXSVQ0MxZSAXL2dEFU73VPod3 kuH0xFs8pdV8FIvOW3M/vHyGDekyVRboondbcsAWI2VuTQDkwS/wORB3w w==; X-CSE-ConnectionGUID: 42dE20tLSH+tJLXgfOepYg== X-CSE-MsgGUID: Jy9KZnWNRsuKbq+6ntFqEA== X-IronPort-AV: E=McAfee;i="6600,9927,11094"; a="31823927" X-IronPort-AV: E=Sophos;i="6.08,218,1712646000"; d="scan'208";a="31823927" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 02:56:32 -0700 X-CSE-ConnectionGUID: MUNZJ+ETSfy5r7OQHfQEhA== X-CSE-MsgGUID: 8UK7TQ9AQhWjKhWqbjDVaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,218,1712646000"; d="scan'208";a="42326715" Received: from rtauro-desk.iind.intel.com ([10.190.238.50]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 02:56:30 -0700 From: Riana Tauro To: intel-xe@lists.freedesktop.org Cc: riana.tauro@intel.com, anshuman.gupta@intel.com, rodrigo.vivi@intel.com, vinay.belgaumkar@intel.com Subject: [PATCH v3 2/2] drm/xe: move disable_c6 call Date: Thu, 6 Jun 2024 15:38:42 +0530 Message-Id: <20240606100842.956072-3-riana.tauro@intel.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20240606100842.956072-1-riana.tauro@intel.com> References: <20240606100842.956072-1-riana.tauro@intel.com> MIME-Version: 1.0 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" disable c6 called in guc_pc_fini_hw is unreachable. GuC PC init returns earlier if skip_guc_pc is true and never registers the finish call thus making disable_c6 unreachable. move this call to gt idle. v2: rebase v3: add fixes tag (Himal) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_gt_idle.c | 6 ++++++ drivers/gpu/drm/xe/xe_guc_pc.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c index a6ab8bb4571d..5d6181117ab2 100644 --- a/drivers/gpu/drm/xe/xe_gt_idle.c +++ b/drivers/gpu/drm/xe/xe_gt_idle.c @@ -197,6 +197,12 @@ static void gt_idle_fini(void *arg) xe_gt_idle_disable_pg(gt); + if (gt_to_xe(gt)->info.skip_guc_pc) { + XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT)); + xe_gt_idle_disable_c6(gt); + xe_force_wake_put(gt_to_fw(gt), XE_FW_GT); + } + sysfs_remove_files(kobj, gt_idle_attrs); kobject_put(kobj); } diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 8187dfb2ad6c..508f0d39b4ad 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -897,11 +897,6 @@ static void xe_guc_pc_fini_hw(void *arg) struct xe_guc_pc *pc = arg; struct xe_device *xe = pc_to_xe(pc); - if (xe->info.skip_guc_pc) { - xe_gt_idle_disable_c6(pc_to_gt(pc)); - return; - } - if (xe_device_wedged(xe)) return; -- 2.40.0