mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/i915: Introduce pin_params.needs_physical
Add a new flag pin_params.needs_physical to inform the pinning code that the display needs a physical address and not GGTT address. This isn't strictly necessary as the current phys_alignment!=0 check is enough in practice. But theoretically one could have needs_physical==true without any alignment requirements. And having an explicit flag feels a bit less magical. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260416174448.28264-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
19fa21941c
commit
08a1df7446
|
|
@ -21,6 +21,7 @@ struct intel_fb_pin_params {
|
|||
unsigned int vtd_guard;
|
||||
bool needs_cpu_lmem_access;
|
||||
bool needs_low_address;
|
||||
bool needs_physical;
|
||||
};
|
||||
|
||||
struct i915_vma *
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ intel_fb_pin_to_ggtt(const struct drm_framebuffer *fb,
|
|||
i915_gem_ww_ctx_init(&ww, true);
|
||||
retry:
|
||||
ret = i915_gem_object_lock(obj, &ww);
|
||||
if (!ret && pin_params->phys_alignment)
|
||||
if (!ret && pin_params->needs_physical)
|
||||
ret = i915_gem_object_attach_phys(obj, pin_params->phys_alignment);
|
||||
else if (!ret && HAS_LMEM(i915))
|
||||
ret = i915_gem_object_migrate(obj, &ww, INTEL_REGION_LMEM_0);
|
||||
|
|
@ -271,6 +271,7 @@ int intel_plane_pin_fb(struct intel_plane_state *plane_state,
|
|||
.vtd_guard = intel_plane_fb_vtd_guard(plane_state),
|
||||
.needs_cpu_lmem_access = intel_fb_needs_cpu_access(&fb->base),
|
||||
.needs_low_address = intel_plane_needs_low_address(display),
|
||||
.needs_physical = intel_plane_needs_physical(plane),
|
||||
};
|
||||
int fence_id = -1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user