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 E633FCD4F24 for ; Tue, 12 May 2026 13:29:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52CF510EAD3; Tue, 12 May 2026 13:29:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ni+SbWF9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4080B10EAD3; Tue, 12 May 2026 13:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778592577; x=1810128577; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6D+dKOa53Byfyt6yEqp2mNLPYEl8SohBtVtbdlg+Dgo=; b=ni+SbWF9u+ip2cSHZojGzW0a4U/CLXRKHdS7sjzhwJ1QzUiImnYVVPE3 Uj2PrzRCaBfcJt53Pk9ZumMNtPkZL6FXd/v8A/YOhWII1OtZOpqErAEyF cQ1wA2z6k7cDWgaXYwbck3qzARPFfwFaIFIB9NW6qBn4/Tln7r63Ds9yd PFvTqTvoTyb3q0sarx5wDnph1Evk0y5zqA78JIBrD8Sg1rYXV3VMDF/Xp 2OpqOQyT6SB0W/vXHft9HBcNfJJxBBnoTw2YTZHRKVn86NPu9FRSkm/1Y BCaEmBWTIRxHd11aoarNW1n5XL53Zebou3D404+IpFmAoy5GhSbE7mvjV Q==; X-CSE-ConnectionGUID: 2z3fOIVoSzGjez4BU//O/A== X-CSE-MsgGUID: vWUTwXhLQb2fZ8tLz8tlCg== X-IronPort-AV: E=McAfee;i="6800,10657,11783"; a="102164679" X-IronPort-AV: E=Sophos;i="6.23,231,1770624000"; d="scan'208";a="102164679" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 06:29:37 -0700 X-CSE-ConnectionGUID: odvMW7dfRqWyvkvyLrJWXw== X-CSE-MsgGUID: tQf8AmwrRKSrPDsiLlBYOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,231,1770624000"; d="scan'208";a="237855874" Received: from jraag-z790m-itx-wifi.iind.intel.com ([10.190.239.23]) by orviesa009.jf.intel.com with ESMTP; 12 May 2026 06:29:33 -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 v5 2/5] drm: Add DRM_WEDGE_RECOVERY_COLD_RESET recovery method Date: Tue, 12 May 2026 18:56:17 +0530 Message-ID: <20260512132614.1793083-9-mallesh.koujalagi@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260512132614.1793083-7-mallesh.koujalagi@intel.com> References: <20260512132614.1793083-7-mallesh.koujalagi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. The cold reset method serves as a last resort when all other recovery options have been exhausted. Signed-off-by: Mallesh Koujalagi --- v3: - Update any scenario that requires cold-reset. (Riana) v4: - Rename cold reset to power cyclce. (Raag) v5: - Make it consistent with consumer expectations. (Raag) --- 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 985c283cf59f..8c0236e2e6a6 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -535,6 +535,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 bc78fb77cc27..d41f26f4dd45 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