From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 1/3] drm/i915: Introduce intel_crtc_planes_update_arm()
Date: Thu, 17 Feb 2022 08:15:56 +0200 [thread overview]
Message-ID: <87czjm3tnn.fsf@intel.com> (raw)
In-Reply-To: <20220216232806.6194-2-ville.syrjala@linux.intel.com>
On Thu, 17 Feb 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> No reason the high level intel_update_crtc() needs to know
> that there is something magical about the commit order of
> planes between different platforms. So let's hide that
> detail even better.
>
> In order to keep to somewhat consistent naming between
> things we shall call this intel_crtc_planes_update_arm()
> to match the plane->update_arm() vfunc naming convention.
> And let's rename the noarm counterpart to
> intel_crtc_planes_update_noarm() to more clearly associate
> it with the plane->update_noarm() vfunc.
>
> v2: Change the naming convention a bit
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com> #v1
Holds for v2.
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> .../gpu/drm/i915/display/intel_atomic_plane.c | 23 ++++++++++++++-----
> .../gpu/drm/i915/display/intel_atomic_plane.h | 10 ++++----
> drivers/gpu/drm/i915/display/intel_display.c | 8 ++-----
> 3 files changed, 23 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index e9893e314037..c53aa6a4c7a0 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -693,8 +693,8 @@ void intel_plane_disable_arm(struct intel_plane *plane,
> plane->disable_arm(plane, crtc_state);
> }
>
> -void intel_update_planes_on_crtc(struct intel_atomic_state *state,
> - struct intel_crtc *crtc)
> +void intel_crtc_planes_update_noarm(struct intel_atomic_state *state,
> + struct intel_crtc *crtc)
> {
> struct intel_crtc_state *new_crtc_state =
> intel_atomic_get_new_crtc_state(state, crtc);
> @@ -722,8 +722,8 @@ void intel_update_planes_on_crtc(struct intel_atomic_state *state,
> }
> }
>
> -void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
> - struct intel_crtc *crtc)
> +static void skl_crtc_planes_update_arm(struct intel_atomic_state *state,
> + struct intel_crtc *crtc)
> {
> struct intel_crtc_state *old_crtc_state =
> intel_atomic_get_old_crtc_state(state, crtc);
> @@ -757,8 +757,8 @@ void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
> }
> }
>
> -void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
> - struct intel_crtc *crtc)
> +static void i9xx_crtc_planes_update_arm(struct intel_atomic_state *state,
> + struct intel_crtc *crtc)
> {
> struct intel_crtc_state *new_crtc_state =
> intel_atomic_get_new_crtc_state(state, crtc);
> @@ -783,6 +783,17 @@ void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
> }
> }
>
> +void intel_crtc_planes_update_arm(struct intel_atomic_state *state,
> + struct intel_crtc *crtc)
> +{
> + struct drm_i915_private *i915 = to_i915(state->base.dev);
> +
> + if (DISPLAY_VER(i915) >= 9)
> + skl_crtc_planes_update_arm(state, crtc);
> + else
> + i9xx_crtc_planes_update_arm(state, crtc);
> +}
> +
> int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
> struct intel_crtc_state *crtc_state,
> int min_scale, int max_scale,
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h
> index 9822b921279c..f4763a53541e 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h
> @@ -44,12 +44,10 @@ void intel_plane_free(struct intel_plane *plane);
> struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane);
> void intel_plane_destroy_state(struct drm_plane *plane,
> struct drm_plane_state *state);
> -void intel_update_planes_on_crtc(struct intel_atomic_state *state,
> - struct intel_crtc *crtc);
> -void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
> - struct intel_crtc *crtc);
> -void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
> - struct intel_crtc *crtc);
> +void intel_crtc_planes_update_noarm(struct intel_atomic_state *state,
> + struct intel_crtc *crtc);
> +void intel_crtc_planes_update_arm(struct intel_atomic_state *state,
> + struct intel_crtc *crtc);
> int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
> struct intel_crtc_state *crtc_state,
> const struct intel_plane_state *old_plane_state,
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 59961621fe4a..740620ef07ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7954,7 +7954,6 @@ static void intel_enable_crtc(struct intel_atomic_state *state,
> static void intel_update_crtc(struct intel_atomic_state *state,
> struct intel_crtc *crtc)
> {
> - struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> const struct intel_crtc_state *old_crtc_state =
> intel_atomic_get_old_crtc_state(state, crtc);
> struct intel_crtc_state *new_crtc_state =
> @@ -7975,17 +7974,14 @@ static void intel_update_crtc(struct intel_atomic_state *state,
>
> intel_fbc_update(state, crtc);
>
> - intel_update_planes_on_crtc(state, crtc);
> + intel_crtc_planes_update_noarm(state, crtc);
>
> /* Perform vblank evasion around commit operation */
> intel_pipe_update_start(new_crtc_state);
>
> commit_pipe_pre_planes(state, crtc);
>
> - if (DISPLAY_VER(dev_priv) >= 9)
> - skl_arm_planes_on_crtc(state, crtc);
> - else
> - i9xx_arm_planes_on_crtc(state, crtc);
> + intel_crtc_planes_update_arm(state, crtc);
>
> commit_pipe_post_planes(state, crtc);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-02-17 6:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 23:28 [Intel-gfx] [PATCH v2 0/3] drm/i915: Plane/wm cleanups Ville Syrjala
2022-02-16 23:28 ` [Intel-gfx] [PATCH v2 1/3] drm/i915: Introduce intel_crtc_planes_update_arm() Ville Syrjala
2022-02-17 6:15 ` Jani Nikula [this message]
2022-02-16 23:28 ` [Intel-gfx] [PATCH v2 2/3] drm/i915: Clean up SSKPD/MLTR defines Ville Syrjala
2022-02-16 23:28 ` [Intel-gfx] [PATCH v2 3/3] drm/i915: Polish ilk+ wm register bits Ville Syrjala
2022-02-17 17:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Plane/wm cleanups (rev3) Patchwork
2022-02-17 17:42 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-17 18:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-18 4:35 ` [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=87czjm3tnn.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox