All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, <intel-gfx@lists.freedesktop.org>
Cc: jani.nikula@intel.com
Subject: Re: [Intel-gfx] [PATCH 01/10] drm/i915/display: remove intel_display_commit_duplicated_state()
Date: Thu, 13 Apr 2023 13:13:55 -0300	[thread overview]
Message-ID: <168140243509.4412.6683166708727186409@gjsousa-mobl2> (raw)
In-Reply-To: <881f50d86fd922fe39b367b688e58e7426bf377a.1681379167.git.jani.nikula@intel.com>

Quoting Jani Nikula (2023-04-13 06:47:27)
> This seems like an unnecessary wrapper layer. Removing it will be
> helpful later.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 28 +++++++-------------
>  1 file changed, 10 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 27b47680573a..1c0149adcf49 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -701,20 +701,6 @@ intel_plane_fence_y_offset(const struct intel_plane_state *plane_state)
>         return y;
>  }
>  
> -static int
> -intel_display_commit_duplicated_state(struct intel_atomic_state *state,
> -                                struct drm_modeset_acquire_ctx *ctx)
> -{
> -  struct drm_i915_private *i915 = to_i915(state->base.dev);
> -  int ret;
> -
> -  ret = drm_atomic_helper_commit_duplicated_state(&state->base, ctx);
> -
> -  drm_WARN_ON(&i915->drm, ret == -EDEADLK);
> -
> -  return ret;
> -}
> -
>  static int
>  __intel_display_resume(struct drm_i915_private *i915,
>                        struct drm_atomic_state *state,
> @@ -722,7 +708,7 @@ __intel_display_resume(struct drm_i915_private *i915,
>  {
>         struct drm_crtc_state *crtc_state;
>         struct drm_crtc *crtc;
> -  int i;
> +  int ret, i;
>  
>         intel_modeset_setup_hw_state(i915, ctx);
>         intel_vga_redisable(i915);
> @@ -748,7 +734,11 @@ __intel_display_resume(struct drm_i915_private *i915,
>         if (!HAS_GMCH(i915))
>                 to_intel_atomic_state(state)->skip_intermediate_wm = true;
>  
> -  return intel_display_commit_duplicated_state(to_intel_atomic_state(state), ctx);
> +  ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
> +
> +  drm_WARN_ON(&i915->drm, ret == -EDEADLK);
> +
> +  return ret;
>  }
>  
>  static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)
> @@ -839,10 +829,12 @@ void intel_display_finish_reset(struct drm_i915_private *i915)
>         /* reset doesn't touch the display */
>         if (!gpu_reset_clobbers_display(i915)) {
>                 /* for testing only restore the display */
> -          ret = intel_display_commit_duplicated_state(to_intel_atomic_state(state), ctx);
> -          if (ret)
> +          ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
> +          if (ret) {
> +                  drm_WARN_ON(&i915->drm, ret == -EDEADLK);
>                         drm_err(&i915->drm,
>                                 "Restoring old state failed with %i\n", ret);
> +          }
>         } else {
>                 /*
>                  * The display has been reset as well,
> -- 
> 2.39.2
>

  reply	other threads:[~2023-04-13 16:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  9:47 [Intel-gfx] [PATCH 00/10] drm/i915/display: split out high level display entry points Jani Nikula
2023-04-13  9:47 ` [Intel-gfx] [PATCH 01/10] drm/i915/display: remove intel_display_commit_duplicated_state() Jani Nikula
2023-04-13 16:13   ` Gustavo Sousa [this message]
2023-04-13  9:47 ` [Intel-gfx] [PATCH 02/10] drm/i915/display: start high level display driver file Jani Nikula
2023-04-13 16:55   ` Gustavo Sousa
2023-04-13  9:47 ` [Intel-gfx] [PATCH 03/10] drm/i915/display: move intel_modeset_probe_defer() to intel_display_driver.[ch] Jani Nikula
2023-04-13 16:56   ` Gustavo Sousa
2023-04-13  9:47 ` [Intel-gfx] [PATCH 04/10] drm/i915/display: rename intel_modeset_probe_defer() -> intel_display_driver_probe_defer() Jani Nikula
2023-04-13 16:57   ` Gustavo Sousa
2023-04-13 19:11   ` Lucas De Marchi
2023-04-13  9:47 ` [Intel-gfx] [PATCH 05/10] drm/i915/display: move modeset probe/remove functions to intel_display_driver.c Jani Nikula
2023-04-13 13:20   ` Gustavo Sousa
2023-04-14  9:01     ` Jani Nikula
2023-04-14  9:20     ` Jani Nikula
2023-04-13  9:47 ` [Intel-gfx] [PATCH 06/10] drm/i915/display: rename intel_display_driver_* functions Jani Nikula
2023-04-13 13:33   ` Gustavo Sousa
2023-04-14  9:02     ` Jani Nikula
2023-04-13  9:47 ` [Intel-gfx] [PATCH 07/10] drm/i915/display: add intel_display_reset.[ch] Jani Nikula
2023-04-13 16:59   ` Gustavo Sousa
2023-04-13  9:47 ` [Intel-gfx] [PATCH 08/10] drm/i915/display: move display suspend/resume to intel_display_driver.[ch] Jani Nikula
2023-04-13 17:01   ` Gustavo Sousa
2023-04-13  9:47 ` [Intel-gfx] [PATCH 09/10] drm/i915/display: rename intel_display_driver_suspend/resume functions Jani Nikula
2023-04-13 17:02   ` Gustavo Sousa
2023-04-13  9:47 ` [Intel-gfx] [PATCH 10/10] drm/i915/display: add intel_display_driver_early_probe() Jani Nikula
2023-04-13 17:02   ` Gustavo Sousa
2023-04-13 13:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: split out high level display entry points Patchwork
2023-04-13 13:15 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-13 13:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-13 16:06 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=168140243509.4412.6683166708727186409@gjsousa-mobl2 \
    --to=gustavo.sousa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.