[Intel-xe] [1/9] drm/i915: Use drm_atomic_helper_wait_for_fences helper.

Hogander, Jouni jouni.hogander at intel.com
Fri Nov 10 11:33:12 UTC 2023


On Thu, 2023-11-09 at 16:07 +0100, Maarten Lankhorst wrote:
> From: Maarten Lankhorst <dev at lankhorst.se>
> 
> The fence api specifies you should wait for fence to completion, not
> give up after whatever timeout was originally configured. The fences
> themselves should prevent the timeout from being indefinite.
> 
> Signed-off-by: Maarten Lankhorst <dev at lankhorst.se>

This is not blocking anything in drm-xe-next and not really related to
this patch set either. I think we can just fine go through the review
and ci testing in intel-gfx mailing list and backport from there/or get
it via rebase.

BR,

Jouni Högander

> ---
>  .../gpu/drm/i915/display/intel_atomic_plane.c |  1 -
>  drivers/gpu/drm/i915/display/intel_display.c  | 23 +----------------
> --
>  2 files changed, 1 insertion(+), 23 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 77e281bf4cb5f..14eeb42c9e2a3 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -38,7 +38,6 @@
>  #include <drm/drm_blend.h>
>  #include <drm/drm_fourcc.h>
>  
> -#include "i915_config.h"
>  #include "i915_reg.h"
>  #include "intel_atomic_plane.h"
>  #include "intel_cdclk.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index b27b533f03d6e..82ff5309a0629 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -50,7 +50,6 @@
>  #include "g4x_dp.h"
>  #include "g4x_hdmi.h"
>  #include "hsw_ips.h"
> -#include "i915_config.h"
>  #include "i915_drv.h"
>  #include "i915_reg.h"
>  #include "i915_utils.h"
> @@ -7055,26 +7054,6 @@ void
> intel_atomic_helper_free_state_worker(struct work_struct *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);
> -       struct drm_plane *plane;
> -       struct drm_plane_state *new_plane_state;
> -       int ret, i;
> -
> -       for_each_new_plane_in_state(&intel_state->base, plane,
> new_plane_state, i) {
> -               if (new_plane_state->fence) {
> -                       ret = dma_fence_wait_timeout(new_plane_state-
> >fence, false,
> -                                                   
> i915_fence_timeout(i915));
> -                       if (ret <= 0)
> -                               break;
> -
> -                       dma_fence_put(new_plane_state->fence);
> -                       new_plane_state->fence = NULL;
> -               }
> -       }
> -}
> -
>  static void intel_atomic_cleanup_work(struct work_struct *work)
>  {
>         struct intel_atomic_state *state =
> @@ -7180,7 +7159,7 @@ static void intel_atomic_commit_tail(struct
> intel_atomic_state *state)
>         intel_wakeref_t wakeref = 0;
>         int i;
>  
> -       intel_atomic_commit_fence_wait(state);
> +       drm_atomic_helper_wait_for_fences(dev, &state->base, false);
>  
>         drm_atomic_helper_wait_for_dependencies(&state->base);
>         drm_dp_mst_atomic_wait_for_dependencies(&state->base);



More information about the Intel-xe mailing list