Skip to content

Commit

Permalink
drm/i915: Use intel_memory_region_type_is_local() in the BIOS FB take…
Browse files Browse the repository at this point in the history
…over

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>
  • Loading branch information
Ville Syrjälä committed Apr 1, 2025
1 parent a47720c commit 9d29347
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/gpu/drm/i915/display/intel_plane_initial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9d29347

Please sign in to comment.