mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/xe: Abstract the initial FB PTE checks a bit
Add a few helpers that allow us to abstract the xe initial FB PTE check a bit. Still very ad-hoc compared to the nicely abstracted i915 counterpart, but whatever. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/20260511214122.8468-10-ville.syrjala@linux.intel.com Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> Acked-by: Matthew Brost <matthew.brost@intel.com> #teams
This commit is contained in:
parent
1d2a6c96f6
commit
1be929d430
|
|
@ -19,8 +19,19 @@
|
|||
#include "xe_fb_pin.h"
|
||||
#include "xe_ggtt.h"
|
||||
#include "xe_mmio.h"
|
||||
#include "xe_ttm_stolen_mgr.h"
|
||||
#include "xe_vram_types.h"
|
||||
|
||||
static bool is_pte_local(u64 pte)
|
||||
{
|
||||
return pte & XE_GGTT_PTE_DM;
|
||||
}
|
||||
|
||||
static bool need_pte_local(struct xe_device *xe)
|
||||
{
|
||||
return IS_DGFX(xe);
|
||||
}
|
||||
|
||||
static struct xe_bo *
|
||||
initial_plane_bo(struct xe_device *xe,
|
||||
struct intel_initial_plane_config *plane_config)
|
||||
|
|
@ -44,13 +55,13 @@ initial_plane_bo(struct xe_device *xe,
|
|||
if (IS_DGFX(xe)) {
|
||||
u64 pte = xe_ggtt_read_pte(tile0->mem.ggtt, base);
|
||||
|
||||
if (!(pte & XE_GGTT_PTE_DM)) {
|
||||
drm_err(&xe->drm,
|
||||
"Initial plane programming missing DM bit\n");
|
||||
if (is_pte_local(pte) != need_pte_local(xe)) {
|
||||
drm_err(&xe->drm, "Initial plane PTE has bad local memory bit\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
phys_base = pte & ~(page_size - 1);
|
||||
|
||||
flags |= XE_BO_FLAG_VRAM0;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user