mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
drm/i915/overlay: Extract i915_overlay_cleanup()
Pull the i915 specific bits of the overlay cleanup into a separate function (i915_overlay_cleanup()) to accommodate the upcoming parent vs. display driver split. For now we'll also have to pass in the overlay struct, but that will disappear once the i915 vs. display split is completed. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260226100738.29997-11-ville.syrjala@linux.intel.com
This commit is contained in:
parent
8f7bf40ce2
commit
dc1d78b619
|
|
@ -1490,6 +1490,20 @@ bool intel_overlay_available(struct intel_display *display)
|
|||
return display->overlay;
|
||||
}
|
||||
|
||||
static void i915_overlay_cleanup(struct drm_device *drm,
|
||||
struct intel_overlay *overlay)
|
||||
{
|
||||
/*
|
||||
* The bo's should be free'd by the generic code already.
|
||||
* Furthermore modesetting teardown happens beforehand so the
|
||||
* hardware should be off already.
|
||||
*/
|
||||
drm_WARN_ON(drm, i915_overlay_is_active(drm));
|
||||
|
||||
i915_gem_object_put(overlay->reg_bo);
|
||||
i915_active_fini(&overlay->last_flip);
|
||||
}
|
||||
|
||||
void intel_overlay_cleanup(struct intel_display *display)
|
||||
{
|
||||
struct intel_overlay *overlay;
|
||||
|
|
@ -1498,15 +1512,7 @@ void intel_overlay_cleanup(struct intel_display *display)
|
|||
if (!overlay)
|
||||
return;
|
||||
|
||||
/*
|
||||
* The bo's should be free'd by the generic code already.
|
||||
* Furthermore modesetting teardown happens beforehand so the
|
||||
* hardware should be off already.
|
||||
*/
|
||||
drm_WARN_ON(display->drm, i915_overlay_is_active(display->drm));
|
||||
|
||||
i915_gem_object_put(overlay->reg_bo);
|
||||
i915_active_fini(&overlay->last_flip);
|
||||
i915_overlay_cleanup(display->drm, overlay);
|
||||
|
||||
kfree(overlay);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user