From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 802663E0090 for ; Fri, 15 May 2026 16:09:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778861367; cv=none; b=Cd3Pt0b/AfbAYhTrvflocpfbcRUK64pn8Xqo608fpFhXrKhlSzK62CLAbwphEBtfpiNdwDnzj651xGcLDXh0hlCmhxEEDg0z92wEcfGKQw4QZ+yWXobrmL6L6tfXdGeqvo1GWZ90nY9PMuCqgZVdjFr72ooB/NrF9BcwH1JxqXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778861367; c=relaxed/simple; bh=/qwfmphsvoMYhGUVfe4Y35OnOwPvpkGV3OVuXBLUD48=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k1CcNaCFkS8yXEPS67a8dK4rqqUKIeNHvWCx05tRvRJLD1md9afNNU0f0BF0ymj/X9pzzXXL4QYIG3V9/dBnY5CwvOs7iiTL+87T/vn48BzxSJAtOhikxAHMXJJ2z6ac0S5/ZpTckAuc39xkyCXp3+F95ckzapyFTbN/B0FyNQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EUS4j/wi; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EUS4j/wi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778861367; x=1810397367; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/qwfmphsvoMYhGUVfe4Y35OnOwPvpkGV3OVuXBLUD48=; b=EUS4j/wiVygLyIMW8XOD7Loo/sE7B21R1nCFlPGpsgJ5yTG00UXpn3uJ tAFnjNAuU9vN9ziK5Tobgg2szy2hGKqLfukYJ+kQDOwj8m2pYwEUZm1i3 8wia8jiLP1kGaFtbBDmcUcXtNgnN2CfcslQM+8Rg++Yl9JBlITVEEWpj1 4L0d0Ea/ixRyk9xJ2w4n94FxzrTH89wpbAiU+8WYV6a0m2+jxLPg5xNI+ mSTwzMNtJkSPH9Uu9Uq89bP5bLNKpJh9m/NhgOXvimNyC7mZ5i0393Fpr cIJAlorGrgBPTM/TtfmZqDYA+Zko4LFcAhhVZRINsY0s3fBfdRvaJibsb w==; X-CSE-ConnectionGUID: OKp5voomQzSI68+hDpEuZA== X-CSE-MsgGUID: 8qtq7pyoQ9G/t9iX0g0v6w== X-IronPort-AV: E=McAfee;i="6800,10657,11787"; a="79783064" X-IronPort-AV: E=Sophos;i="6.23,236,1770624000"; d="scan'208";a="79783064" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2026 09:09:26 -0700 X-CSE-ConnectionGUID: HHwsv6PwShGo2GoWEIuBTA== X-CSE-MsgGUID: aCDb2Ul7SeaA8eYakYAP2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,236,1770624000"; d="scan'208";a="237737079" Received: from pgcooper-mobl3.ger.corp.intel.com (HELO localhost) ([10.245.245.71]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2026 09:09:24 -0700 From: Jani Nikula To: intel-xe@lists.freedesktop.org Cc: jani.nikula@intel.com, stable@vger.kernel.org Subject: [PATCH] drm/xe/display: fix oops in suspend/shutdown without display Date: Fri, 15 May 2026 19:09:20 +0300 Message-ID: <20260515160920.1082842-1-jani.nikula@intel.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland Content-Transfer-Encoding: 8bit The xe driver keeps track of whether to probe display, and whether display hardware is there, using xe->info.probe_display. It gets set to false if there's no display after intel_display_device_probe(). However, the display may also be disabled via fuses, detected at a later time in intel_display_device_info_runtime_init(). In this case, the xe driver does for_each_intel_crtc() on uninitialized mode config in xe_display_flush_cleanup_work(), leading to a NULL pointer dereference, and generally calls display code with display info cleared. Check for intel_display_device_present() after intel_display_device_info_runtime_init(), and reset xe->info.probe_display as necessary. Also do unset_display_features() for completeness, although display runtime init has already done that. This will need to be unified across all cases later. Move intel_display_device_info_runtime_init() call slightly earlier, similar to i915, to avoid a bunch of unnecessary setup for no display cases. Note #1: The xe driver has no business doing low level display plumbing like for_each_intel_crtc() to begin with. It all needs to happen in display code. Note #2: The actual bug is present already in commit 44e694958b95 ("drm/xe/display: Implement display support"), but the oops was likely introduced later at commit ddf6492e0e50 ("drm/xe/display: Make display suspend/resume work on discrete"). Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7904 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/6150 Cc: # v6.8+ Signed-off-by: Jani Nikula --- drivers/gpu/drm/xe/display/xe_display.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 053abd6f6514..5f25932730f4 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -104,6 +104,15 @@ int xe_display_init_early(struct xe_device *xe) intel_display_driver_early_probe(display); + intel_display_device_info_runtime_init(display); + + /* Display may have been disabled at runtime init */ + if (!intel_display_device_present(display)) { + xe->info.probe_display = false; + unset_display_features(xe); + return 0; + } + /* Early display init.. */ intel_opregion_setup(display); @@ -117,8 +126,6 @@ int xe_display_init_early(struct xe_device *xe) intel_bw_init_hw(display); - intel_display_device_info_runtime_init(display); - err = intel_display_driver_probe_noirq(display); if (err) goto err_opregion; -- 2.47.3