Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 09/12] drm/i915: Relocate intel_plane_uses_fence()
Date: Thu, 13 Feb 2025 21:20:30 +0200	[thread overview]
Message-ID: <87tt8xwt1d.fsf@intel.com> (raw)
In-Reply-To: <20250213150220.13580-10-ville.syrjala@linux.intel.com>

On Thu, 13 Feb 2025, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Relocate intel_plane_uses_fence() into intel_fb.c. Not sure
> that's the best place, but since this is mostly about the
> fb and vma I can't think of anything truly better right now.

Better than intel_display.c anyway.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 10 ----------
>  drivers/gpu/drm/i915/display/intel_display.h |  2 --
>  drivers/gpu/drm/i915/display/intel_fb.c      | 10 ++++++++++
>  drivers/gpu/drm/i915/display/intel_fb.h      |  1 +
>  4 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index c2bde539a4ff..4800fefd6321 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -637,16 +637,6 @@ unsigned int intel_remapped_info_size(const struct intel_remapped_info *rem_info
>  	return size;
>  }
>  
> -bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
> -{
> -	struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
> -	struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
> -
> -	return DISPLAY_VER(dev_priv) < 4 ||
> -		(plane->fbc && !plane_state->no_fbc_reason &&
> -		 plane_state->view.gtt.type == I915_GTT_VIEW_NORMAL);
> -}
> -
>  /*
>   * Convert the x/y offsets into a linear offset.
>   * Only valid with 0/180 degree rotation, which is fine since linear
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index b3cdf7f04450..d3afd134f70e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -526,8 +526,6 @@ void ilk_pfit_disable(const struct intel_crtc_state *old_crtc_state);
>  int bdw_get_pipe_misc_bpp(struct intel_crtc *crtc);
>  unsigned int intel_plane_fence_y_offset(const struct intel_plane_state *plane_state);
>  
> -bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
> -
>  struct intel_encoder *
>  intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
>  			   const struct intel_crtc_state *crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index 5af93235057c..5875af2b61e6 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -1283,6 +1283,16 @@ bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb)
>  		intel_fb_uses_dpt(&fb->base);
>  }
>  
> +bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
> +{
> +	struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
> +	struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
> +
> +	return DISPLAY_VER(dev_priv) < 4 ||
> +		(plane->fbc && !plane_state->no_fbc_reason &&
> +		 plane_state->view.gtt.type == I915_GTT_VIEW_NORMAL);
> +}
> +
>  static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation)
>  {
>  	if (drm_rotation_90_or_270(rotation))
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h
> index e6ef1783e351..63728520eb06 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.h
> +++ b/drivers/gpu/drm/i915/display/intel_fb.h
> @@ -77,6 +77,7 @@ u32 intel_plane_compute_aligned_offset(int *x, int *y,
>  				       int color_plane);
>  
>  bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb);
> +bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
>  bool intel_fb_supports_90_270_rotation(const struct intel_framebuffer *fb);
>  
>  int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *fb);

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-02-13 19:20 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 15:02 [PATCH 00/12] drm/i915: Hoist some stuff out from intel_display.c Ville Syrjala
2025-02-13 15:02 ` [PATCH 01/12] drm/i915: Move modeset_retry stuff into intel_connector.c Ville Syrjala
2025-02-13 19:11   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 02/12] drm/i915: Always initialize connector->modeset_retry_work Ville Syrjala
2025-02-13 19:11   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 03/12] drm/i915: Extract intel_connector_cancel_modeset_retry_work() Ville Syrjala
2025-02-13 19:12   ` Jani Nikula
2025-02-13 19:13   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 04/12] drm/i915: Extract intel_hdcp_cancel_works() Ville Syrjala
2025-02-13 19:14   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 05/12] drm/i915: Move intel_hpd_poll_fini() into intel_hotplug.c Ville Syrjala
2025-02-13 19:15   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 06/12] drm/i915: Move intel_plane_destroy() into intel_atomic_plane.c Ville Syrjala
2025-02-13 19:17   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 07/12] drm/i915: Relocate vlv_wait_port_ready() Ville Syrjala
2025-02-13 19:18   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 08/12] drm/i915: Simplify vlv_wait_port_ready() arguments Ville Syrjala
2025-02-13 19:19   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 09/12] drm/i915: Relocate intel_plane_uses_fence() Ville Syrjala
2025-02-13 19:20   ` Jani Nikula [this message]
2025-02-13 15:02 ` [PATCH 10/12] drm/i915: Relocate intel_{rotation, remapped}_info_size() Ville Syrjala
2025-02-13 19:21   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 11/12] drm/i915: Relocate some other plane fb related stuff into intel_fb.c Ville Syrjala
2025-02-13 19:22   ` Jani Nikula
2025-02-13 15:02 ` [PATCH 12/12] drm/i915: s/state/plane_state/ Ville Syrjala
2025-02-13 19:23   ` Jani Nikula
2025-02-13 15:25 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Hoist some stuff out from intel_display.c Patchwork
2025-02-13 15:25 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-13 15:44 ` ✗ i915.CI.BAT: failure " Patchwork
2025-02-14 18:22 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Hoist some stuff out from intel_display.c (rev2) Patchwork
2025-02-14 18:22 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-14 18:39 ` ✗ i915.CI.BAT: failure " Patchwork
2025-02-15  3:02 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Hoist some stuff out from intel_display.c (rev3) Patchwork
2025-02-15  3:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-15  3:18 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-15  6:56 ` ✗ i915.CI.Full: failure " 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=87tt8xwt1d.fsf@intel.com \
    --to=jani.nikula@linux.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