mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 23:59:33 -04:00
drm/i915: Move the i915_dpt_offset()==0 assert
Move the i915_dpt_offset() check into the lower level intel_fb_pin_to_dpt() function. Clears out some of the unnecessary junk from the higher level code, making it easier to introduce the new fb_pin parent interface. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260508143426.26504-4-ville.syrjala@linux.intel.com
This commit is contained in:
@@ -101,6 +101,12 @@ intel_fb_pin_to_dpt(struct drm_gem_object *_obj, struct intel_dpt *dpt,
|
||||
i915_gem_object_flush_if_display(obj);
|
||||
|
||||
i915_vma_get(vma);
|
||||
|
||||
/*
|
||||
* The DPT object contains only one vma, and there is no VT-d
|
||||
* guard, so the VMA's offset within the DPT is always 0.
|
||||
*/
|
||||
drm_WARN_ON(&i915->drm, i915_dpt_offset(vma));
|
||||
err:
|
||||
atomic_dec(&i915->pending_fb_pin);
|
||||
|
||||
@@ -255,7 +261,6 @@ 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 =
|
||||
to_intel_framebuffer(plane_state->hw.fb);
|
||||
@@ -304,12 +309,6 @@ 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, and there is no VT-d
|
||||
* guard, so the VMA's offset within the DPT is always 0.
|
||||
*/
|
||||
drm_WARN_ON(&i915->drm, i915_dpt_offset(plane_state->dpt_vma));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user