On Wed, 18 Feb 2026, Ville Syrjala <[email protected]> wrote: > From: Ville Syrjälä <[email protected]> > > We don't have fetch_and_zero() on the display side, so stop
Unfortunately, we do have a dupe of it display side too. I wish it would just die. I approve of the patch anyway. Reviewed-by: Jani Nikula <[email protected]> > using it in the display side intel_overlay_cleanup(). Fortunately > we don't really have anything to do here apart from freeing the > data. And we'll keep on clearing the pointer, just in case something > somewhere cares about it. > > Signed-off-by: Ville Syrjälä <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_overlay.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c > b/drivers/gpu/drm/i915/display/intel_overlay.c > index 8b06c2cff7f2..6a2af1f356ed 100644 > --- a/drivers/gpu/drm/i915/display/intel_overlay.c > +++ b/drivers/gpu/drm/i915/display/intel_overlay.c > @@ -1554,13 +1554,8 @@ static void i915_overlay_cleanup(struct drm_device > *drm) > > void intel_overlay_cleanup(struct intel_display *display) > { > - struct intel_overlay *overlay; > - > - overlay = fetch_and_zero(&display->overlay); > - if (!overlay) > - return; > - > i915_overlay_cleanup(display->drm); > > - kfree(overlay); > + kfree(display->overlay); > + display->overlay = NULL; > } -- Jani Nikula, Intel
