Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation

During fbdev probe, the xe driver allocates and pins a framebuffer
BO (via xe_bo_create_pin_map_novm() → xe_ggtt_insert_bo()).

Without a runtime PM reference, xe_pm_runtime_get_noresume() warns about
missing outer PM protection as below:

xe 0000:03:00.0: [drm] Missing outer runtime PM protection

Acquire a runtime PM reference before framebuffer allocation to ensure
xe_ggtt_insert_bo() executes under active runtime PM context.

Changes in v2:
- Update commit message to add Fixes tag (Jani Nikula)

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6350
Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20251111135403.3415947-1-dibin.moolakadan.subrahmanian@intel.com
(cherry picked from commit 37fc7b7b3ab0e3bb900657199cd3770a4fda03fb)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

authored by

Dibin Moolakadan Subrahmanian and committed by
Jani Nikula
460b3172 c7685d11

+7 -4
+7 -4
drivers/gpu/drm/i915/display/intel_fbdev.c
··· 288 288 drm_framebuffer_put(&fb->base); 289 289 fb = NULL; 290 290 } 291 + 292 + wakeref = intel_display_rpm_get(display); 293 + 291 294 if (!fb || drm_WARN_ON(display->drm, !intel_fb_bo(&fb->base))) { 292 295 drm_dbg_kms(display->drm, 293 296 "no BIOS fb, allocating a new one\n"); 294 297 295 298 fb = __intel_fbdev_fb_alloc(display, sizes); 296 - if (IS_ERR(fb)) 297 - return PTR_ERR(fb); 299 + if (IS_ERR(fb)) { 300 + ret = PTR_ERR(fb); 301 + goto out_unlock; 302 + } 298 303 } else { 299 304 drm_dbg_kms(display->drm, "re-using BIOS fb\n"); 300 305 prealloc = true; 301 306 sizes->fb_width = fb->base.width; 302 307 sizes->fb_height = fb->base.height; 303 308 } 304 - 305 - wakeref = intel_display_rpm_get(display); 306 309 307 310 /* Pin the GGTT vma for our access via info->screen_base. 308 311 * This also validates that any existing fb inherited from the