RE: [PATCH 1/4] drm/i915: Don't reuse commit_work for the cleanup

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

 



Hello Ville, 
Thank you so much. Changes Look Good to me.
Reviewed-by: Vidya Srinivas <vidya.srinivas@xxxxxxxxx> 

> -----Original Message-----
> From: Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx>
> Sent: 27 November 2024 11:41
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Brian Geffon <bgeffon@xxxxxxxxxx>; Srinivas, Vidya
> <vidya.srinivas@xxxxxxxxx>
> Subject: [PATCH 1/4] drm/i915: Don't reuse commit_work for the cleanup
> 
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Currently we reuse the commit_work for a later cleanup step.
> Let's not do that so that atomic ioctl handler won't accidentally wait for the
> cleanup work when it really wants to just wait on the
> commit_tail() part. We'll just add another work struct for the cleanup.
> 
> Cc: Brian Geffon <bgeffon@xxxxxxxxxx>
> Cc: Vidya Srinivas <vidya.srinivas@xxxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c       | 6 +++---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 2 ++
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 9db255bb1230..5260f6eafaf8 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7581,7 +7581,7 @@ static void intel_atomic_dsb_cleanup(struct
> intel_crtc_state *crtc_state)  static void intel_atomic_cleanup_work(struct
> work_struct *work)  {
>  	struct intel_atomic_state *state =
> -		container_of(work, struct intel_atomic_state,
> base.commit_work);
> +		container_of(work, struct intel_atomic_state, cleanup_work);
>  	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	struct intel_crtc_state *old_crtc_state;
>  	struct intel_crtc *crtc;
> @@ -7936,8 +7936,8 @@ static void intel_atomic_commit_tail(struct
> intel_atomic_state *state)
>  	 * schedule point (cond_resched()) here anyway to keep latencies
>  	 * down.
>  	 */
> -	INIT_WORK(&state->base.commit_work, intel_atomic_cleanup_work);
> -	queue_work(system_highpri_wq, &state->base.commit_work);
> +	INIT_WORK(&state->cleanup_work, intel_atomic_cleanup_work);
> +	queue_work(system_highpri_wq, &state->cleanup_work);
>  }
> 
>  static void intel_atomic_commit_work(struct work_struct *work) diff --git
> a/drivers/gpu/drm/i915/display/intel_display_types.h
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 339e4b0f7698..d7ce8f01645b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -587,6 +587,8 @@ struct intel_atomic_state {
>  	bool skip_intermediate_wm;
> 
>  	bool rps_interactive;
> +
> +	struct work_struct cleanup_work;
>  };
> 
>  struct intel_plane_state {
> --
> 2.45.2





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

  Powered by Linux