Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+15 -9
+15 -9
drivers/gpu/drm/i915/display/intel_overlay.c
··· 1490 1490 return display->overlay; 1491 1491 } 1492 1492 1493 + static void i915_overlay_cleanup(struct drm_device *drm, 1494 + struct intel_overlay *overlay) 1495 + { 1496 + /* 1497 + * The bo's should be free'd by the generic code already. 1498 + * Furthermore modesetting teardown happens beforehand so the 1499 + * hardware should be off already. 1500 + */ 1501 + drm_WARN_ON(drm, i915_overlay_is_active(drm)); 1502 + 1503 + i915_gem_object_put(overlay->reg_bo); 1504 + i915_active_fini(&overlay->last_flip); 1505 + } 1506 + 1493 1507 void intel_overlay_cleanup(struct intel_display *display) 1494 1508 { 1495 1509 struct intel_overlay *overlay; ··· 1512 1498 if (!overlay) 1513 1499 return; 1514 1500 1515 - /* 1516 - * The bo's should be free'd by the generic code already. 1517 - * Furthermore modesetting teardown happens beforehand so the 1518 - * hardware should be off already. 1519 - */ 1520 - drm_WARN_ON(display->drm, i915_overlay_is_active(display->drm)); 1521 - 1522 - i915_gem_object_put(overlay->reg_bo); 1523 - i915_active_fini(&overlay->last_flip); 1501 + i915_overlay_cleanup(display->drm, overlay); 1524 1502 1525 1503 kfree(overlay); 1526 1504 }