From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58492347BD4; Tue, 11 Nov 2025 01:15:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762823748; cv=none; b=F8TbGywEyvuS9Ed6H9xMdHFKssKTANPVxaV2eFTmoVuAW/NeUzrBvmYnokE4RXbI6WNizDorT/euVdp12ajDo/hDiOg+TToLEksD3l0NyLmtqPm/pJD+ub+fq76/GJD+B+mFfdnmKHmETTsMwV04kuXgZ/L6wi4Nl8i/ifcQGmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762823748; c=relaxed/simple; bh=IyetU7gFlFr1FCVAdNajyGq1LXhW9sdrSB9I/8p/k1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E6VDn4r+XGWZiK0CStPW/HoQzyEnEE7qT9bdCCIZ/I8MuSGEOm4i8UlgUSYc+NycvDNEL7XgPnMPTfO7BtEiAIUHiPjbCCGFgpx3cAANxYzVzUVnPh4ZxMygvSJXCu9IJVOsVSOBZnr2rB/9tgwpfGrOgTuKd+8dLnBC3zCu8mY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CuEf/sQj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CuEf/sQj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFB05C4CEF5; Tue, 11 Nov 2025 01:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762823747; bh=IyetU7gFlFr1FCVAdNajyGq1LXhW9sdrSB9I/8p/k1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CuEf/sQjnRCF1aphwBoFkwCtuvrSgXCeuV1lX1ZBZp2lmVLuDOE7jSoRScgizP0Nv 85ROpY4tSAiOEgxWPFhM48h+lHoeIQODuOjWwssdTvnMScbA0NfmMZ575x1YhO/QgX uvLDrJkpfJPKNwZObRKQHTM9B1BYyPRdmpcHPrNQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Matthew Brost , Raag Jadav , Riana Tauro , Rodrigo Vivi , Sasha Levin Subject: [PATCH 6.17 361/849] drm/xe: Set GT as wedged before sending wedged uevent Date: Tue, 11 Nov 2025 09:38:51 +0900 Message-ID: <20251111004545.145243802@linuxfoundation.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251111004536.460310036@linuxfoundation.org> References: <20251111004536.460310036@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Riana Tauro [ Upstream commit 90fdcf5f89e9288c153923f16a60e6f7da18ba76 ] Userspace should be notified after setting the device as wedged. Re-order function calls to set gt wedged before sending uevent. Cc: Matthew Brost Suggested-by: Raag Jadav Signed-off-by: Riana Tauro Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20250826063419.3022216-4-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin --- drivers/gpu/drm/xe/xe_device.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 1c9907b8a4e9e..d399c2628fa33 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -1157,8 +1157,10 @@ static void xe_device_wedged_fini(struct drm_device *drm, void *arg) * xe_device_declare_wedged - Declare device wedged * @xe: xe device instance * - * This is a final state that can only be cleared with a module + * This is a final state that can only be cleared with the recovery method + * specified in the drm wedged uevent. The default recovery method is * re-probe (unbind + bind). + * * In this state every IOCTL will be blocked so the GT cannot be used. * In general it will be called upon any critical error such as gt reset * failure or guc loading failure. Userspace will be notified of this state @@ -1192,13 +1194,15 @@ void xe_device_declare_wedged(struct xe_device *xe) "IOCTLs and executions are blocked. Only a rebind may clear the failure\n" "Please file a _new_ bug report at https://gitlab.freedesktop.org/drm/xe/kernel/issues/new\n", dev_name(xe->drm.dev)); + } + + for_each_gt(gt, xe, id) + xe_gt_declare_wedged(gt); + if (xe_device_wedged(xe)) { /* Notify userspace of wedged device */ drm_dev_wedged_event(&xe->drm, DRM_WEDGE_RECOVERY_REBIND | DRM_WEDGE_RECOVERY_BUS_RESET, NULL); } - - for_each_gt(gt, xe, id) - xe_gt_declare_wedged(gt); } -- 2.51.0