From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 6/6] drm/i915: Don't pass crtc_state to foo_plane_ctl() & co.
Date: Thu, 10 Apr 2025 11:53:49 +0300 [thread overview]
Message-ID: <87plhkv1lu.fsf@intel.com> (raw)
In-Reply-To: <20250402172240.9275-7-ville.syrjala@linux.intel.com>
On Wed, 02 Apr 2025, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The *_plane_ctl() functions only consider the state of the
> plane (the state of the crtc is handled by the corresponding
> *_plane_ctl_crtc()), and thus they don't need the crtc_state
> at all. Don't pass it in.
Trusting the compiler here,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/i9xx_plane.c | 5 ++---
> drivers/gpu/drm/i915/display/intel_cursor.c | 10 ++++------
> drivers/gpu/drm/i915/display/intel_sprite.c | 15 ++++++---------
> .../gpu/drm/i915/display/skl_universal_plane.c | 11 ++++-------
> 4 files changed, 16 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index bfeb4bf864e2..6a2609402431 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -151,8 +151,7 @@ static bool i9xx_plane_has_windowing(struct intel_plane *plane)
> i9xx_plane == PLANE_C;
> }
>
> -static u32 i9xx_plane_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 i9xx_plane_ctl(const struct intel_plane_state *plane_state)
> {
> struct intel_display *display = to_intel_display(plane_state);
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> @@ -351,7 +350,7 @@ i9xx_plane_check(struct intel_crtc_state *crtc_state,
> if (ret)
> return ret;
>
> - plane_state->ctl = i9xx_plane_ctl(crtc_state, plane_state);
> + plane_state->ctl = i9xx_plane_ctl(plane_state);
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> index 5333b34a5776..8f9c8f0f4b27 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -205,8 +205,7 @@ static u32 i845_cursor_ctl_crtc(const struct intel_crtc_state *crtc_state)
> return cntl;
> }
>
> -static u32 i845_cursor_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 i845_cursor_ctl(const struct intel_plane_state *plane_state)
> {
> return CURSOR_ENABLE |
> CURSOR_FORMAT_ARGB |
> @@ -266,7 +265,7 @@ static int i845_check_cursor(struct intel_crtc_state *crtc_state,
> return -EINVAL;
> }
>
> - plane_state->ctl = i845_cursor_ctl(crtc_state, plane_state);
> + plane_state->ctl = i845_cursor_ctl(plane_state);
>
> return 0;
> }
> @@ -398,8 +397,7 @@ static u32 i9xx_cursor_ctl_crtc(const struct intel_crtc_state *crtc_state)
> return cntl;
> }
>
> -static u32 i9xx_cursor_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 i9xx_cursor_ctl(const struct intel_plane_state *plane_state)
> {
> struct intel_display *display = to_intel_display(plane_state);
> u32 cntl = 0;
> @@ -526,7 +524,7 @@ static int i9xx_check_cursor(struct intel_crtc_state *crtc_state,
> return -EINVAL;
> }
>
> - plane_state->ctl = i9xx_cursor_ctl(crtc_state, plane_state);
> + plane_state->ctl = i9xx_cursor_ctl(plane_state);
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
> index 9bcb8dda6129..269065840b31 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -263,8 +263,7 @@ static u32 vlv_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
> return sprctl;
> }
>
> -static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 vlv_sprite_ctl(const struct intel_plane_state *plane_state)
> {
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> unsigned int rotation = plane_state->hw.rotation;
> @@ -659,8 +658,7 @@ static bool ivb_need_sprite_gamma(const struct intel_plane_state *plane_state)
> (display->platform.ivybridge || display->platform.haswell);
> }
>
> -static u32 ivb_sprite_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 ivb_sprite_ctl(const struct intel_plane_state *plane_state)
> {
> struct intel_display *display = to_intel_display(plane_state);
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> @@ -1009,8 +1007,7 @@ static u32 g4x_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
> return dvscntr;
> }
>
> -static u32 g4x_sprite_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 g4x_sprite_ctl(const struct intel_plane_state *plane_state)
> {
> struct intel_display *display = to_intel_display(plane_state);
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> @@ -1377,9 +1374,9 @@ g4x_sprite_check(struct intel_crtc_state *crtc_state,
> return ret;
>
> if (DISPLAY_VER(display) >= 7)
> - plane_state->ctl = ivb_sprite_ctl(crtc_state, plane_state);
> + plane_state->ctl = ivb_sprite_ctl(plane_state);
> else
> - plane_state->ctl = g4x_sprite_ctl(crtc_state, plane_state);
> + plane_state->ctl = g4x_sprite_ctl(plane_state);
>
> return 0;
> }
> @@ -1429,7 +1426,7 @@ vlv_sprite_check(struct intel_crtc_state *crtc_state,
> if (ret)
> return ret;
>
> - plane_state->ctl = vlv_sprite_ctl(crtc_state, plane_state);
> + plane_state->ctl = vlv_sprite_ctl(plane_state);
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 808580826b0e..cc64d9598c17 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -1166,8 +1166,7 @@ static u32 skl_plane_ctl_crtc(const struct intel_crtc_state *crtc_state)
> return plane_ctl;
> }
>
> -static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 skl_plane_ctl(const struct intel_plane_state *plane_state)
> {
> struct intel_display *display = to_intel_display(plane_state);
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> @@ -1225,8 +1224,7 @@ static u32 glk_plane_color_ctl_crtc(const struct intel_crtc_state *crtc_state)
> return plane_color_ctl;
> }
>
> -static u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state,
> - const struct intel_plane_state *plane_state)
> +static u32 glk_plane_color_ctl(const struct intel_plane_state *plane_state)
> {
> struct intel_display *display = to_intel_display(plane_state);
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> @@ -2355,11 +2353,10 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
> plane_state->damage = DRM_RECT_INIT(0, 0, 0, 0);
> }
>
> - plane_state->ctl = skl_plane_ctl(crtc_state, plane_state);
> + plane_state->ctl = skl_plane_ctl(plane_state);
>
> if (DISPLAY_VER(display) >= 10)
> - plane_state->color_ctl = glk_plane_color_ctl(crtc_state,
> - plane_state);
> + plane_state->color_ctl = glk_plane_color_ctl(plane_state);
>
> if (intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier) &&
> icl_is_hdr_plane(display, plane->id))
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-04-10 8:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 17:22 [PATCH v2 0/6] drm/i915: Precompute plane SURF address/etc Ville Syrjala
2025-04-02 17:22 ` [PATCH v2 1/6] drm/i915: Precompute plane SURF address Ville Syrjala
2025-04-10 8:45 ` Jani Nikula
2025-04-02 17:22 ` [PATCH v2 2/6] drm/i915: Nuke intel_plane_ggtt_offset() Ville Syrjala
2025-04-03 8:29 ` Jani Nikula
2025-04-04 15:21 ` Ville Syrjälä
2025-04-10 8:47 ` Jani Nikula
2025-04-02 17:22 ` [PATCH v2 3/6] drm/i915: Move the intel_dpt_offset() check into intel_plane_pin_fb() Ville Syrjala
2025-04-10 8:51 ` Jani Nikula
2025-04-02 17:22 ` [PATCH v2 4/6] drm/i915: Use i915_vma_offset() in intel_dpt_offset() Ville Syrjala
2025-04-10 8:52 ` Jani Nikula
2025-04-02 17:22 ` [PATCH v2 5/6] drm/i915: Remove unused dpt_total_entries() Ville Syrjala
2025-04-10 8:52 ` Jani Nikula
2025-04-02 17:22 ` [PATCH v2 6/6] drm/i915: Don't pass crtc_state to foo_plane_ctl() & co Ville Syrjala
2025-04-10 8:53 ` Jani Nikula [this message]
2025-04-02 17:28 ` ✓ CI.Patch_applied: success for drm/i915: Precompute plane SURF address/etc. (rev2) Patchwork
2025-04-02 17:29 ` ✓ CI.checkpatch: " Patchwork
2025-04-02 17:30 ` ✓ CI.KUnit: " Patchwork
2025-04-02 17:47 ` ✓ CI.Build: " Patchwork
2025-04-02 17:50 ` ✓ CI.Hooks: " Patchwork
2025-04-02 17:51 ` ✗ CI.checksparse: warning " Patchwork
2025-04-02 18:36 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-04-02 21:01 ` ✗ Xe.CI.Full: " 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=87plhkv1lu.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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;
as well as URLs for NNTP newsgroup(s).