From 9d293478474f0a7101b678967bf3b3ae88d35696 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Thu, 13 Mar 2025 16:08:37 +0200 Subject: [PATCH] drm/i915: Use intel_memory_region_type_is_local() in the BIOS FB takeover MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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ä Link: https://patchwork.freedesktop.org/patch/msgid/20250313140838.29742-10-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_plane_initial.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c index d522da7000ff0..6abe17be0add4 100644 --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c @@ -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; } -- 2.47.3