public inbox for intel-gfx@lists.freedesktop.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
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 07/12] drm/i915/vma: Add helpers to check GTT view type
Date: Wed, 08 Apr 2026 11:50:36 +0300	[thread overview]
Message-ID: <97be0c2c2ac61e38db7d41254b7fe54610ef26a4@intel.com> (raw)
In-Reply-To: <20260407155053.32156-8-ville.syrjala@linux.intel.com>

On Tue, 07 Apr 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> I915_GTT_VIEW_ROTATED is going away and being replaced by just
> I915_GTT_VIEW_REMAPPED, so we're going to need another way to
> determine if the view is rotated or not (since width/height
> will need to be swapped when operating on the destination
> coordinate space). Provide small helper functions to hide
> such implementation details from most of the code using GTT views.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Funny, I think I have these helpers in a branch somewhere too. :)

It's still not clear to me where we'll end up with this, since the file
is in i915 and used directly from xe core too, which is something we
want to get rid of. But seems like iterative improvement, so let's roll
with this.

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

> ---
>  drivers/gpu/drm/i915/i915_gtt_view_types.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gtt_view_types.h b/drivers/gpu/drm/i915/i915_gtt_view_types.h
> index c084f67bc880..9c4f38db32ff 100644
> --- a/drivers/gpu/drm/i915/i915_gtt_view_types.h
> +++ b/drivers/gpu/drm/i915/i915_gtt_view_types.h
> @@ -56,4 +56,19 @@ struct i915_gtt_view {
>  	};
>  };
>  
> +static inline bool i915_gtt_view_is_normal(const struct i915_gtt_view *view)
> +{
> +	return view->type == I915_GTT_VIEW_NORMAL;
> +}
> +
> +static inline bool i915_gtt_view_is_remapped(const struct i915_gtt_view *view)
> +{
> +	return view->type == I915_GTT_VIEW_REMAPPED;
> +}
> +
> +static inline bool i915_gtt_view_is_rotated(const struct i915_gtt_view *view)
> +{
> +	return view->type == I915_GTT_VIEW_ROTATED;
> +}
> +
>  #endif /* __I915_GTT_VIEW_TYPES_H__ */

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-04-08  8:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 15:50 [PATCH 00/12] drm/i915/fb: Prep work for more generic remapping support Ville Syrjala
2026-04-07 15:50 ` [PATCH 01/12] drm/i915/fb: Nuke intel_tile_row_size() Ville Syrjala
2026-04-08  8:42   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 02/12] drm/i915/fb: Make intel_fb_needs_pot_stride_remap() static Ville Syrjala
2026-04-08  8:43   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 03/12] drm/i915/fb: Reject per-plane remapping with DPT Ville Syrjala
2026-04-08  8:43   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 04/12] drm/xe/fb: Use the correct gtt view for remapped FBs Ville Syrjala
2026-04-08  8:44   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 05/12] drm/xe/fb: Remove weird VMA end alignemnt Ville Syrjala
2026-04-08  8:45   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 06/12] drm/xe/fb: Extract xe_dpt_size() Ville Syrjala
2026-04-08  8:47   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 07/12] drm/i915/vma: Add helpers to check GTT view type Ville Syrjala
2026-04-08  8:50   ` Jani Nikula [this message]
2026-04-08  9:11     ` Jani Nikula
2026-04-07 15:50 ` [PATCH 08/12] drm/xe/fb: Use i915_gtt_view_is_*() Ville Syrjala
2026-04-08  8:52   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 09/12] drm/i915/fb: " Ville Syrjala
2026-04-08  8:53   ` Jani Nikula
2026-04-07 15:50 ` [PATCH 10/12] drm/i915/selftests: Eliminate duplicate vma size check Ville Syrjala
2026-04-08  9:01   ` Jani Nikula
2026-04-08 11:28     ` Ville Syrjälä
2026-04-07 15:50 ` [PATCH 11/12] drm/i915/selftests: Use i915_gtt_view_is_*() Ville Syrjala
2026-04-08  9:03   ` Jani Nikula
2026-04-08  9:04     ` Jani Nikula
2026-04-07 15:50 ` [PATCH 12/12] drm/i915/fb: Use intel_fb_needs_pot_stride_remap() in intel_fb_view_init() Ville Syrjala
2026-04-08  9:09   ` Jani Nikula
2026-04-07 18:51 ` ✓ i915.CI.BAT: success for drm/i915/fb: Prep work for more generic remapping support Patchwork
2026-04-08  1:31 ` ✓ i915.CI.Full: " Patchwork
2026-04-10 11:25 ` [PATCH 00/12] " Ville Syrjälä

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=97be0c2c2ac61e38db7d41254b7fe54610ef26a4@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