mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
drm/i915: Move the intel_dpt_offset() check into intel_plane_pin_fb()
Now that we handle all the other vma offset stuff in intel_plane_pin_fb() it seems more proper to do the dpt_vma offset check there as well. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250717171353.23090-4-ville.syrjala@linux.intel.com
This commit is contained in:
parent
bc0c7fd732
commit
44ebdab4b6
|
|
@ -261,6 +261,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 intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
|
||||
const struct intel_framebuffer *fb =
|
||||
to_intel_framebuffer(plane_state->hw.fb);
|
||||
|
|
@ -299,6 +300,12 @@ int intel_plane_pin_fb(struct intel_plane_state *plane_state,
|
|||
plane_state->dpt_vma = vma;
|
||||
|
||||
WARN_ON(plane_state->ggtt_vma == plane_state->dpt_vma);
|
||||
|
||||
/*
|
||||
* The DPT object contains only one vma, so
|
||||
* the VMA's offset within the DPT is always 0.
|
||||
*/
|
||||
drm_WARN_ON(display->drm, intel_dpt_offset(plane_state->dpt_vma));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1271,12 +1271,6 @@ static u32 skl_surf_address(const struct intel_plane_state *plane_state,
|
|||
u32 offset = plane_state->view.color_plane[color_plane].offset;
|
||||
|
||||
if (intel_fb_uses_dpt(fb)) {
|
||||
/*
|
||||
* The DPT object contains only one vma, so the VMA's offset
|
||||
* within the DPT is always 0.
|
||||
*/
|
||||
drm_WARN_ON(display->drm, plane_state->dpt_vma &&
|
||||
intel_dpt_offset(plane_state->dpt_vma));
|
||||
drm_WARN_ON(display->drm, offset & 0x1fffff);
|
||||
return offset >> 9;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user