[PATCH v2] drm/i915/display: Remove dead code around intel_atomic_helper->free_list

Hogander, Jouni jouni.hogander at intel.com
Mon Dec 18 11:49:57 UTC 2023


On Wed, 2023-11-15 at 23:21 +0200, Ville Syrjälä wrote:
> On Tue, Nov 14, 2023 at 03:41:41PM +0200, Jouni Högander wrote:
> > After switching to directly using dma_fence instead of
> > i915_sw_fence we
> > have left some dead code around intel_atomic_helper->free_list.
> > Remove that
> > dead code.
> > 
> > v2: Remove intel_atomic_state->freed as well
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Thank you Ville for reviewing my patch. This is now pushed to drm-
intel-next.

BR,

Jouni Högander

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c  | 20 ---------------
> > ----
> >  .../gpu/drm/i915/display/intel_display_core.h |  6 ------
> >  .../drm/i915/display/intel_display_driver.c   |  7 -------
> >  .../drm/i915/display/intel_display_types.h    |  2 --
> >  4 files changed, 35 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index 3effafcbb411..387acf21b794 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -7086,24 +7086,6 @@ static void
> > skl_commit_modeset_enables(struct intel_atomic_state *state)
> >         drm_WARN_ON(&dev_priv->drm, update_pipes);
> >  }
> >  
> > -static void intel_atomic_helper_free_state(struct drm_i915_private
> > *dev_priv)
> > -{
> > -       struct intel_atomic_state *state, *next;
> > -       struct llist_node *freed;
> > -
> > -       freed = llist_del_all(&dev_priv-
> > >display.atomic_helper.free_list);
> > -       llist_for_each_entry_safe(state, next, freed, freed)
> > -               drm_atomic_state_put(&state->base);
> > -}
> > -
> > -void intel_atomic_helper_free_state_worker(struct work_struct
> > *work)
> > -{
> > -       struct drm_i915_private *dev_priv =
> > -               container_of(work, typeof(*dev_priv),
> > display.atomic_helper.free_work);
> > -
> > -       intel_atomic_helper_free_state(dev_priv);
> > -}
> > -
> >  static void intel_atomic_commit_fence_wait(struct
> > intel_atomic_state *intel_state)
> >  {
> >         struct drm_i915_private *i915 = to_i915(intel_state-
> > >base.dev);
> > @@ -7139,8 +7121,6 @@ static void intel_atomic_cleanup_work(struct
> > work_struct *work)
> >         drm_atomic_helper_cleanup_planes(&i915->drm, &state->base);
> >         drm_atomic_helper_commit_cleanup_done(&state->base);
> >         drm_atomic_state_put(&state->base);
> > -
> > -       intel_atomic_helper_free_state(i915);
> >  }
> >  
> >  static void intel_atomic_prepare_plane_clear_colors(struct
> > intel_atomic_state *state)
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h
> > b/drivers/gpu/drm/i915/display/intel_display_core.h
> > index aa8be02c9e54..34945f733a97 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> > @@ -298,12 +298,6 @@ struct intel_display {
> >                 const struct intel_audio_funcs *audio;
> >         } funcs;
> >  
> > -       /* Grouping using anonymous structs. Keep sorted. */
> > -       struct intel_atomic_helper {
> > -               struct llist_head free_list;
> > -               struct work_struct free_work;
> > -       } atomic_helper;
> > -
> >         struct {
> >                 /* backlight registers and fields in struct
> > intel_panel */
> >                 struct mutex lock;
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c
> > b/drivers/gpu/drm/i915/display/intel_display_driver.c
> > index 62f7b10484be..9df9097a0255 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> > @@ -259,10 +259,6 @@ int intel_display_driver_probe_noirq(struct
> > drm_i915_private *i915)
> >         if (ret)
> >                 goto cleanup_vga_client_pw_domain_dmc;
> >  
> > -       init_llist_head(&i915->display.atomic_helper.free_list);
> > -       INIT_WORK(&i915->display.atomic_helper.free_work,
> > -                 intel_atomic_helper_free_state_worker);
> > -
> >         intel_init_quirks(i915);
> >  
> >         intel_fbc_init(i915);
> > @@ -430,9 +426,6 @@ void intel_display_driver_remove(struct
> > drm_i915_private *i915)
> >         flush_workqueue(i915->display.wq.flip);
> >         flush_workqueue(i915->display.wq.modeset);
> >  
> > -       flush_work(&i915->display.atomic_helper.free_work);
> > -       drm_WARN_ON(&i915->drm, !llist_empty(&i915-
> > >display.atomic_helper.free_list));
> > -
> >         /*
> >          * MST topology needs to be suspended so we don't have any
> > calls to
> >          * fbdev after it's finalized. MST will be destroyed later
> > as part of
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> > b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 926bf9c1a3ed..8ddfc6efef96 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -678,8 +678,6 @@ struct intel_atomic_state {
> >         bool skip_intermediate_wm;
> >  
> >         bool rps_interactive;
> > -
> > -       struct llist_node freed;
> >  };
> >  
> >  struct intel_plane_state {
> > -- 
> > 2.34.1
> 



More information about the Intel-gfx mailing list