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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Nov 2023, Jouni Högander <jouni.hogander@xxxxxxxxx> 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.

Yay,

Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

>
> Signed-off-by: Jouni Högander <jouni.hogander@xxxxxxxxx>
> ---
>  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 -------
>  3 files changed, 33 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

-- 
Jani Nikula, Intel




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux