summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-08-13 00:29:52 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-08-13 00:29:52 +0000
commit53a7c4ceee67a136adbe42cf85444bcefac5a3ec (patch)
tree091a155b59403411f14d7f451a57bf3f02e3191b /sys/dev/pci/drm/i915
parentd8e858a12aafd076d44bd625f52572f641222d8e (diff)
drm/i915: Annotate more of the BIOS fb takeover failure paths
From Ville Syrjala 074146f4578388b1b7f7832368d1581fceb1441e in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r--sys/dev/pci/drm/i915/display/intel_plane_initial.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_plane_initial.c b/sys/dev/pci/drm/i915/display/intel_plane_initial.c
index 4820a66de73..4184fe74ef8 100644
--- a/sys/dev/pci/drm/i915/display/intel_plane_initial.c
+++ b/sys/dev/pci/drm/i915/display/intel_plane_initial.c
@@ -166,14 +166,19 @@ initial_plane_vma(struct drm_i915_private *i915,
*/
if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
mem == i915->mm.stolen_region &&
- size * 2 > i915->dsm.usable_size)
+ size * 2 > i915->dsm.usable_size) {
+ drm_dbg_kms(&i915->drm, "Initial FB size exceeds half of stolen, discarding\n");
return NULL;
+ }
obj = i915_gem_object_create_region_at(mem, phys_base, size,
I915_BO_ALLOC_USER |
I915_BO_PREALLOC);
- if (IS_ERR(obj))
+ if (IS_ERR(obj)) {
+ drm_dbg_kms(&i915->drm, "Failed to preallocate initial FB in %s\n",
+ mem->region.name);
return NULL;
+ }
/*
* Mark it WT ahead of time to avoid changing the