]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: Use intel_memory_region_type_is_local() in the BIOS FB takeover
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 13 Mar 2025 14:08:37 +0000 (16:08 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 1 Apr 2025 23:22:48 +0000 (02:22 +0300)
Replace the hardcoded PTE vs. memory region is_local checks
in the BIOS FB takeover with intel_memory_region_type_is_local().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-10-ville.syrjala@linux.intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
drivers/gpu/drm/i915/display/intel_plane_initial.c

index d522da7000ff0fb73c88981d1bb8860af65c50a5..6abe17be0add4666e97889be1787c828d08b57b2 100644 (file)
@@ -94,9 +94,10 @@ initial_plane_phys_lmem(struct intel_display *display,
                return false;
        }
 
-       if (!is_local) {
+       if (intel_memory_type_is_local(mem->type) != is_local) {
                drm_err(display->drm,
-                       "Initial plane FB PTE not LMEM\n");
+                       "Initial plane FB PTE unsuitable for %s\n",
+                       mem->region.name);
                return false;
        }
 
@@ -152,9 +153,10 @@ initial_plane_phys_smem(struct intel_display *display,
                return false;
        }
 
-       if (is_local) {
+       if (intel_memory_type_is_local(mem->type) != is_local) {
                drm_err(display->drm,
-                       "Initial plane FB PTE LMEM\n");
+                       "Initial plane FB PTE unsuitable for %s\n",
+                       mem->region.name);
                return false;
        }