]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: Reject X/Y tiled BIOS FB if we don't have fenced regions
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 10 Apr 2026 15:04:47 +0000 (18:04 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 15 Apr 2026 09:38:20 +0000 (12:38 +0300)
The CPU always needs linear view into the BIOS FB, and for X/Y tiled
buffers that is achieved by the use of a fenced region. If the
underlying driver doesn't support fenced regions then we can't keep
the X/Y tiled BIOS FB. i915 has fenced regions, xe does not.

Probably not a big deal since I don't think we've seen tiled BIOS
FBs outside of some MacBooks. See eg. commit d9a515867bdb
("drm/i915/gen9+: Fix initial readout for Y tiled framebuffers").

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260410150449.9699-9-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_initial_plane.c

index 5a5adf738d4a938ba15891508f6ab0d22e70c6b1..55b6cdded12664b11a64d266b65f71c3861dd53a 100644 (file)
@@ -79,9 +79,13 @@ intel_alloc_initial_plane_obj(struct intel_display *display,
 
        switch (fb->modifier) {
        case DRM_FORMAT_MOD_LINEAR:
+               break;
        case I915_FORMAT_MOD_X_TILED:
        case I915_FORMAT_MOD_Y_TILED:
-               break;
+               /* fenced region needed for linear CPU access to tiled FB */
+               if (intel_parent_has_fenced_regions(display))
+                       break;
+               fallthrough;
        default:
                drm_dbg_kms(display->drm, "Unsupported modifier for initial FB: 0x%llx\n",
                            fb->modifier);