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 4BD66CD8CA8 for ; Fri, 12 Jun 2026 08:10:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C8CA10F318; Fri, 12 Jun 2026 08:10:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="FlHf4ZcE"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C8AB10F318; Fri, 12 Jun 2026 08:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781251854; x=1812787854; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j2HndnUF15cqQQ18C2h0dS7otYN5RsQPXveV9Kn14co=; b=FlHf4ZcEbNsztoPCjW688pKyfe1iTL6D8cXBLJz0ZosNYfyMl9D3QvqQ X98L2dSHmEeBGUc3K4eUt16ru5/hcXd2Ze5S3b+14WyiwUwm9gtX6kK2b eOvXpNMaYmLlng+Y/LH4su7vaKqEB2l4+essJFSMToteiBH/47KgPc3ED TKGNOObj6tiGMIXYFIiLyJoH5KszG1aPT4iVdQRmDc642Y2jypD12cfZN dmp5e19Z2StRlYugbNzvhM1HR15KAKipOSIjRSYcx96haTViHW309K9Vg bEyrLZ2A+GSzGbxtndKEnQLkRjhsGRHhteFsyLSiVPVxogn5X6N4BK9Kx w==; X-CSE-ConnectionGUID: Q9z/wLQGRuuSSy1XQ2mWzA== X-CSE-MsgGUID: uT/cyitITFa84PUaf7AHQg== X-IronPort-AV: E=McAfee;i="6800,10657,11813"; a="85921393" X-IronPort-AV: E=Sophos;i="6.24,200,1774335600"; d="scan'208";a="85921393" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2026 01:10:54 -0700 X-CSE-ConnectionGUID: 1T/298BhR6ehm3l6v4JDkg== X-CSE-MsgGUID: VNPa8RxqSqGNV4+amg3DuA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,200,1774335600"; d="scan'208";a="245667176" Received: from jraag-z790m-itx-wifi.iind.intel.com ([10.190.239.23]) by orviesa006.jf.intel.com with ESMTP; 12 Jun 2026 01:10:49 -0700 From: Mallesh Koujalagi To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, rodrigo.vivi@intel.com Cc: andrealmeid@igalia.com, christian.koenig@amd.com, airlied@gmail.com, simona.vetter@ffwll.ch, mripard@kernel.org, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, anshuman.gupta@intel.com, badal.nilawar@intel.com, riana.tauro@intel.com, karthik.poosa@intel.com, sk.anirban@intel.com, raag.jadav@intel.com, Mallesh Koujalagi Subject: [PATCH v8 2/6] drm: Add DRM_WEDGE_RECOVERY_COLD_RESET recovery method Date: Fri, 12 Jun 2026 13:37:25 +0530 Message-ID: <20260612080722.26726-10-mallesh.koujalagi@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260612080722.26726-8-mallesh.koujalagi@intel.com> References: <20260612080722.26726-8-mallesh.koujalagi@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" Introduce DRM_WEDGE_RECOVERY_COLD_RESET (BIT(4)) recovery method to handle scenarios requiring device power cycle. This method addresses cases where other recovery mechanisms (driver reload, PCIe reset, etc.) are insufficient to restore device functionality. When set, it indicates to userspace that only device power cycle can recover the device from its current error state. Signed-off-by: Mallesh Koujalagi Reviewed-by: Raag Jadav --- v3: - Update any scenario that requires cold-reset. (Riana) v4: - Rename cold reset to power cycle. (Raag) v5: - Make it consistent with consumer expectations. (Raag) v6: - Drop "last resort" wording. (Riana) --- drivers/gpu/drm/drm_drv.c | 2 ++ include/drm/drm_device.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 1ff0bf7cba6a..94abe7a811a5 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -537,6 +537,8 @@ static const char *drm_get_wedge_recovery(unsigned int opt) return "bus-reset"; case DRM_WEDGE_RECOVERY_VENDOR: return "vendor-specific"; + case DRM_WEDGE_RECOVERY_COLD_RESET: + return "cold-reset"; default: return NULL; } diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index 768a8dae83c5..75f030d027ee 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h @@ -37,6 +37,7 @@ struct pci_controller; #define DRM_WEDGE_RECOVERY_REBIND BIT(1) /* unbind + bind driver */ #define DRM_WEDGE_RECOVERY_BUS_RESET BIT(2) /* unbind + reset bus device + bind */ #define DRM_WEDGE_RECOVERY_VENDOR BIT(3) /* vendor specific recovery method */ +#define DRM_WEDGE_RECOVERY_COLD_RESET BIT(4) /* remove device + slot power cycle + rescan */ /** * struct drm_wedge_task_info - information about the guilty task of a wedge dev -- 2.34.1