Skip to content

Commit 460b317

Browse files
dibinmsjnikula
authored andcommitted
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: 44e6949 ("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 37fc7b7) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent c7685d1 commit 460b317

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

drivers/gpu/drm/i915/display/intel_fbdev.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,22 +288,25 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
288288
drm_framebuffer_put(&fb->base);
289289
fb = NULL;
290290
}
291+
292+
wakeref = intel_display_rpm_get(display);
293+
291294
if (!fb || drm_WARN_ON(display->drm, !intel_fb_bo(&fb->base))) {
292295
drm_dbg_kms(display->drm,
293296
"no BIOS fb, allocating a new one\n");
294297

295298
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+
}
298303
} else {
299304
drm_dbg_kms(display->drm, "re-using BIOS fb\n");
300305
prealloc = true;
301306
sizes->fb_width = fb->base.width;
302307
sizes->fb_height = fb->base.height;
303308
}
304309

305-
wakeref = intel_display_rpm_get(display);
306-
307310
/* Pin the GGTT vma for our access via info->screen_base.
308311
* This also validates that any existing fb inherited from the
309312
* BIOS is suitable for own access.

0 commit comments

Comments
 (0)