mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
drm/xe: Use fb cached min alignment
Instead of just looking at the first plane use the fb cached overall minimum alignment. This aligns with how the i915 version of intel_plane_pin_fb works. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> [vsyrjala: Rebase due to pin_params] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260430154602.11393-1-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
This commit is contained in:
parent
bdf5c2aaa5
commit
53bfcc08af
|
|
@ -458,6 +458,14 @@ static bool reuse_vma(struct intel_plane_state *new_plane_state,
|
|||
return true;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
intel_plane_fb_min_alignment(const struct intel_plane_state *plane_state)
|
||||
{
|
||||
const struct intel_framebuffer *fb = to_intel_framebuffer(plane_state->hw.fb);
|
||||
|
||||
return fb->min_alignment;
|
||||
}
|
||||
|
||||
int intel_plane_pin_fb(struct intel_plane_state *new_plane_state,
|
||||
const struct intel_plane_state *old_plane_state)
|
||||
{
|
||||
|
|
@ -468,7 +476,7 @@ int intel_plane_pin_fb(struct intel_plane_state *new_plane_state,
|
|||
struct intel_plane *plane = to_intel_plane(new_plane_state->uapi.plane);
|
||||
struct intel_fb_pin_params pin_params = {
|
||||
.view = &new_plane_state->view.gtt,
|
||||
.alignment = plane->min_alignment(plane, fb, 0),
|
||||
.alignment = intel_plane_fb_min_alignment(new_plane_state),
|
||||
.needs_cpu_lmem_access = intel_fb_needs_cpu_access(fb),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user