mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/i915: Introduce pin_params.needs_low_address
Add a new flag pin_params.needs_low_address to inform the pinning code that the display needs a low ggtt address. The goal is to eliminate all display specific stuff from the low level pinning code (the direct intel_plane_needs_low_addres()) call in this case). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260416174448.28264-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
41ff682e42
commit
19fa21941c
|
|
@ -20,6 +20,7 @@ struct intel_fb_pin_params {
|
|||
unsigned int phys_alignment;
|
||||
unsigned int vtd_guard;
|
||||
bool needs_cpu_lmem_access;
|
||||
bool needs_low_address;
|
||||
};
|
||||
|
||||
struct i915_vma *
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
#include "intel_fb_pin.h"
|
||||
#include "intel_fbdev.h"
|
||||
#include "intel_frontbuffer.h"
|
||||
#include "intel_plane.h"
|
||||
|
||||
struct intel_fbdev {
|
||||
struct intel_framebuffer *fb;
|
||||
|
|
@ -314,6 +315,7 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
|
|||
pin_params.vtd_guard = intel_fb_view_vtd_guard(&fb->base,
|
||||
&fb->normal_view,
|
||||
DRM_MODE_ROTATE_0);
|
||||
pin_params.needs_low_address = intel_plane_needs_low_address(display);
|
||||
|
||||
vma = intel_fb_pin_to_ggtt(&fb->base, &pin_params, NULL);
|
||||
if (IS_ERR(vma)) {
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ intel_fb_pin_to_ggtt(const struct drm_framebuffer *fb,
|
|||
|
||||
pinctl = 0;
|
||||
/* PIN_MAPPABLE limits the address to GMADR size */
|
||||
if (intel_plane_needs_low_address(display))
|
||||
if (pin_params->needs_low_address)
|
||||
pinctl |= PIN_MAPPABLE;
|
||||
|
||||
i915_gem_ww_ctx_init(&ww, true);
|
||||
|
|
@ -256,6 +256,7 @@ intel_plane_fb_vtd_guard(const struct intel_plane_state *plane_state)
|
|||
int intel_plane_pin_fb(struct intel_plane_state *plane_state,
|
||||
const struct intel_plane_state *old_plane_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(plane_state);
|
||||
struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
|
||||
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
|
||||
const struct intel_framebuffer *fb =
|
||||
|
|
@ -269,6 +270,7 @@ int intel_plane_pin_fb(struct intel_plane_state *plane_state,
|
|||
.phys_alignment = intel_plane_fb_min_phys_alignment(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),
|
||||
};
|
||||
int fence_id = -1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user