]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/fbdev: Fix BIOS FB vs. stolen size check
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 20 Feb 2026 17:09:03 +0000 (19:09 +0200)
committerVinod Govindapillai <vinod.govindapillai@intel.com>
Wed, 25 Feb 2026 12:35:27 +0000 (14:35 +0200)
Looks like stolen->size is in bytes, not pages. Remove the
bogus PAGE_SHIFT stuff.

Also for some random reason xe rejects the FB if it takes up
exactly half of stolen, whereas i915 allows it to be used
in that case. Adjust xe to follow the i915 rule for consistency.

v2: rebase related updates

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-2-vinod.govindapillai@intel.com
drivers/gpu/drm/xe/display/xe_initial_plane.c

index 4cfeafcc158d542aced779fb43a857bf220bd8ba..38ecc201ac4e070a00cfb434f4ccabf99bd36c27 100644 (file)
@@ -99,7 +99,7 @@ initial_plane_bo(struct xe_device *xe,
                 * features.
                 */
                if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
-                   plane_config->size * 2 >> PAGE_SHIFT >= stolen->size)
+                   plane_config->size * 2 > stolen->size)
                        return NULL;
        }