* [PATCH 01/10] drm/intel: move i915_gtt_view_types.h to include/drm/intel
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-30 13:34 ` Ville Syrjälä
2026-09-15 20:09 ` [PATCH 02/10] drm/intel: rename i915_gtt_view_is_*() helpers to intel_gtt_view_is_*() Jani Nikula
` (12 subsequent siblings)
13 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
The i915 and xe drivers share i915_gtt_view_types.h from i915
source. Move it to include/drm/intel/gtt_view_types.h.
Remove the i915 compat header.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
drivers/gpu/drm/i915/i915_vma_types.h | 3 +--
| 7 -------
drivers/gpu/drm/xe/display/xe_fb_pin.c | 4 +---
.../drm/intel/gtt_view_types.h | 6 +++---
5 files changed, 6 insertions(+), 16 deletions(-)
delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
rename drivers/gpu/drm/i915/i915_gtt_view_types.h => include/drm/intel/gtt_view_types.h (93%)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index a5f18ac8a7d0..2a9f690c3d70 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -41,10 +41,10 @@
#include <drm/drm_panel.h>
#include <drm/drm_rect.h>
#include <drm/drm_vblank_work.h>
+#include <drm/intel/gtt_view_types.h>
#include <drm/intel/i915_hdcp_interface.h>
#include <uapi/drm/i915_drm.h>
-#include "i915_gtt_view_types.h"
#include "intel_bios.h"
#include "intel_display.h"
#include "intel_display_conversion.h"
diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h
index a499a3bea874..83fe02833b5e 100644
--- a/drivers/gpu/drm/i915/i915_vma_types.h
+++ b/drivers/gpu/drm/i915/i915_vma_types.h
@@ -29,11 +29,10 @@
#include <linux/rbtree.h>
#include <drm/drm_mm.h>
+#include <drm/intel/gtt_view_types.h>
#include "gem/i915_gem_object_types.h"
-#include "i915_gtt_view_types.h"
-
/**
* DOC: Global GTT views
*
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
deleted file mode 100644
index b261910cd6f9..000000000000
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/* Copyright © 2025 Intel Corporation */
-
-#include "../../i915/i915_gtt_view_types.h"
-
-/* Partial view not supported in xe, fail build if used. */
-#define I915_GTT_VIEW_PARTIAL
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index b46a2c32ac07..6fae8cc27aad 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -4,11 +4,9 @@
*/
#include <drm/intel/display_parent_interface.h>
+#include <drm/intel/gtt_view_types.h>
#include <drm/ttm/ttm_bo.h>
-/* FIXME move the types to parent interface? */
-#include "i915_gtt_view_types.h"
-
/* FIXME move intel_remapped_info_size() & co. to parent interface? */
#include "intel_fb.h"
diff --git a/drivers/gpu/drm/i915/i915_gtt_view_types.h b/include/drm/intel/gtt_view_types.h
similarity index 93%
rename from drivers/gpu/drm/i915/i915_gtt_view_types.h
rename to include/drm/intel/gtt_view_types.h
index 9c4f38db32ff..35a48932e5e8 100644
--- a/drivers/gpu/drm/i915/i915_gtt_view_types.h
+++ b/include/drm/intel/gtt_view_types.h
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: MIT */
/* Copyright © 2025 Intel Corporation */
-#ifndef __I915_GTT_VIEW_TYPES_H__
-#define __I915_GTT_VIEW_TYPES_H__
+#ifndef __DRM_INTEL_GTT_VIEW_TYPES_H__
+#define __DRM_INTEL_GTT_VIEW_TYPES_H__
#include <linux/types.h>
@@ -71,4 +71,4 @@ 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__ */
+#endif
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 01/10] drm/intel: move i915_gtt_view_types.h to include/drm/intel
2026-09-15 20:09 ` [PATCH 01/10] drm/intel: move i915_gtt_view_types.h to include/drm/intel Jani Nikula
@ 2026-09-30 13:34 ` Ville Syrjälä
0 siblings, 0 replies; 20+ messages in thread
From: Ville Syrjälä @ 2026-09-30 13:34 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, intel-xe
On Tue, Sep 15, 2026 at 11:09:12PM +0300, Jani Nikula wrote:
> The i915 and xe drivers share i915_gtt_view_types.h from i915
> source. Move it to include/drm/intel/gtt_view_types.h.
>
> Remove the i915 compat header.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
> drivers/gpu/drm/i915/i915_vma_types.h | 3 +--
> .../gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h | 7 -------
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 4 +---
> .../drm/intel/gtt_view_types.h | 6 +++---
> 5 files changed, 6 insertions(+), 16 deletions(-)
> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
> rename drivers/gpu/drm/i915/i915_gtt_view_types.h => include/drm/intel/gtt_view_types.h (93%)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index a5f18ac8a7d0..2a9f690c3d70 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -41,10 +41,10 @@
> #include <drm/drm_panel.h>
> #include <drm/drm_rect.h>
> #include <drm/drm_vblank_work.h>
> +#include <drm/intel/gtt_view_types.h>
> #include <drm/intel/i915_hdcp_interface.h>
> #include <uapi/drm/i915_drm.h>
>
> -#include "i915_gtt_view_types.h"
> #include "intel_bios.h"
> #include "intel_display.h"
> #include "intel_display_conversion.h"
> diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h
> index a499a3bea874..83fe02833b5e 100644
> --- a/drivers/gpu/drm/i915/i915_vma_types.h
> +++ b/drivers/gpu/drm/i915/i915_vma_types.h
> @@ -29,11 +29,10 @@
> #include <linux/rbtree.h>
>
> #include <drm/drm_mm.h>
> +#include <drm/intel/gtt_view_types.h>
>
> #include "gem/i915_gem_object_types.h"
>
> -#include "i915_gtt_view_types.h"
> -
> /**
> * DOC: Global GTT views
> *
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
> deleted file mode 100644
> index b261910cd6f9..000000000000
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -/* SPDX-License-Identifier: MIT */
> -/* Copyright © 2025 Intel Corporation */
> -
> -#include "../../i915/i915_gtt_view_types.h"
> -
> -/* Partial view not supported in xe, fail build if used. */
> -#define I915_GTT_VIEW_PARTIAL
> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> index b46a2c32ac07..6fae8cc27aad 100644
> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> @@ -4,11 +4,9 @@
> */
>
> #include <drm/intel/display_parent_interface.h>
> +#include <drm/intel/gtt_view_types.h>
> #include <drm/ttm/ttm_bo.h>
>
> -/* FIXME move the types to parent interface? */
> -#include "i915_gtt_view_types.h"
> -
> /* FIXME move intel_remapped_info_size() & co. to parent interface? */
> #include "intel_fb.h"
>
> diff --git a/drivers/gpu/drm/i915/i915_gtt_view_types.h b/include/drm/intel/gtt_view_types.h
> similarity index 93%
> rename from drivers/gpu/drm/i915/i915_gtt_view_types.h
> rename to include/drm/intel/gtt_view_types.h
> index 9c4f38db32ff..35a48932e5e8 100644
> --- a/drivers/gpu/drm/i915/i915_gtt_view_types.h
> +++ b/include/drm/intel/gtt_view_types.h
> @@ -1,8 +1,8 @@
> /* SPDX-License-Identifier: MIT */
> /* Copyright © 2025 Intel Corporation */
>
> -#ifndef __I915_GTT_VIEW_TYPES_H__
> -#define __I915_GTT_VIEW_TYPES_H__
> +#ifndef __DRM_INTEL_GTT_VIEW_TYPES_H__
> +#define __DRM_INTEL_GTT_VIEW_TYPES_H__
>
> #include <linux/types.h>
>
> @@ -71,4 +71,4 @@ 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__ */
> +#endif
Are we giving up on the "/* __WHATEVER__ */" stuff for the
multiple inclusion guards?
> --
> 2.47.3
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 02/10] drm/intel: rename i915_gtt_view_is_*() helpers to intel_gtt_view_is_*()
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
2026-09-15 20:09 ` [PATCH 01/10] drm/intel: move i915_gtt_view_types.h to include/drm/intel Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 03/10] drm/intel: rename i915_gtt_view* struct/enum to intel_gtt_view* Jani Nikula
` (11 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Make the i915_gtt_view_is_*() helpers less i915 specific, and rename
them intel_gtt_view_is_*().
$ sed -i 's/i915_gtt_view_is_/intel_gtt_view_is_/g' -- $(git grep -l i915_gtt_view_is_)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_fb.c | 8 ++++----
include/drm/intel/gtt_view_types.h | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index c3e4c3f6d8cf..63b7644c5659 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -1289,7 +1289,7 @@ bool intel_plane_uses_fence(const struct intel_plane_state *plane_state)
return intel_plane_needs_fence(display) ||
(plane->fbc && !plane_state->no_fbc_reason &&
- i915_gtt_view_is_normal(&plane_state->view.gtt));
+ intel_gtt_view_is_normal(&plane_state->view.gtt));
}
static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation)
@@ -1511,7 +1511,7 @@ static u32 calc_plane_remap_info(const struct intel_framebuffer *fb, int color_p
plane_view_height_tiles(fb, color_plane, dims, y));
}
- if (i915_gtt_view_is_rotated(&view->gtt)) {
+ if (intel_gtt_view_is_rotated(&view->gtt)) {
drm_WARN_ON(display->drm, remap_info->linear);
check_array_bounds(display, view->gtt.rotated.plane, color_plane);
@@ -1536,7 +1536,7 @@ static u32 calc_plane_remap_info(const struct intel_framebuffer *fb, int color_p
/* rotate the tile dimensions to match the GTT view */
swap(tile_width, tile_height);
} else {
- drm_WARN_ON(display->drm, !i915_gtt_view_is_remapped(&view->gtt));
+ drm_WARN_ON(display->drm, !intel_gtt_view_is_remapped(&view->gtt));
check_array_bounds(display, view->gtt.remapped.plane, color_plane);
@@ -1638,7 +1638,7 @@ static void intel_fb_view_init(struct intel_display *display,
memset(view, 0, sizeof(*view));
view->gtt.type = view_type;
- if (i915_gtt_view_is_remapped(&view->gtt) &&
+ if (intel_gtt_view_is_remapped(&view->gtt) &&
intel_fb_needs_pot_stride_remap(fb))
view->gtt.remapped.plane_alignment = SZ_2M / PAGE_SIZE;
}
diff --git a/include/drm/intel/gtt_view_types.h b/include/drm/intel/gtt_view_types.h
index 35a48932e5e8..a39f7cae733b 100644
--- a/include/drm/intel/gtt_view_types.h
+++ b/include/drm/intel/gtt_view_types.h
@@ -56,17 +56,17 @@ struct i915_gtt_view {
};
};
-static inline bool i915_gtt_view_is_normal(const struct i915_gtt_view *view)
+static inline bool intel_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)
+static inline bool intel_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)
+static inline bool intel_gtt_view_is_rotated(const struct i915_gtt_view *view)
{
return view->type == I915_GTT_VIEW_ROTATED;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 03/10] drm/intel: rename i915_gtt_view* struct/enum to intel_gtt_view*
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
2026-09-15 20:09 ` [PATCH 01/10] drm/intel: move i915_gtt_view_types.h to include/drm/intel Jani Nikula
2026-09-15 20:09 ` [PATCH 02/10] drm/intel: rename i915_gtt_view_is_*() helpers to intel_gtt_view_is_*() Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 04/10] drm/intel: add intel_gtt_view_is_partial() for completeness Jani Nikula
` (10 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Make enum i915_gtt_view_type and struct i915_gtt_view less i915
specific, and rename them enum intel_gtt_view_type and struct
intel_gtt_view, respectively.
$ sed -i 's/i915_gtt_view/intel_gtt_view/g' -- $(git grep -l i915_gtt_view)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
.../gpu/drm/i915/display/intel_display_types.h | 2 +-
drivers/gpu/drm/i915/display/intel_fb.c | 2 +-
drivers/gpu/drm/i915/display/intel_parent.c | 4 ++--
drivers/gpu/drm/i915/display/intel_parent.h | 6 +++---
drivers/gpu/drm/i915/gem/i915_gem_domain.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 6 +++---
drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 +-
.../gpu/drm/i915/gem/selftests/i915_gem_mman.c | 4 ++--
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
drivers/gpu/drm/i915/i915_gem.h | 6 +++---
drivers/gpu/drm/i915/i915_vma.c | 8 ++++----
drivers/gpu/drm/i915/i915_vma.h | 4 ++--
drivers/gpu/drm/i915/i915_vma_types.h | 16 ++++++++--------
drivers/gpu/drm/i915/selftests/i915_vma.c | 16 ++++++++--------
drivers/gpu/drm/xe/display/xe_fb_pin.c | 10 +++++-----
include/drm/intel/display_parent_interface.h | 8 ++++----
include/drm/intel/gtt_view_types.h | 12 ++++++------
17 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 2a9f690c3d70..60f7ab32ebb3 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -111,7 +111,7 @@ struct intel_fb_view {
* In the normal view the FB object's backing store sg list is used
* directly and hence the remap information here is not used.
*/
- struct i915_gtt_view gtt;
+ struct intel_gtt_view gtt;
/*
* The GTT view (gtt.type) specific information for each FB color
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 63b7644c5659..d1b4efa08bcc 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -1632,7 +1632,7 @@ calc_plane_normal_size(const struct intel_framebuffer *fb, int color_plane,
static void intel_fb_view_init(struct intel_display *display,
struct intel_fb_view *view,
- enum i915_gtt_view_type view_type,
+ enum intel_gtt_view_type view_type,
const struct intel_framebuffer *fb)
{
memset(view, 0, sizeof(*view));
diff --git a/drivers/gpu/drm/i915/display/intel_parent.c b/drivers/gpu/drm/i915/display/intel_parent.c
index 99cebb17763a..ed3e21b0a927 100644
--- a/drivers/gpu/drm/i915/display/intel_parent.c
+++ b/drivers/gpu/drm/i915/display/intel_parent.c
@@ -94,9 +94,9 @@ void intel_parent_fb_pin_dpt_unpin(struct intel_display *display,
struct i915_vma *intel_parent_fb_pin_reuse_vma(struct intel_display *display,
struct i915_vma *old_ggtt_vma,
struct drm_gem_object *old_obj,
- const struct i915_gtt_view *old_view,
+ const struct intel_gtt_view *old_view,
struct drm_gem_object *new_obj,
- const struct i915_gtt_view *new_view,
+ const struct intel_gtt_view *new_view,
u32 *out_offset)
{
if (!display->parent->fb_pin->reuse_vma)
diff --git a/drivers/gpu/drm/i915/display/intel_parent.h b/drivers/gpu/drm/i915/display/intel_parent.h
index cc4a58f63166..923cb6464a98 100644
--- a/drivers/gpu/drm/i915/display/intel_parent.h
+++ b/drivers/gpu/drm/i915/display/intel_parent.h
@@ -11,12 +11,12 @@ struct dma_fence;
struct drm_file;
struct drm_gem_object;
struct drm_scanout_buffer;
-struct i915_gtt_view;
struct i915_vma;
struct intel_display;
struct intel_dpt;
struct intel_fb_pin_params;
struct intel_frontbuffer;
+struct intel_gtt_view;
struct intel_hdcp_gsc_context;
struct intel_panic;
struct intel_stolen_node;
@@ -53,9 +53,9 @@ void intel_parent_fb_pin_dpt_unpin(struct intel_display *display,
struct i915_vma *intel_parent_fb_pin_reuse_vma(struct intel_display *display,
struct i915_vma *old_ggtt_vma,
struct drm_gem_object *old_obj,
- const struct i915_gtt_view *old_view,
+ const struct intel_gtt_view *old_view,
struct drm_gem_object *new_obj,
- const struct i915_gtt_view *new_view,
+ const struct intel_gtt_view *new_view,
u32 *out_offset);
void intel_parent_fb_pin_get_map(struct intel_display *display,
struct i915_vma *vma, struct iosys_map *map);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
index b7297c0a3a48..0cb41704e54e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
@@ -421,7 +421,7 @@ struct i915_vma *
i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
struct i915_gem_ww_ctx *ww,
u32 alignment, unsigned int guard,
- const struct i915_gtt_view *view,
+ const struct intel_gtt_view *view,
unsigned int flags)
{
struct drm_i915_private *i915 = to_i915(obj->base.dev);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 9ca90c1bb5b4..ee8fbbcbb5fe 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -196,12 +196,12 @@ int i915_gem_mmap_gtt_version(void)
return 5;
}
-static inline struct i915_gtt_view
+static inline struct intel_gtt_view
compute_partial_view(const struct drm_i915_gem_object *obj,
pgoff_t page_offset,
unsigned int chunk)
{
- struct i915_gtt_view view;
+ struct intel_gtt_view view;
if (i915_gem_object_is_tiled(obj))
chunk = roundup(chunk, tile_row_pages(obj) ?: 1);
@@ -391,7 +391,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
PIN_NOEVICT);
if (IS_ERR(vma) && vma != ERR_PTR(-EDEADLK)) {
/* Use a partial view if it is bigger than available space */
- struct i915_gtt_view view =
+ struct intel_gtt_view view =
compute_partial_view(obj, page_offset, MIN_CHUNK_PAGES);
unsigned int flags;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index 2c5d20e4dbaf..a2f4b6758a65 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -776,7 +776,7 @@ struct i915_vma * __must_check
i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
struct i915_gem_ww_ctx *ww,
u32 alignment, unsigned int guard,
- const struct i915_gtt_view *view,
+ const struct intel_gtt_view *view,
unsigned int flags);
void i915_gem_object_make_unshrinkable(struct drm_i915_gem_object *obj);
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
index d01acfb7d93d..4d49fd6c15e3 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
@@ -97,7 +97,7 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj,
{
const unsigned long npages = obj->base.size / PAGE_SIZE;
struct drm_i915_private *i915 = to_i915(obj->base.dev);
- struct i915_gtt_view view;
+ struct intel_gtt_view view;
struct i915_vma *vma;
unsigned long offset;
unsigned long page;
@@ -214,7 +214,7 @@ static int check_partial_mappings(struct drm_i915_gem_object *obj,
}
for_each_prime_number_from(page, 1, npages) {
- struct i915_gtt_view view =
+ struct intel_gtt_view view =
compute_partial_view(obj, page, MIN_CHUNK_PAGES);
unsigned long offset;
u32 __iomem *io;
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a432daf8038a..62987ae59a50 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -902,7 +902,7 @@ static void discard_ggtt_vma(struct i915_vma *vma)
struct i915_vma *
i915_gem_object_ggtt_pin_ww(struct drm_i915_gem_object *obj,
struct i915_gem_ww_ctx *ww,
- const struct i915_gtt_view *view,
+ const struct intel_gtt_view *view,
u64 size, u64 alignment, u64 flags)
{
struct drm_i915_private *i915 = to_i915(obj->base.dev);
@@ -1004,7 +1004,7 @@ i915_gem_object_ggtt_pin_ww(struct drm_i915_gem_object *obj,
struct i915_vma * __must_check
i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
- const struct i915_gtt_view *view,
+ const struct intel_gtt_view *view,
u64 size, u64 alignment, u64 flags)
{
struct i915_gem_ww_ctx ww;
diff --git a/drivers/gpu/drm/i915/i915_gem.h b/drivers/gpu/drm/i915/i915_gem.h
index 20b3cb29cfff..80d9758fe684 100644
--- a/drivers/gpu/drm/i915/i915_gem.h
+++ b/drivers/gpu/drm/i915/i915_gem.h
@@ -36,8 +36,8 @@ struct drm_file;
struct drm_i915_gem_object;
struct drm_i915_private;
struct i915_gem_ww_ctx;
-struct i915_gtt_view;
struct i915_vma;
+struct intel_gtt_view;
#define I915_GEM_GPU_DOMAINS \
(I915_GEM_DOMAIN_RENDER | \
@@ -55,12 +55,12 @@ void i915_gem_drain_workqueue(struct drm_i915_private *i915);
struct i915_vma * __must_check
i915_gem_object_ggtt_pin_ww(struct drm_i915_gem_object *obj,
struct i915_gem_ww_ctx *ww,
- const struct i915_gtt_view *view,
+ const struct intel_gtt_view *view,
u64 size, u64 alignment, u64 flags);
struct i915_vma * __must_check
i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
- const struct i915_gtt_view *view,
+ const struct intel_gtt_view *view,
u64 size, u64 alignment, u64 flags);
int i915_gem_object_unbind(struct drm_i915_gem_object *obj,
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index afc192d9931b..61ddfa5d2895 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -147,7 +147,7 @@ static void __i915_vma_retire(struct i915_active *ref)
static struct i915_vma *
vma_create(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
- const struct i915_gtt_view *view)
+ const struct intel_gtt_view *view)
{
struct i915_vma *pos = ERR_PTR(-E2BIG);
struct i915_vma *vma;
@@ -286,7 +286,7 @@ vma_create(struct drm_i915_gem_object *obj,
static struct i915_vma *
i915_vma_lookup(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
- const struct i915_gtt_view *view)
+ const struct intel_gtt_view *view)
{
struct rb_node *rb;
@@ -324,7 +324,7 @@ i915_vma_lookup(struct drm_i915_gem_object *obj,
struct i915_vma *
i915_vma_instance(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
- const struct i915_gtt_view *view)
+ const struct intel_gtt_view *view)
{
struct i915_vma *vma;
@@ -1267,7 +1267,7 @@ intel_remap_pages(struct intel_remapped_info *rem_info,
}
static noinline struct sg_table *
-intel_partial_pages(const struct i915_gtt_view *view,
+intel_partial_pages(const struct intel_gtt_view *view,
struct drm_i915_gem_object *obj)
{
struct sg_table *st;
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index 892306ab935d..a8a89bb0270c 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -43,7 +43,7 @@
struct i915_vma *
i915_vma_instance(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
- const struct i915_gtt_view *view);
+ const struct intel_gtt_view *view);
void i915_vma_unpin_and_release(struct i915_vma **p_vma, unsigned int flags);
#define I915_VMA_RELEASE_MAP BIT(0)
@@ -207,7 +207,7 @@ static inline void i915_vma_put(struct i915_vma *vma)
static inline long
i915_vma_compare(struct i915_vma *vma,
struct i915_address_space *vm,
- const struct i915_gtt_view *view)
+ const struct intel_gtt_view *view)
{
ptrdiff_t cmp;
diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h
index 83fe02833b5e..8815421eaefb 100644
--- a/drivers/gpu/drm/i915/i915_vma_types.h
+++ b/drivers/gpu/drm/i915/i915_vma_types.h
@@ -66,22 +66,22 @@
* Implementation and usage
*
* GGTT views are implemented using VMAs and are distinguished via enum
- * i915_gtt_view_type and struct i915_gtt_view.
+ * intel_gtt_view_type and struct intel_gtt_view.
*
* A new flavour of core GEM functions which work with GGTT bound objects were
* added with the _ggtt_ infix, and sometimes with _view postfix to avoid
- * renaming in large amounts of code. They take the struct i915_gtt_view
+ * renaming in large amounts of code. They take the struct intel_gtt_view
* parameter encapsulating all metadata required to implement a view.
*
* As a helper for callers which are only interested in the normal view,
- * globally const i915_gtt_view_normal singleton instance exists. All old core
+ * globally const intel_gtt_view_normal singleton instance exists. All old core
* GEM API functions, the ones not taking the view parameter, are operating on,
* or with the normal GGTT view.
*
* Code wanting to add or use a new GGTT view needs to:
*
* 1. Add a new enum with a suitable name.
- * 2. Extend the metadata in the i915_gtt_view structure if required.
+ * 2. Extend the metadata in the intel_gtt_view structure if required.
* 3. Add support to i915_get_vma_pages().
*
* New views are required to build a scatter-gather table from within the
@@ -89,7 +89,7 @@
* exists for the lifetime of an VMA.
*
* Core API is designed to have copy semantics which means that passed in
- * struct i915_gtt_view does not need to be persistent (left around after
+ * struct intel_gtt_view does not need to be persistent (left around after
* calling the core API functions).
*
*/
@@ -111,7 +111,7 @@ static inline void assert_i915_gem_gtt_types(void)
/* As we encode the size of each branch inside the union into its type,
* we have to be careful that each branch has a unique size.
*/
- switch ((enum i915_gtt_view_type)0) {
+ switch ((enum intel_gtt_view_type)0) {
case I915_GTT_VIEW_NORMAL:
case I915_GTT_VIEW_PARTIAL:
case I915_GTT_VIEW_ROTATED:
@@ -230,11 +230,11 @@ struct i915_vma {
/**
* Support different GGTT views into the same object.
* This means there can be multiple VMA mappings per object and per VM.
- * i915_gtt_view_type is used to distinguish between those entries.
+ * intel_gtt_view_type is used to distinguish between those entries.
* The default one of zero (I915_GTT_VIEW_NORMAL) is default and also
* assumed in GEM functions which take no ggtt view parameter.
*/
- struct i915_gtt_view gtt_view;
+ struct intel_gtt_view gtt_view;
/** This object's place on the active/inactive lists */
struct list_head vm_link;
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
index 7c4111e60f2e..b16297a6a4e8 100644
--- a/drivers/gpu/drm/i915/selftests/i915_vma.c
+++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
@@ -63,7 +63,7 @@ static bool assert_vma(struct i915_vma *vma,
static struct i915_vma *
checked_vma_instance(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
- const struct i915_gtt_view *view)
+ const struct intel_gtt_view *view)
{
struct i915_vma *vma;
bool ok = true;
@@ -533,7 +533,7 @@ assert_remapped(struct drm_i915_gem_object *obj,
return sg;
}
-static unsigned int remapped_size(enum i915_gtt_view_type view_type,
+static unsigned int remapped_size(enum intel_gtt_view_type view_type,
const struct intel_remapped_plane_info *a,
const struct intel_remapped_plane_info *b)
{
@@ -572,7 +572,7 @@ static int igt_vma_rotate_remap(void *arg)
{ }
}, *a, *b;
- enum i915_gtt_view_type types[] = {
+ enum intel_gtt_view_type types[] = {
I915_GTT_VIEW_ROTATED,
I915_GTT_VIEW_REMAPPED,
0,
@@ -592,7 +592,7 @@ static int igt_vma_rotate_remap(void *arg)
for (t = types; *t; t++) {
for (a = planes; a->width; a++) {
for (b = planes + ARRAY_SIZE(planes); b-- != planes; ) {
- struct i915_gtt_view view = {
+ struct intel_gtt_view view = {
.type = *t,
.remapped.plane[0] = *a,
.remapped.plane[1] = *b,
@@ -745,7 +745,7 @@ static bool assert_partial(struct drm_i915_gem_object *obj,
}
static bool assert_pin(struct i915_vma *vma,
- struct i915_gtt_view *view,
+ struct intel_gtt_view *view,
u64 size,
const char *name)
{
@@ -823,7 +823,7 @@ static int igt_vma_partial(void *arg)
nvma = 0;
for_each_prime_number_from(sz, 1, npages) {
for_each_prime_number_from(offset, 0, npages - sz) {
- struct i915_gtt_view view;
+ struct intel_gtt_view view;
view.type = I915_GTT_VIEW_PARTIAL;
view.partial.offset = offset;
@@ -981,7 +981,7 @@ static int igt_vma_remapped_gtt(void *arg)
{ }
}, *p;
- enum i915_gtt_view_type types[] = {
+ enum intel_gtt_view_type types[] = {
I915_GTT_VIEW_ROTATED,
I915_GTT_VIEW_REMAPPED,
0,
@@ -1001,7 +1001,7 @@ static int igt_vma_remapped_gtt(void *arg)
for (t = types; *t; t++) {
for (p = planes; p->width; p++) {
- struct i915_gtt_view view = {
+ struct intel_gtt_view view = {
.type = *t,
.rotated.plane[0] = *p,
};
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index 6fae8cc27aad..1402e76102fa 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -148,7 +148,7 @@ static int __xe_pin_fb_vma_dpt(struct drm_gem_object *obj,
struct xe_device *xe = to_xe_device(obj->dev);
struct xe_tile *tile0 = xe_device_get_root_tile(xe);
struct xe_ggtt *ggtt = tile0->mem.ggtt;
- const struct i915_gtt_view *view = pin_params->view;
+ const struct intel_gtt_view *view = pin_params->view;
struct xe_bo *bo = gem_to_xe_bo(obj), *dpt;
u32 dpt_size, size = bo->ttm.base.size;
@@ -231,7 +231,7 @@ write_ggtt_rotated(struct xe_ggtt *ggtt, u32 *ggtt_ofs,
}
struct fb_rotate_args {
- const struct i915_gtt_view *view;
+ const struct intel_gtt_view *view;
struct xe_bo *bo;
};
@@ -256,7 +256,7 @@ static int __xe_pin_fb_vma_ggtt(struct drm_gem_object *obj,
const struct intel_fb_pin_params *pin_params,
struct i915_vma *vma)
{
- const struct i915_gtt_view *view = pin_params->view;
+ const struct intel_gtt_view *view = pin_params->view;
struct xe_bo *bo = gem_to_xe_bo(obj);
struct xe_device *xe = to_xe_device(obj->dev);
struct xe_tile *tile0 = xe_device_get_root_tile(xe);
@@ -457,9 +457,9 @@ static void xe_fb_pin_dpt_unpin(struct intel_dpt *dpt,
static struct i915_vma *
xe_fb_pin_reuse_vma(struct i915_vma *old_ggtt_vma,
struct drm_gem_object *old_obj,
- const struct i915_gtt_view *old_view,
+ const struct intel_gtt_view *old_view,
struct drm_gem_object *new_obj,
- const struct i915_gtt_view *new_view,
+ const struct intel_gtt_view *new_view,
u32 *out_offset)
{
if (old_ggtt_vma && old_obj == new_obj &&
diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
index 5e44c022d1ae..bc43d8b15827 100644
--- a/include/drm/intel/display_parent_interface.h
+++ b/include/drm/intel/display_parent_interface.h
@@ -16,11 +16,11 @@ struct drm_mode_fb_cmd2;
struct drm_plane_state;
struct drm_scanout_buffer;
struct fb_info;
-struct i915_gtt_view;
struct i915_vma;
struct intel_dpt;
struct intel_dsb_buffer;
struct intel_frontbuffer;
+struct intel_gtt_view;
struct intel_hdcp_gsc_context;
struct intel_initial_plane_config;
struct intel_panic;
@@ -31,7 +31,7 @@ struct seq_file;
struct vm_area_struct;
struct intel_fb_pin_params {
- const struct i915_gtt_view *view;
+ const struct intel_gtt_view *view;
unsigned int alignment;
unsigned int phys_alignment;
unsigned int vtd_guard;
@@ -101,9 +101,9 @@ struct intel_display_fb_pin_interface {
struct i915_vma *ggtt_vma);
struct i915_vma *(*reuse_vma)(struct i915_vma *old_ggtt_vma,
struct drm_gem_object *old_obj,
- const struct i915_gtt_view *old_view,
+ const struct intel_gtt_view *old_view,
struct drm_gem_object *new_obj,
- const struct i915_gtt_view *new_view,
+ const struct intel_gtt_view *new_view,
u32 *out_offset);
void (*get_map)(struct i915_vma *vma, struct iosys_map *map);
};
diff --git a/include/drm/intel/gtt_view_types.h b/include/drm/intel/gtt_view_types.h
index a39f7cae733b..2f1793a31b1a 100644
--- a/include/drm/intel/gtt_view_types.h
+++ b/include/drm/intel/gtt_view_types.h
@@ -39,15 +39,15 @@ struct intel_remapped_info {
u32 plane_alignment;
} __packed;
-enum i915_gtt_view_type {
+enum intel_gtt_view_type {
I915_GTT_VIEW_NORMAL = 0,
I915_GTT_VIEW_ROTATED = sizeof(struct intel_rotation_info),
I915_GTT_VIEW_PARTIAL = sizeof(struct intel_partial_info),
I915_GTT_VIEW_REMAPPED = sizeof(struct intel_remapped_info),
};
-struct i915_gtt_view {
- enum i915_gtt_view_type type;
+struct intel_gtt_view {
+ enum intel_gtt_view_type type;
union {
/* Members need to contain no holes/padding */
struct intel_partial_info partial;
@@ -56,17 +56,17 @@ struct i915_gtt_view {
};
};
-static inline bool intel_gtt_view_is_normal(const struct i915_gtt_view *view)
+static inline bool intel_gtt_view_is_normal(const struct intel_gtt_view *view)
{
return view->type == I915_GTT_VIEW_NORMAL;
}
-static inline bool intel_gtt_view_is_remapped(const struct i915_gtt_view *view)
+static inline bool intel_gtt_view_is_remapped(const struct intel_gtt_view *view)
{
return view->type == I915_GTT_VIEW_REMAPPED;
}
-static inline bool intel_gtt_view_is_rotated(const struct i915_gtt_view *view)
+static inline bool intel_gtt_view_is_rotated(const struct intel_gtt_view *view)
{
return view->type == I915_GTT_VIEW_ROTATED;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 04/10] drm/intel: add intel_gtt_view_is_partial() for completeness
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (2 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 03/10] drm/intel: rename i915_gtt_view* struct/enum to intel_gtt_view* Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 05/10] drm/xe/display: use intel_gtt_view_is_*() helpers more Jani Nikula
` (9 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
There's a helper for all other view types, add one for
intel_gtt_view_is_partial() too.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/intel/gtt_view_types.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/drm/intel/gtt_view_types.h b/include/drm/intel/gtt_view_types.h
index 2f1793a31b1a..d235a3ad50c3 100644
--- a/include/drm/intel/gtt_view_types.h
+++ b/include/drm/intel/gtt_view_types.h
@@ -71,4 +71,9 @@ static inline bool intel_gtt_view_is_rotated(const struct intel_gtt_view *view)
return view->type == I915_GTT_VIEW_ROTATED;
}
+static inline bool intel_gtt_view_is_partial(const struct intel_gtt_view *view)
+{
+ return view->type == I915_GTT_VIEW_PARTIAL;
+}
+
#endif
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 05/10] drm/xe/display: use intel_gtt_view_is_*() helpers more
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (3 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 04/10] drm/intel: add intel_gtt_view_is_partial() for completeness Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 06/10] drm/i915/gem: " Jani Nikula
` (8 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
view type directly.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/xe/display/xe_fb_pin.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index 1402e76102fa..15fbd3fe6cbb 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -152,9 +152,9 @@ static int __xe_pin_fb_vma_dpt(struct drm_gem_object *obj,
struct xe_bo *bo = gem_to_xe_bo(obj), *dpt;
u32 dpt_size, size = bo->ttm.base.size;
- if (view->type == I915_GTT_VIEW_NORMAL)
+ if (intel_gtt_view_is_normal(view))
dpt_size = ALIGN(size / XE_PAGE_SIZE * 8, XE_PAGE_SIZE);
- else if (view->type == I915_GTT_VIEW_REMAPPED)
+ else if (intel_gtt_view_is_remapped(view))
dpt_size = ALIGN(intel_remapped_info_size(&view->remapped) * 8,
XE_PAGE_SIZE);
else
@@ -173,7 +173,7 @@ static int __xe_pin_fb_vma_dpt(struct drm_gem_object *obj,
if (IS_ERR(dpt))
return PTR_ERR(dpt);
- if (view->type == I915_GTT_VIEW_NORMAL) {
+ if (intel_gtt_view_is_normal(view)) {
u64 pte = xe_ggtt_encode_pte_flags(ggtt, bo, xe_cache_pat_idx(xe, XE_CACHE_NONE));
u32 x;
@@ -182,7 +182,7 @@ static int __xe_pin_fb_vma_dpt(struct drm_gem_object *obj,
iosys_map_wr(&dpt->vmap, x * 8, u64, pte | addr);
}
- } else if (view->type == I915_GTT_VIEW_REMAPPED) {
+ } else if (intel_gtt_view_is_remapped(view)) {
write_dpt_remapped(bo, &view->remapped, &dpt->vmap);
} else {
const struct intel_rotation_info *rot_info = &view->rotated;
@@ -275,7 +275,7 @@ static int __xe_pin_fb_vma_ggtt(struct drm_gem_object *obj,
align = max(align, SZ_64K);
/* Fast case, preallocated GGTT view? */
- if (bo->ggtt_node[tile0->id] && view->type == I915_GTT_VIEW_NORMAL) {
+ if (bo->ggtt_node[tile0->id] && intel_gtt_view_is_normal(view)) {
vma->node = bo->ggtt_node[tile0->id];
return 0;
}
@@ -283,7 +283,7 @@ static int __xe_pin_fb_vma_ggtt(struct drm_gem_object *obj,
/* TODO: Consider sharing framebuffer mapping?
* embed i915_vma inside intel_framebuffer
*/
- if (view->type == I915_GTT_VIEW_NORMAL)
+ if (intel_gtt_view_is_normal(view))
size = xe_bo_size(bo);
else
/* display uses tiles instead of bytes here, so convert it back.. */
@@ -292,7 +292,7 @@ static int __xe_pin_fb_vma_ggtt(struct drm_gem_object *obj,
pte = xe_ggtt_encode_pte_flags(ggtt, bo, xe_cache_pat_idx(xe, XE_CACHE_NONE));
vma->node = xe_ggtt_insert_node_transform(ggtt, bo, pte,
ALIGN(size, align), align,
- view->type == I915_GTT_VIEW_NORMAL ?
+ intel_gtt_view_is_normal(view) ?
NULL : write_ggtt_rotated_node,
&(struct fb_rotate_args){view, bo});
if (IS_ERR(vma->node))
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 06/10] drm/i915/gem: use intel_gtt_view_is_*() helpers more
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (4 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 05/10] drm/xe/display: use intel_gtt_view_is_*() helpers more Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 07/10] drm/i915/vma: " Jani Nikula
` (7 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
view type directly.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_domain.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +-
drivers/gpu/drm/i915/i915_gem.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
index 0cb41704e54e..9a82ed77ccaf 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
@@ -462,7 +462,7 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
*/
vma = ERR_PTR(-ENOSPC);
if ((flags & PIN_MAPPABLE) == 0 &&
- (!view || view->type == I915_GTT_VIEW_NORMAL))
+ (!view || intel_gtt_view_is_normal(view)))
vma = i915_gem_object_ggtt_pin_ww(obj, ww, view, 0, alignment,
flags | PIN_MAPPABLE |
PIN_NONBLOCK);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index ee8fbbcbb5fe..055f8d3161da 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -396,7 +396,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
unsigned int flags;
flags = PIN_MAPPABLE | PIN_NOSEARCH;
- if (view.type == I915_GTT_VIEW_NORMAL)
+ if (intel_gtt_view_is_normal(&view))
flags |= PIN_NONBLOCK; /* avoid warnings for pinned */
/*
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 62987ae59a50..1209d5f1fc8d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -913,7 +913,7 @@ i915_gem_object_ggtt_pin_ww(struct drm_i915_gem_object *obj,
GEM_WARN_ON(!ww);
if (flags & PIN_MAPPABLE &&
- (!view || view->type == I915_GTT_VIEW_NORMAL)) {
+ (!view || intel_gtt_view_is_normal(view))) {
/*
* If the required space is larger than the available
* aperture, we will not able to find a slot for the
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 07/10] drm/i915/vma: use intel_gtt_view_is_*() helpers more
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (5 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 06/10] drm/i915/gem: " Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 08/10] drm/i915/selftests: " Jani Nikula
` (6 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
view type directly.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_vma.c | 36 +++++++++++----------------------
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 61ddfa5d2895..16782d8579a8 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -179,9 +179,9 @@ vma_create(struct drm_i915_gem_object *obj,
INIT_LIST_HEAD(&vma->obj_link);
RB_CLEAR_NODE(&vma->obj_node);
- if (view && view->type != I915_GTT_VIEW_NORMAL) {
+ if (view && !intel_gtt_view_is_normal(view)) {
vma->gtt_view = *view;
- if (view->type == I915_GTT_VIEW_PARTIAL) {
+ if (intel_gtt_view_is_partial(view)) {
GEM_BUG_ON(range_overflows_t(u64,
view->partial.offset,
view->partial.size,
@@ -189,10 +189,10 @@ vma_create(struct drm_i915_gem_object *obj,
vma->size = view->partial.size;
vma->size <<= PAGE_SHIFT;
GEM_BUG_ON(vma->size > obj->base.size);
- } else if (view->type == I915_GTT_VIEW_ROTATED) {
+ } else if (intel_gtt_view_is_rotated(view)) {
vma->size = intel_rotation_info_size(&view->rotated);
vma->size <<= PAGE_SHIFT;
- } else if (view->type == I915_GTT_VIEW_REMAPPED) {
+ } else if (intel_gtt_view_is_remapped(view)) {
vma->size = intel_remapped_info_size(&view->remapped);
vma->size <<= PAGE_SHIFT;
}
@@ -1311,27 +1311,15 @@ __i915_vma_get_pages(struct i915_vma *vma)
*/
GEM_BUG_ON(!i915_gem_object_has_pinned_pages(vma->obj));
- switch (vma->gtt_view.type) {
- default:
- GEM_BUG_ON(vma->gtt_view.type);
- fallthrough;
- case I915_GTT_VIEW_NORMAL:
- pages = vma->obj->mm.pages;
- break;
-
- case I915_GTT_VIEW_ROTATED:
- pages =
- intel_rotate_pages(&vma->gtt_view.rotated, vma->obj);
- break;
-
- case I915_GTT_VIEW_REMAPPED:
- pages =
- intel_remap_pages(&vma->gtt_view.remapped, vma->obj);
- break;
-
- case I915_GTT_VIEW_PARTIAL:
+ if (intel_gtt_view_is_rotated(&vma->gtt_view)) {
+ pages = intel_rotate_pages(&vma->gtt_view.rotated, vma->obj);
+ } else if (intel_gtt_view_is_remapped(&vma->gtt_view)) {
+ pages = intel_remap_pages(&vma->gtt_view.remapped, vma->obj);
+ } else if (intel_gtt_view_is_partial(&vma->gtt_view)) {
pages = intel_partial_pages(&vma->gtt_view, vma->obj);
- break;
+ } else {
+ GEM_BUG_ON(!intel_gtt_view_is_normal(&vma->gtt_view));
+ pages = vma->obj->mm.pages;
}
if (IS_ERR(pages)) {
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 08/10] drm/i915/selftests: use intel_gtt_view_is_*() helpers more
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (6 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 07/10] drm/i915/vma: " Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:14 ` sashiko-bot
2026-09-30 10:34 ` [PATCH v2] " Jani Nikula
2026-09-15 20:09 ` [PATCH 09/10] drm/i915/debugfs: use the " Jani Nikula
` (5 subsequent siblings)
13 siblings, 2 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
view type directly.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_vma.c | 34 +++++++++++------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
index b16297a6a4e8..ca340a94f772 100644
--- a/drivers/gpu/drm/i915/selftests/i915_vma.c
+++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
@@ -51,7 +51,7 @@ static bool assert_vma(struct i915_vma *vma,
ok = false;
}
- if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
+ if (!intel_gtt_view_is_normal(&vma->gtt_view)) {
pr_err("VMA created with wrong type [%d]\n",
vma->gtt_view.type);
ok = false;
@@ -533,12 +533,12 @@ assert_remapped(struct drm_i915_gem_object *obj,
return sg;
}
-static unsigned int remapped_size(enum intel_gtt_view_type view_type,
+static unsigned int remapped_size(const struct intel_gtt_view *view,
const struct intel_remapped_plane_info *a,
const struct intel_remapped_plane_info *b)
{
- if (view_type == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(view))
return a->dst_stride * a->width + b->dst_stride * b->width;
else
return a->dst_stride * a->height + b->dst_stride * b->height;
@@ -606,11 +606,11 @@ static int igt_vma_rotate_remap(void *arg)
max_offset = max_pages - max_offset;
if (!plane_info[0].dst_stride)
- plane_info[0].dst_stride = view.type == I915_GTT_VIEW_ROTATED ?
+ plane_info[0].dst_stride = intel_gtt_view_is_rotated(&view) ?
plane_info[0].height :
plane_info[0].width;
if (!plane_info[1].dst_stride)
- plane_info[1].dst_stride = view.type == I915_GTT_VIEW_ROTATED ?
+ plane_info[1].dst_stride = intel_gtt_view_is_rotated(&view) ?
plane_info[1].height :
plane_info[1].width;
@@ -632,9 +632,9 @@ static int igt_vma_rotate_remap(void *arg)
goto out_object;
}
- expected_pages = remapped_size(view.type, &plane_info[0], &plane_info[1]);
+ expected_pages = remapped_size(&view, &plane_info[0], &plane_info[1]);
- if (view.type == I915_GTT_VIEW_ROTATED &&
+ if (intel_gtt_view_is_rotated(&view) &&
vma->size != expected_pages * PAGE_SIZE) {
pr_err("VMA is wrong size, expected %lu, found %llu\n",
PAGE_SIZE * expected_pages, vma->size);
@@ -642,7 +642,7 @@ static int igt_vma_rotate_remap(void *arg)
goto out_object;
}
- if (view.type == I915_GTT_VIEW_REMAPPED &&
+ if (intel_gtt_view_is_remapped(&view) &&
vma->size > expected_pages * PAGE_SIZE) {
pr_err("VMA is wrong size, expected %lu, found %llu\n",
PAGE_SIZE * expected_pages, vma->size);
@@ -672,13 +672,13 @@ static int igt_vma_rotate_remap(void *arg)
sg = vma->pages->sgl;
for (n = 0; n < ARRAY_SIZE(view.rotated.plane); n++) {
- if (view.type == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(&view))
sg = assert_rotated(obj, &view.rotated, n, sg);
else
sg = assert_remapped(obj, &view.remapped, n, sg);
if (IS_ERR(sg)) {
pr_err("Inconsistent %s VMA pages for plane %d: [(%d, %d, %d, %d, %d), (%d, %d, %d, %d, %d)]\n",
- view.type == I915_GTT_VIEW_ROTATED ?
+ intel_gtt_view_is_rotated(&view) ?
"rotated" : "remapped", n,
plane_info[0].width,
plane_info[0].height,
@@ -763,7 +763,7 @@ static bool assert_pin(struct i915_vma *vma,
ok = false;
}
- if (view && view->type != I915_GTT_VIEW_NORMAL) {
+ if (view && !intel_gtt_view_is_normal(view)) {
if (memcmp(&vma->gtt_view, view, sizeof(*view))) {
pr_err("(%s) VMA mismatch upon creation!\n",
name);
@@ -776,7 +776,7 @@ static bool assert_pin(struct i915_vma *vma,
ok = false;
}
} else {
- if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
+ if (!intel_gtt_view_is_normal(&vma->gtt_view)) {
pr_err("Not the normal ggtt view! Found %d\n",
vma->gtt_view.type);
ok = false;
@@ -1017,7 +1017,7 @@ static int igt_vma_remapped_gtt(void *arg)
goto out;
if (!plane_info[0].dst_stride)
- plane_info[0].dst_stride = *t == I915_GTT_VIEW_ROTATED ?
+ plane_info[0].dst_stride = intel_gtt_view_is_rotated(&view) ?
p->height : p->width;
vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE);
@@ -1040,7 +1040,7 @@ static int igt_vma_remapped_gtt(void *arg)
unsigned int offset;
u32 val = y << 16 | x;
- if (*t == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(&vma->gtt_view))
offset = (x * plane_info[0].dst_stride + y) * PAGE_SIZE;
else
offset = (y * plane_info[0].dst_stride + x) * PAGE_SIZE;
@@ -1057,7 +1057,7 @@ static int igt_vma_remapped_gtt(void *arg)
goto out;
}
- GEM_BUG_ON(vma->gtt_view.type != I915_GTT_VIEW_NORMAL);
+ GEM_BUG_ON(!intel_gtt_view_is_normal(&vma->gtt_view));
map = i915_vma_pin_iomap(vma);
i915_vma_unpin(vma);
@@ -1072,7 +1072,7 @@ static int igt_vma_remapped_gtt(void *arg)
u32 exp = y << 16 | x;
u32 val;
- if (*t == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(&vma->gtt_view))
src_idx = rotated_index(&view.rotated, 0, x, y);
else
src_idx = remapped_index(&view.remapped, 0, x, y);
@@ -1081,7 +1081,7 @@ static int igt_vma_remapped_gtt(void *arg)
val = ioread32(&map[offset / sizeof(*map)]);
if (val != exp) {
pr_err("%s VMA write test failed, expected 0x%x, found 0x%x\n",
- *t == I915_GTT_VIEW_ROTATED ? "Rotated" : "Remapped",
+ intel_gtt_view_is_rotated(&vma->gtt_view) ? "Rotated" : "Remapped",
exp, val);
i915_vma_unpin_iomap(vma);
err = -EINVAL;
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 08/10] drm/i915/selftests: use intel_gtt_view_is_*() helpers more
2026-09-15 20:09 ` [PATCH 08/10] drm/i915/selftests: " Jani Nikula
@ 2026-09-15 20:14 ` sashiko-bot
2026-09-30 10:34 ` [PATCH v2] " Jani Nikula
1 sibling, 0 replies; 20+ messages in thread
From: sashiko-bot @ 2026-09-15 20:14 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, intel-xe
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915/selftests: incorrect view type check breaks igt_vma_remapped_gtt
--
commit b3029da419b0bcdce00e05ce10b2c3fff729069e
Author: Jani Nikula <jani.nikula@intel.com>
drm/i915/selftests: use intel_gtt_view_is_*() helpers more
This commit replaces direct view type comparisons with intel_gtt_view_is_*()
helpers.
> diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> index b16297a6a4e8d..ca340a94f7728 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
[ ... ]
> @@ -1057,7 +1057,7 @@ static int igt_vma_remapped_gtt(void *arg)
> goto out;
> }
>
> - GEM_BUG_ON(vma->gtt_view.type != I915_GTT_VIEW_NORMAL);
> + GEM_BUG_ON(!intel_gtt_view_is_normal(&vma->gtt_view));
>
> map = i915_vma_pin_iomap(vma);
> i915_vma_unpin(vma);
[ ... ]
> @@ -1072,7 +1072,7 @@ static int igt_vma_remapped_gtt(void *arg)
> u32 exp = y << 16 | x;
> u32 val;
>
> - if (*t == I915_GTT_VIEW_ROTATED)
> + if (intel_gtt_view_is_rotated(&vma->gtt_view))
> src_idx = rotated_index(&view.rotated, 0, x, y);
> else
> src_idx = remapped_index(&view.remapped, 0, x, y);
[Severity: Medium]
Will this check always evaluate to false? Earlier in igt_vma_remapped_gtt(),
the vma is pinned with a normal view, and verified with the GEM_BUG_ON
shown above. Because vma->gtt_view is normal, this condition will fail even
when testing a rotated view, incorrectly taking the remapped_index() path
and causing spurious test failures.
Should this check continue to evaluate the original test context instead,
such as by using intel_gtt_view_is_rotated(&view)?
> @@ -1081,7 +1081,7 @@ static int igt_vma_remapped_gtt(void *arg)
> val = ioread32(&map[offset / sizeof(*map)]);
> if (val != exp) {
> pr_err("%s VMA write test failed, expected 0x%x, found 0x%x\n",
> - *t == I915_GTT_VIEW_ROTATED ? "Rotated" : "Remapped",
> + intel_gtt_view_is_rotated(&vma->gtt_view) ? "Rotated" : "Remapped",
> exp, val);
> i915_vma_unpin_iomap(vma);
> err = -EINVAL;
[Severity: Medium]
Does this error message also need to check the original view context? For
the same reason as above, if the test fails for a rotated view, it will
incorrectly print Remapped because vma->gtt_view is normal here.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1789502902.git.jani.nikula@intel.com?part=8
^ permalink raw reply [flat|nested] 20+ messages in thread* [PATCH v2] drm/i915/selftests: use intel_gtt_view_is_*() helpers more
2026-09-15 20:09 ` [PATCH 08/10] drm/i915/selftests: " Jani Nikula
2026-09-15 20:14 ` sashiko-bot
@ 2026-09-30 10:34 ` Jani Nikula
2026-09-30 13:29 ` Ville Syrjälä
1 sibling, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2026-09-30 10:34 UTC (permalink / raw)
To: Jani Nikula, intel-gfx, intel-xe; +Cc: maarten.lankhorst
Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
view type directly.
v2: Use view, not vma->gtt_view at the end (Sashiko)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_vma.c | 34 +++++++++++------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
index b16297a6a4e8..f918ae18c4e1 100644
--- a/drivers/gpu/drm/i915/selftests/i915_vma.c
+++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
@@ -51,7 +51,7 @@ static bool assert_vma(struct i915_vma *vma,
ok = false;
}
- if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
+ if (!intel_gtt_view_is_normal(&vma->gtt_view)) {
pr_err("VMA created with wrong type [%d]\n",
vma->gtt_view.type);
ok = false;
@@ -533,12 +533,12 @@ assert_remapped(struct drm_i915_gem_object *obj,
return sg;
}
-static unsigned int remapped_size(enum intel_gtt_view_type view_type,
+static unsigned int remapped_size(const struct intel_gtt_view *view,
const struct intel_remapped_plane_info *a,
const struct intel_remapped_plane_info *b)
{
- if (view_type == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(view))
return a->dst_stride * a->width + b->dst_stride * b->width;
else
return a->dst_stride * a->height + b->dst_stride * b->height;
@@ -606,11 +606,11 @@ static int igt_vma_rotate_remap(void *arg)
max_offset = max_pages - max_offset;
if (!plane_info[0].dst_stride)
- plane_info[0].dst_stride = view.type == I915_GTT_VIEW_ROTATED ?
+ plane_info[0].dst_stride = intel_gtt_view_is_rotated(&view) ?
plane_info[0].height :
plane_info[0].width;
if (!plane_info[1].dst_stride)
- plane_info[1].dst_stride = view.type == I915_GTT_VIEW_ROTATED ?
+ plane_info[1].dst_stride = intel_gtt_view_is_rotated(&view) ?
plane_info[1].height :
plane_info[1].width;
@@ -632,9 +632,9 @@ static int igt_vma_rotate_remap(void *arg)
goto out_object;
}
- expected_pages = remapped_size(view.type, &plane_info[0], &plane_info[1]);
+ expected_pages = remapped_size(&view, &plane_info[0], &plane_info[1]);
- if (view.type == I915_GTT_VIEW_ROTATED &&
+ if (intel_gtt_view_is_rotated(&view) &&
vma->size != expected_pages * PAGE_SIZE) {
pr_err("VMA is wrong size, expected %lu, found %llu\n",
PAGE_SIZE * expected_pages, vma->size);
@@ -642,7 +642,7 @@ static int igt_vma_rotate_remap(void *arg)
goto out_object;
}
- if (view.type == I915_GTT_VIEW_REMAPPED &&
+ if (intel_gtt_view_is_remapped(&view) &&
vma->size > expected_pages * PAGE_SIZE) {
pr_err("VMA is wrong size, expected %lu, found %llu\n",
PAGE_SIZE * expected_pages, vma->size);
@@ -672,13 +672,13 @@ static int igt_vma_rotate_remap(void *arg)
sg = vma->pages->sgl;
for (n = 0; n < ARRAY_SIZE(view.rotated.plane); n++) {
- if (view.type == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(&view))
sg = assert_rotated(obj, &view.rotated, n, sg);
else
sg = assert_remapped(obj, &view.remapped, n, sg);
if (IS_ERR(sg)) {
pr_err("Inconsistent %s VMA pages for plane %d: [(%d, %d, %d, %d, %d), (%d, %d, %d, %d, %d)]\n",
- view.type == I915_GTT_VIEW_ROTATED ?
+ intel_gtt_view_is_rotated(&view) ?
"rotated" : "remapped", n,
plane_info[0].width,
plane_info[0].height,
@@ -763,7 +763,7 @@ static bool assert_pin(struct i915_vma *vma,
ok = false;
}
- if (view && view->type != I915_GTT_VIEW_NORMAL) {
+ if (view && !intel_gtt_view_is_normal(view)) {
if (memcmp(&vma->gtt_view, view, sizeof(*view))) {
pr_err("(%s) VMA mismatch upon creation!\n",
name);
@@ -776,7 +776,7 @@ static bool assert_pin(struct i915_vma *vma,
ok = false;
}
} else {
- if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
+ if (!intel_gtt_view_is_normal(&vma->gtt_view)) {
pr_err("Not the normal ggtt view! Found %d\n",
vma->gtt_view.type);
ok = false;
@@ -1017,7 +1017,7 @@ static int igt_vma_remapped_gtt(void *arg)
goto out;
if (!plane_info[0].dst_stride)
- plane_info[0].dst_stride = *t == I915_GTT_VIEW_ROTATED ?
+ plane_info[0].dst_stride = intel_gtt_view_is_rotated(&view) ?
p->height : p->width;
vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE);
@@ -1040,7 +1040,7 @@ static int igt_vma_remapped_gtt(void *arg)
unsigned int offset;
u32 val = y << 16 | x;
- if (*t == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(&vma->gtt_view))
offset = (x * plane_info[0].dst_stride + y) * PAGE_SIZE;
else
offset = (y * plane_info[0].dst_stride + x) * PAGE_SIZE;
@@ -1057,7 +1057,7 @@ static int igt_vma_remapped_gtt(void *arg)
goto out;
}
- GEM_BUG_ON(vma->gtt_view.type != I915_GTT_VIEW_NORMAL);
+ GEM_BUG_ON(!intel_gtt_view_is_normal(&vma->gtt_view));
map = i915_vma_pin_iomap(vma);
i915_vma_unpin(vma);
@@ -1072,7 +1072,7 @@ static int igt_vma_remapped_gtt(void *arg)
u32 exp = y << 16 | x;
u32 val;
- if (*t == I915_GTT_VIEW_ROTATED)
+ if (intel_gtt_view_is_rotated(&view))
src_idx = rotated_index(&view.rotated, 0, x, y);
else
src_idx = remapped_index(&view.remapped, 0, x, y);
@@ -1081,7 +1081,7 @@ static int igt_vma_remapped_gtt(void *arg)
val = ioread32(&map[offset / sizeof(*map)]);
if (val != exp) {
pr_err("%s VMA write test failed, expected 0x%x, found 0x%x\n",
- *t == I915_GTT_VIEW_ROTATED ? "Rotated" : "Remapped",
+ intel_gtt_view_is_rotated(&view) ? "Rotated" : "Remapped",
exp, val);
i915_vma_unpin_iomap(vma);
err = -EINVAL;
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH v2] drm/i915/selftests: use intel_gtt_view_is_*() helpers more
2026-09-30 10:34 ` [PATCH v2] " Jani Nikula
@ 2026-09-30 13:29 ` Ville Syrjälä
0 siblings, 0 replies; 20+ messages in thread
From: Ville Syrjälä @ 2026-09-30 13:29 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, intel-xe, maarten.lankhorst
On Wed, Sep 30, 2026 at 01:34:27PM +0300, Jani Nikula wrote:
> Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
> view type directly.
>
> v2: Use view, not vma->gtt_view at the end (Sashiko)
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/selftests/i915_vma.c | 34 +++++++++++------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> index b16297a6a4e8..f918ae18c4e1 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
> @@ -51,7 +51,7 @@ static bool assert_vma(struct i915_vma *vma,
> ok = false;
> }
>
> - if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
> + if (!intel_gtt_view_is_normal(&vma->gtt_view)) {
> pr_err("VMA created with wrong type [%d]\n",
> vma->gtt_view.type);
> ok = false;
> @@ -533,12 +533,12 @@ assert_remapped(struct drm_i915_gem_object *obj,
> return sg;
> }
>
> -static unsigned int remapped_size(enum intel_gtt_view_type view_type,
> +static unsigned int remapped_size(const struct intel_gtt_view *view,
> const struct intel_remapped_plane_info *a,
> const struct intel_remapped_plane_info *b)
> {
>
> - if (view_type == I915_GTT_VIEW_ROTATED)
> + if (intel_gtt_view_is_rotated(view))
> return a->dst_stride * a->width + b->dst_stride * b->width;
> else
> return a->dst_stride * a->height + b->dst_stride * b->height;
> @@ -606,11 +606,11 @@ static int igt_vma_rotate_remap(void *arg)
> max_offset = max_pages - max_offset;
>
> if (!plane_info[0].dst_stride)
> - plane_info[0].dst_stride = view.type == I915_GTT_VIEW_ROTATED ?
> + plane_info[0].dst_stride = intel_gtt_view_is_rotated(&view) ?
> plane_info[0].height :
> plane_info[0].width;
> if (!plane_info[1].dst_stride)
> - plane_info[1].dst_stride = view.type == I915_GTT_VIEW_ROTATED ?
> + plane_info[1].dst_stride = intel_gtt_view_is_rotated(&view) ?
> plane_info[1].height :
> plane_info[1].width;
>
> @@ -632,9 +632,9 @@ static int igt_vma_rotate_remap(void *arg)
> goto out_object;
> }
>
> - expected_pages = remapped_size(view.type, &plane_info[0], &plane_info[1]);
> + expected_pages = remapped_size(&view, &plane_info[0], &plane_info[1]);
>
> - if (view.type == I915_GTT_VIEW_ROTATED &&
> + if (intel_gtt_view_is_rotated(&view) &&
> vma->size != expected_pages * PAGE_SIZE) {
> pr_err("VMA is wrong size, expected %lu, found %llu\n",
> PAGE_SIZE * expected_pages, vma->size);
> @@ -642,7 +642,7 @@ static int igt_vma_rotate_remap(void *arg)
> goto out_object;
> }
>
> - if (view.type == I915_GTT_VIEW_REMAPPED &&
> + if (intel_gtt_view_is_remapped(&view) &&
> vma->size > expected_pages * PAGE_SIZE) {
> pr_err("VMA is wrong size, expected %lu, found %llu\n",
> PAGE_SIZE * expected_pages, vma->size);
> @@ -672,13 +672,13 @@ static int igt_vma_rotate_remap(void *arg)
>
> sg = vma->pages->sgl;
> for (n = 0; n < ARRAY_SIZE(view.rotated.plane); n++) {
> - if (view.type == I915_GTT_VIEW_ROTATED)
> + if (intel_gtt_view_is_rotated(&view))
> sg = assert_rotated(obj, &view.rotated, n, sg);
> else
> sg = assert_remapped(obj, &view.remapped, n, sg);
> if (IS_ERR(sg)) {
> pr_err("Inconsistent %s VMA pages for plane %d: [(%d, %d, %d, %d, %d), (%d, %d, %d, %d, %d)]\n",
> - view.type == I915_GTT_VIEW_ROTATED ?
> + intel_gtt_view_is_rotated(&view) ?
> "rotated" : "remapped", n,
> plane_info[0].width,
> plane_info[0].height,
> @@ -763,7 +763,7 @@ static bool assert_pin(struct i915_vma *vma,
> ok = false;
> }
>
> - if (view && view->type != I915_GTT_VIEW_NORMAL) {
> + if (view && !intel_gtt_view_is_normal(view)) {
> if (memcmp(&vma->gtt_view, view, sizeof(*view))) {
> pr_err("(%s) VMA mismatch upon creation!\n",
> name);
> @@ -776,7 +776,7 @@ static bool assert_pin(struct i915_vma *vma,
> ok = false;
> }
> } else {
> - if (vma->gtt_view.type != I915_GTT_VIEW_NORMAL) {
> + if (!intel_gtt_view_is_normal(&vma->gtt_view)) {
> pr_err("Not the normal ggtt view! Found %d\n",
> vma->gtt_view.type);
> ok = false;
> @@ -1017,7 +1017,7 @@ static int igt_vma_remapped_gtt(void *arg)
> goto out;
>
> if (!plane_info[0].dst_stride)
> - plane_info[0].dst_stride = *t == I915_GTT_VIEW_ROTATED ?
> + plane_info[0].dst_stride = intel_gtt_view_is_rotated(&view) ?
> p->height : p->width;
>
> vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE);
> @@ -1040,7 +1040,7 @@ static int igt_vma_remapped_gtt(void *arg)
> unsigned int offset;
> u32 val = y << 16 | x;
>
> - if (*t == I915_GTT_VIEW_ROTATED)
> + if (intel_gtt_view_is_rotated(&vma->gtt_view))
Better use 'view' here too instead of 'vma->gtt_view'. Yes, the two
should be identical here, but I think it's clearer if the test logic
always uses the local data instead of digging into the vma internals.
> offset = (x * plane_info[0].dst_stride + y) * PAGE_SIZE;
> else
> offset = (y * plane_info[0].dst_stride + x) * PAGE_SIZE;
> @@ -1057,7 +1057,7 @@ static int igt_vma_remapped_gtt(void *arg)
> goto out;
> }
>
> - GEM_BUG_ON(vma->gtt_view.type != I915_GTT_VIEW_NORMAL);
> + GEM_BUG_ON(!intel_gtt_view_is_normal(&vma->gtt_view));
>
> map = i915_vma_pin_iomap(vma);
> i915_vma_unpin(vma);
> @@ -1072,7 +1072,7 @@ static int igt_vma_remapped_gtt(void *arg)
> u32 exp = y << 16 | x;
> u32 val;
>
> - if (*t == I915_GTT_VIEW_ROTATED)
> + if (intel_gtt_view_is_rotated(&view))
> src_idx = rotated_index(&view.rotated, 0, x, y);
> else
> src_idx = remapped_index(&view.remapped, 0, x, y);
> @@ -1081,7 +1081,7 @@ static int igt_vma_remapped_gtt(void *arg)
> val = ioread32(&map[offset / sizeof(*map)]);
> if (val != exp) {
> pr_err("%s VMA write test failed, expected 0x%x, found 0x%x\n",
> - *t == I915_GTT_VIEW_ROTATED ? "Rotated" : "Remapped",
> + intel_gtt_view_is_rotated(&view) ? "Rotated" : "Remapped",
> exp, val);
> i915_vma_unpin_iomap(vma);
> err = -EINVAL;
> --
> 2.47.3
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 09/10] drm/i915/debugfs: use the intel_gtt_view_is_*() helpers more
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (7 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 08/10] drm/i915/selftests: " Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-15 20:09 ` [PATCH 10/10] drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_* Jani Nikula
` (4 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Prefer using the intel_gtt_view_is_*() helpers instead of comparing the
view type directly.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index a3e27f9e4f47..ddb2ab4f22a2 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -209,18 +209,13 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
stringify_page_sizes(vma->resource->page_sizes_gtt,
NULL, 0));
if (i915_vma_is_ggtt(vma) || i915_vma_is_dpt(vma)) {
- switch (vma->gtt_view.type) {
- case I915_GTT_VIEW_NORMAL:
+ if (intel_gtt_view_is_normal(&vma->gtt_view)) {
seq_puts(m, ", normal");
- break;
-
- case I915_GTT_VIEW_PARTIAL:
+ } else if (intel_gtt_view_is_partial(&vma->gtt_view)) {
seq_printf(m, ", partial [%08llx+%x]",
vma->gtt_view.partial.offset << PAGE_SHIFT,
vma->gtt_view.partial.size << PAGE_SHIFT);
- break;
-
- case I915_GTT_VIEW_ROTATED:
+ } else if (intel_gtt_view_is_rotated(&vma->gtt_view)) {
seq_printf(m, ", rotated [(%ux%u, src_stride=%u, dst_stride=%u, offset=%u), (%ux%u, src_stride=%u, dst_stride=%u, offset=%u)]",
vma->gtt_view.rotated.plane[0].width,
vma->gtt_view.rotated.plane[0].height,
@@ -232,9 +227,7 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
vma->gtt_view.rotated.plane[1].src_stride,
vma->gtt_view.rotated.plane[1].dst_stride,
vma->gtt_view.rotated.plane[1].offset);
- break;
-
- case I915_GTT_VIEW_REMAPPED:
+ } else if (intel_gtt_view_is_remapped(&vma->gtt_view)) {
seq_printf(m, ", remapped [(%ux%u, src_stride=%u, dst_stride=%u, offset=%u), (%ux%u, src_stride=%u, dst_stride=%u, offset=%u)]",
vma->gtt_view.remapped.plane[0].width,
vma->gtt_view.remapped.plane[0].height,
@@ -246,11 +239,8 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
vma->gtt_view.remapped.plane[1].src_stride,
vma->gtt_view.remapped.plane[1].dst_stride,
vma->gtt_view.remapped.plane[1].offset);
- break;
-
- default:
+ } else {
MISSING_CASE(vma->gtt_view.type);
- break;
}
}
if (vma->fence)
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH 10/10] drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_*
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (8 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 09/10] drm/i915/debugfs: use the " Jani Nikula
@ 2026-09-15 20:09 ` Jani Nikula
2026-09-29 14:00 ` Maarten Lankhorst
2026-09-15 21:48 ` ✗ i915.CI.BAT: failure for drm/{i915,xe}: use a shared gtt_view_types.h header Patchwork
` (3 subsequent siblings)
13 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2026-09-15 20:09 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula
Make the I915_GTT_VIEW_* enumerators less i915 specific, and rename them
INTEL_GTT_VIEW_*.
$ sed -i 's/I915_GTT_VIEW_/INTEL_GTT_VIEW_/g' -- $(git grep -l I915_GTT_VIEW_)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_fb.c | 8 ++++----
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 6 +++---
drivers/gpu/drm/i915/i915_vma.h | 8 ++++----
drivers/gpu/drm/i915/i915_vma_types.h | 10 +++++-----
drivers/gpu/drm/i915/selftests/i915_vma.c | 12 ++++++------
include/drm/intel/gtt_view_types.h | 16 ++++++++--------
6 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index d1b4efa08bcc..9d71f594537f 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -1706,7 +1706,7 @@ int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *
unsigned int tile_size = intel_tile_size(display);
intel_fb_view_init(display, &fb->normal_view,
- I915_GTT_VIEW_NORMAL, fb);
+ INTEL_GTT_VIEW_NORMAL, fb);
drm_WARN_ON(display->drm,
intel_fb_supports_90_270_rotation(fb) &&
@@ -1714,10 +1714,10 @@ int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *
if (intel_fb_supports_90_270_rotation(fb))
intel_fb_view_init(display, &fb->rotated_view,
- I915_GTT_VIEW_ROTATED, fb);
+ INTEL_GTT_VIEW_ROTATED, fb);
if (intel_fb_needs_pot_stride_remap(fb))
intel_fb_view_init(display, &fb->remapped_view,
- I915_GTT_VIEW_REMAPPED, fb);
+ INTEL_GTT_VIEW_REMAPPED, fb);
for (i = 0; i < num_planes; i++) {
struct fb_plane_view_dims view_dims;
@@ -1845,7 +1845,7 @@ static void intel_plane_remap_gtt(struct intel_plane_state *plane_state)
intel_fb_view_init(display, &plane_state->view,
drm_rotation_90_or_270(rotation) ?
- I915_GTT_VIEW_ROTATED : I915_GTT_VIEW_REMAPPED,
+ INTEL_GTT_VIEW_ROTATED : INTEL_GTT_VIEW_REMAPPED,
intel_fb);
src_x = plane_state->uapi.src.x1 >> 16;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 055f8d3161da..6b337684dbfe 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -206,7 +206,7 @@ compute_partial_view(const struct drm_i915_gem_object *obj,
if (i915_gem_object_is_tiled(obj))
chunk = roundup(chunk, tile_row_pages(obj) ?: 1);
- view.type = I915_GTT_VIEW_PARTIAL;
+ view.type = INTEL_GTT_VIEW_PARTIAL;
view.partial.offset = rounddown(page_offset, chunk);
view.partial.size =
min_t(unsigned int, chunk,
@@ -214,7 +214,7 @@ compute_partial_view(const struct drm_i915_gem_object *obj,
/* If the partial covers the entire object, just create a normal VMA. */
if (chunk >= obj->base.size >> PAGE_SHIFT)
- view.type = I915_GTT_VIEW_NORMAL;
+ view.type = INTEL_GTT_VIEW_NORMAL;
return view;
}
@@ -407,7 +407,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags);
if (IS_ERR(vma) && vma != ERR_PTR(-EDEADLK)) {
flags = PIN_MAPPABLE;
- view.type = I915_GTT_VIEW_PARTIAL;
+ view.type = INTEL_GTT_VIEW_PARTIAL;
vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags);
}
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index a8a89bb0270c..b0aca10bf8e7 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -217,7 +217,7 @@ i915_vma_compare(struct i915_vma *vma,
if (cmp)
return cmp;
- BUILD_BUG_ON(I915_GTT_VIEW_NORMAL != 0);
+ BUILD_BUG_ON(INTEL_GTT_VIEW_NORMAL != 0);
cmp = vma->gtt_view.type;
if (!view)
return cmp;
@@ -238,9 +238,9 @@ i915_vma_compare(struct i915_vma *vma,
* we assert above that all branches have the same address, and that
* each branch has a unique type/size.
*/
- BUILD_BUG_ON(I915_GTT_VIEW_NORMAL >= I915_GTT_VIEW_PARTIAL);
- BUILD_BUG_ON(I915_GTT_VIEW_PARTIAL >= I915_GTT_VIEW_ROTATED);
- BUILD_BUG_ON(I915_GTT_VIEW_ROTATED >= I915_GTT_VIEW_REMAPPED);
+ BUILD_BUG_ON(INTEL_GTT_VIEW_NORMAL >= INTEL_GTT_VIEW_PARTIAL);
+ BUILD_BUG_ON(INTEL_GTT_VIEW_PARTIAL >= INTEL_GTT_VIEW_ROTATED);
+ BUILD_BUG_ON(INTEL_GTT_VIEW_ROTATED >= INTEL_GTT_VIEW_REMAPPED);
BUILD_BUG_ON(offsetof(typeof(*view), rotated) !=
offsetof(typeof(*view), partial));
BUILD_BUG_ON(offsetof(typeof(*view), rotated) !=
diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h
index 8815421eaefb..95eaf68fdfae 100644
--- a/drivers/gpu/drm/i915/i915_vma_types.h
+++ b/drivers/gpu/drm/i915/i915_vma_types.h
@@ -112,10 +112,10 @@ static inline void assert_i915_gem_gtt_types(void)
* we have to be careful that each branch has a unique size.
*/
switch ((enum intel_gtt_view_type)0) {
- case I915_GTT_VIEW_NORMAL:
- case I915_GTT_VIEW_PARTIAL:
- case I915_GTT_VIEW_ROTATED:
- case I915_GTT_VIEW_REMAPPED:
+ case INTEL_GTT_VIEW_NORMAL:
+ case INTEL_GTT_VIEW_PARTIAL:
+ case INTEL_GTT_VIEW_ROTATED:
+ case INTEL_GTT_VIEW_REMAPPED:
/* gcc complains if these are identical cases */
break;
}
@@ -231,7 +231,7 @@ struct i915_vma {
* Support different GGTT views into the same object.
* This means there can be multiple VMA mappings per object and per VM.
* intel_gtt_view_type is used to distinguish between those entries.
- * The default one of zero (I915_GTT_VIEW_NORMAL) is default and also
+ * The default one of zero (INTEL_GTT_VIEW_NORMAL) is default and also
* assumed in GEM functions which take no ggtt view parameter.
*/
struct intel_gtt_view gtt_view;
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
index ca340a94f772..ace26dfaf55a 100644
--- a/drivers/gpu/drm/i915/selftests/i915_vma.c
+++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
@@ -573,8 +573,8 @@ static int igt_vma_rotate_remap(void *arg)
{ }
}, *a, *b;
enum intel_gtt_view_type types[] = {
- I915_GTT_VIEW_ROTATED,
- I915_GTT_VIEW_REMAPPED,
+ INTEL_GTT_VIEW_ROTATED,
+ INTEL_GTT_VIEW_REMAPPED,
0,
}, *t;
const unsigned int max_pages = 64;
@@ -825,12 +825,12 @@ static int igt_vma_partial(void *arg)
for_each_prime_number_from(offset, 0, npages - sz) {
struct intel_gtt_view view;
- view.type = I915_GTT_VIEW_PARTIAL;
+ view.type = INTEL_GTT_VIEW_PARTIAL;
view.partial.offset = offset;
view.partial.size = sz;
if (sz == npages)
- view.type = I915_GTT_VIEW_NORMAL;
+ view.type = INTEL_GTT_VIEW_NORMAL;
vma = checked_vma_instance(obj, vm, &view);
if (IS_ERR(vma)) {
@@ -982,8 +982,8 @@ static int igt_vma_remapped_gtt(void *arg)
{ }
}, *p;
enum intel_gtt_view_type types[] = {
- I915_GTT_VIEW_ROTATED,
- I915_GTT_VIEW_REMAPPED,
+ INTEL_GTT_VIEW_ROTATED,
+ INTEL_GTT_VIEW_REMAPPED,
0,
}, *t;
struct drm_i915_gem_object *obj;
diff --git a/include/drm/intel/gtt_view_types.h b/include/drm/intel/gtt_view_types.h
index d235a3ad50c3..b3ccd5b5a3f4 100644
--- a/include/drm/intel/gtt_view_types.h
+++ b/include/drm/intel/gtt_view_types.h
@@ -40,10 +40,10 @@ struct intel_remapped_info {
} __packed;
enum intel_gtt_view_type {
- I915_GTT_VIEW_NORMAL = 0,
- I915_GTT_VIEW_ROTATED = sizeof(struct intel_rotation_info),
- I915_GTT_VIEW_PARTIAL = sizeof(struct intel_partial_info),
- I915_GTT_VIEW_REMAPPED = sizeof(struct intel_remapped_info),
+ INTEL_GTT_VIEW_NORMAL = 0,
+ INTEL_GTT_VIEW_ROTATED = sizeof(struct intel_rotation_info),
+ INTEL_GTT_VIEW_PARTIAL = sizeof(struct intel_partial_info),
+ INTEL_GTT_VIEW_REMAPPED = sizeof(struct intel_remapped_info),
};
struct intel_gtt_view {
@@ -58,22 +58,22 @@ struct intel_gtt_view {
static inline bool intel_gtt_view_is_normal(const struct intel_gtt_view *view)
{
- return view->type == I915_GTT_VIEW_NORMAL;
+ return view->type == INTEL_GTT_VIEW_NORMAL;
}
static inline bool intel_gtt_view_is_remapped(const struct intel_gtt_view *view)
{
- return view->type == I915_GTT_VIEW_REMAPPED;
+ return view->type == INTEL_GTT_VIEW_REMAPPED;
}
static inline bool intel_gtt_view_is_rotated(const struct intel_gtt_view *view)
{
- return view->type == I915_GTT_VIEW_ROTATED;
+ return view->type == INTEL_GTT_VIEW_ROTATED;
}
static inline bool intel_gtt_view_is_partial(const struct intel_gtt_view *view)
{
- return view->type == I915_GTT_VIEW_PARTIAL;
+ return view->type == INTEL_GTT_VIEW_PARTIAL;
}
#endif
--
2.47.3
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH 10/10] drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_*
2026-09-15 20:09 ` [PATCH 10/10] drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_* Jani Nikula
@ 2026-09-29 14:00 ` Maarten Lankhorst
0 siblings, 0 replies; 20+ messages in thread
From: Maarten Lankhorst @ 2026-09-29 14:00 UTC (permalink / raw)
To: Jani Nikula, intel-gfx, intel-xe
Series looks good. There's nothing i915 specific about the view, it has always been a display specific feature,
that just happened to be handled inside i915_vma.c
For the series:
Reviewed-by: Maarten Lankhorst <dev@lankhorst.se>
On 9/15/26 22:09, Jani Nikula wrote:
> Make the I915_GTT_VIEW_* enumerators less i915 specific, and rename them
> INTEL_GTT_VIEW_*.
>
> $ sed -i 's/I915_GTT_VIEW_/INTEL_GTT_VIEW_/g' -- $(git grep -l I915_GTT_VIEW_)
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fb.c | 8 ++++----
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 6 +++---
> drivers/gpu/drm/i915/i915_vma.h | 8 ++++----
> drivers/gpu/drm/i915/i915_vma_types.h | 10 +++++-----
> drivers/gpu/drm/i915/selftests/i915_vma.c | 12 ++++++------
> include/drm/intel/gtt_view_types.h | 16 ++++++++--------
> 6 files changed, 30 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index d1b4efa08bcc..9d71f594537f 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -1706,7 +1706,7 @@ int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *
> unsigned int tile_size = intel_tile_size(display);
>
> intel_fb_view_init(display, &fb->normal_view,
> - I915_GTT_VIEW_NORMAL, fb);
> + INTEL_GTT_VIEW_NORMAL, fb);
>
> drm_WARN_ON(display->drm,
> intel_fb_supports_90_270_rotation(fb) &&
> @@ -1714,10 +1714,10 @@ int intel_fill_fb_info(struct intel_display *display, struct intel_framebuffer *
>
> if (intel_fb_supports_90_270_rotation(fb))
> intel_fb_view_init(display, &fb->rotated_view,
> - I915_GTT_VIEW_ROTATED, fb);
> + INTEL_GTT_VIEW_ROTATED, fb);
> if (intel_fb_needs_pot_stride_remap(fb))
> intel_fb_view_init(display, &fb->remapped_view,
> - I915_GTT_VIEW_REMAPPED, fb);
> + INTEL_GTT_VIEW_REMAPPED, fb);
>
> for (i = 0; i < num_planes; i++) {
> struct fb_plane_view_dims view_dims;
> @@ -1845,7 +1845,7 @@ static void intel_plane_remap_gtt(struct intel_plane_state *plane_state)
>
> intel_fb_view_init(display, &plane_state->view,
> drm_rotation_90_or_270(rotation) ?
> - I915_GTT_VIEW_ROTATED : I915_GTT_VIEW_REMAPPED,
> + INTEL_GTT_VIEW_ROTATED : INTEL_GTT_VIEW_REMAPPED,
> intel_fb);
>
> src_x = plane_state->uapi.src.x1 >> 16;
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index 055f8d3161da..6b337684dbfe 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -206,7 +206,7 @@ compute_partial_view(const struct drm_i915_gem_object *obj,
> if (i915_gem_object_is_tiled(obj))
> chunk = roundup(chunk, tile_row_pages(obj) ?: 1);
>
> - view.type = I915_GTT_VIEW_PARTIAL;
> + view.type = INTEL_GTT_VIEW_PARTIAL;
> view.partial.offset = rounddown(page_offset, chunk);
> view.partial.size =
> min_t(unsigned int, chunk,
> @@ -214,7 +214,7 @@ compute_partial_view(const struct drm_i915_gem_object *obj,
>
> /* If the partial covers the entire object, just create a normal VMA. */
> if (chunk >= obj->base.size >> PAGE_SHIFT)
> - view.type = I915_GTT_VIEW_NORMAL;
> + view.type = INTEL_GTT_VIEW_NORMAL;
>
> return view;
> }
> @@ -407,7 +407,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
> vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags);
> if (IS_ERR(vma) && vma != ERR_PTR(-EDEADLK)) {
> flags = PIN_MAPPABLE;
> - view.type = I915_GTT_VIEW_PARTIAL;
> + view.type = INTEL_GTT_VIEW_PARTIAL;
> vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags);
> }
>
> diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
> index a8a89bb0270c..b0aca10bf8e7 100644
> --- a/drivers/gpu/drm/i915/i915_vma.h
> +++ b/drivers/gpu/drm/i915/i915_vma.h
> @@ -217,7 +217,7 @@ i915_vma_compare(struct i915_vma *vma,
> if (cmp)
> return cmp;
>
> - BUILD_BUG_ON(I915_GTT_VIEW_NORMAL != 0);
> + BUILD_BUG_ON(INTEL_GTT_VIEW_NORMAL != 0);
> cmp = vma->gtt_view.type;
> if (!view)
> return cmp;
> @@ -238,9 +238,9 @@ i915_vma_compare(struct i915_vma *vma,
> * we assert above that all branches have the same address, and that
> * each branch has a unique type/size.
> */
> - BUILD_BUG_ON(I915_GTT_VIEW_NORMAL >= I915_GTT_VIEW_PARTIAL);
> - BUILD_BUG_ON(I915_GTT_VIEW_PARTIAL >= I915_GTT_VIEW_ROTATED);
> - BUILD_BUG_ON(I915_GTT_VIEW_ROTATED >= I915_GTT_VIEW_REMAPPED);
> + BUILD_BUG_ON(INTEL_GTT_VIEW_NORMAL >= INTEL_GTT_VIEW_PARTIAL);
> + BUILD_BUG_ON(INTEL_GTT_VIEW_PARTIAL >= INTEL_GTT_VIEW_ROTATED);
> + BUILD_BUG_ON(INTEL_GTT_VIEW_ROTATED >= INTEL_GTT_VIEW_REMAPPED);
> BUILD_BUG_ON(offsetof(typeof(*view), rotated) !=
> offsetof(typeof(*view), partial));
> BUILD_BUG_ON(offsetof(typeof(*view), rotated) !=
> diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h
> index 8815421eaefb..95eaf68fdfae 100644
> --- a/drivers/gpu/drm/i915/i915_vma_types.h
> +++ b/drivers/gpu/drm/i915/i915_vma_types.h
> @@ -112,10 +112,10 @@ static inline void assert_i915_gem_gtt_types(void)
> * we have to be careful that each branch has a unique size.
> */
> switch ((enum intel_gtt_view_type)0) {
> - case I915_GTT_VIEW_NORMAL:
> - case I915_GTT_VIEW_PARTIAL:
> - case I915_GTT_VIEW_ROTATED:
> - case I915_GTT_VIEW_REMAPPED:
> + case INTEL_GTT_VIEW_NORMAL:
> + case INTEL_GTT_VIEW_PARTIAL:
> + case INTEL_GTT_VIEW_ROTATED:
> + case INTEL_GTT_VIEW_REMAPPED:
> /* gcc complains if these are identical cases */
> break;
> }
> @@ -231,7 +231,7 @@ struct i915_vma {
> * Support different GGTT views into the same object.
> * This means there can be multiple VMA mappings per object and per VM.
> * intel_gtt_view_type is used to distinguish between those entries.
> - * The default one of zero (I915_GTT_VIEW_NORMAL) is default and also
> + * The default one of zero (INTEL_GTT_VIEW_NORMAL) is default and also
> * assumed in GEM functions which take no ggtt view parameter.
> */
> struct intel_gtt_view gtt_view;
> diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> index ca340a94f772..ace26dfaf55a 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
> @@ -573,8 +573,8 @@ static int igt_vma_rotate_remap(void *arg)
> { }
> }, *a, *b;
> enum intel_gtt_view_type types[] = {
> - I915_GTT_VIEW_ROTATED,
> - I915_GTT_VIEW_REMAPPED,
> + INTEL_GTT_VIEW_ROTATED,
> + INTEL_GTT_VIEW_REMAPPED,
> 0,
> }, *t;
> const unsigned int max_pages = 64;
> @@ -825,12 +825,12 @@ static int igt_vma_partial(void *arg)
> for_each_prime_number_from(offset, 0, npages - sz) {
> struct intel_gtt_view view;
>
> - view.type = I915_GTT_VIEW_PARTIAL;
> + view.type = INTEL_GTT_VIEW_PARTIAL;
> view.partial.offset = offset;
> view.partial.size = sz;
>
> if (sz == npages)
> - view.type = I915_GTT_VIEW_NORMAL;
> + view.type = INTEL_GTT_VIEW_NORMAL;
>
> vma = checked_vma_instance(obj, vm, &view);
> if (IS_ERR(vma)) {
> @@ -982,8 +982,8 @@ static int igt_vma_remapped_gtt(void *arg)
> { }
> }, *p;
> enum intel_gtt_view_type types[] = {
> - I915_GTT_VIEW_ROTATED,
> - I915_GTT_VIEW_REMAPPED,
> + INTEL_GTT_VIEW_ROTATED,
> + INTEL_GTT_VIEW_REMAPPED,
> 0,
> }, *t;
> struct drm_i915_gem_object *obj;
> diff --git a/include/drm/intel/gtt_view_types.h b/include/drm/intel/gtt_view_types.h
> index d235a3ad50c3..b3ccd5b5a3f4 100644
> --- a/include/drm/intel/gtt_view_types.h
> +++ b/include/drm/intel/gtt_view_types.h
> @@ -40,10 +40,10 @@ struct intel_remapped_info {
> } __packed;
>
> enum intel_gtt_view_type {
> - I915_GTT_VIEW_NORMAL = 0,
> - I915_GTT_VIEW_ROTATED = sizeof(struct intel_rotation_info),
> - I915_GTT_VIEW_PARTIAL = sizeof(struct intel_partial_info),
> - I915_GTT_VIEW_REMAPPED = sizeof(struct intel_remapped_info),
> + INTEL_GTT_VIEW_NORMAL = 0,
> + INTEL_GTT_VIEW_ROTATED = sizeof(struct intel_rotation_info),
> + INTEL_GTT_VIEW_PARTIAL = sizeof(struct intel_partial_info),
> + INTEL_GTT_VIEW_REMAPPED = sizeof(struct intel_remapped_info),
> };
>
> struct intel_gtt_view {
> @@ -58,22 +58,22 @@ struct intel_gtt_view {
>
> static inline bool intel_gtt_view_is_normal(const struct intel_gtt_view *view)
> {
> - return view->type == I915_GTT_VIEW_NORMAL;
> + return view->type == INTEL_GTT_VIEW_NORMAL;
> }
>
> static inline bool intel_gtt_view_is_remapped(const struct intel_gtt_view *view)
> {
> - return view->type == I915_GTT_VIEW_REMAPPED;
> + return view->type == INTEL_GTT_VIEW_REMAPPED;
> }
>
> static inline bool intel_gtt_view_is_rotated(const struct intel_gtt_view *view)
> {
> - return view->type == I915_GTT_VIEW_ROTATED;
> + return view->type == INTEL_GTT_VIEW_ROTATED;
> }
>
> static inline bool intel_gtt_view_is_partial(const struct intel_gtt_view *view)
> {
> - return view->type == I915_GTT_VIEW_PARTIAL;
> + return view->type == INTEL_GTT_VIEW_PARTIAL;
> }
>
> #endif
^ permalink raw reply [flat|nested] 20+ messages in thread
* ✗ i915.CI.BAT: failure for drm/{i915,xe}: use a shared gtt_view_types.h header
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (9 preceding siblings ...)
2026-09-15 20:09 ` [PATCH 10/10] drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_* Jani Nikula
@ 2026-09-15 21:48 ` Patchwork
2026-09-28 12:40 ` [PATCH 00/10] drm/{i915, xe}: " Jani Nikula
` (2 subsequent siblings)
13 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2026-09-15 21:48 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 9777 bytes --]
== Series Details ==
Series: drm/{i915,xe}: use a shared gtt_view_types.h header
URL : https://patchwork.freedesktop.org/series/174203/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_19152 -> Patchwork_174203v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_174203v1 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_174203v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/index.html
Participating hosts (39 -> 38)
------------------------------
Missing (1): bat-dg2-13
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_174203v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live:
- fi-hsw-4770: [PASS][1] -> [DMESG-FAIL][2] +1 other test dmesg-fail
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-hsw-4770/igt@i915_selftest@live.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-hsw-4770/igt@i915_selftest@live.html
- fi-ivb-3770: [PASS][3] -> [DMESG-FAIL][4] +1 other test dmesg-fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-ivb-3770/igt@i915_selftest@live.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-ivb-3770/igt@i915_selftest@live.html
- fi-elk-e7500: [PASS][5] -> [DMESG-FAIL][6] +1 other test dmesg-fail
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-elk-e7500/igt@i915_selftest@live.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-elk-e7500/igt@i915_selftest@live.html
- bat-adls-6: [PASS][7] -> [DMESG-FAIL][8] +1 other test dmesg-fail
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-adls-6/igt@i915_selftest@live.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-adls-6/igt@i915_selftest@live.html
- fi-bsw-n3050: [PASS][9] -> [DMESG-FAIL][10] +1 other test dmesg-fail
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-bsw-n3050/igt@i915_selftest@live.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-bsw-n3050/igt@i915_selftest@live.html
- fi-pnv-d510: [PASS][11] -> [DMESG-FAIL][12] +1 other test dmesg-fail
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-pnv-d510/igt@i915_selftest@live.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-pnv-d510/igt@i915_selftest@live.html
- fi-glk-j4005: [PASS][13] -> [DMESG-FAIL][14] +1 other test dmesg-fail
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-glk-j4005/igt@i915_selftest@live.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-glk-j4005/igt@i915_selftest@live.html
- bat-adlp-9: [PASS][15] -> [DMESG-FAIL][16] +1 other test dmesg-fail
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-adlp-9/igt@i915_selftest@live.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-adlp-9/igt@i915_selftest@live.html
- bat-rpls-4: [PASS][17] -> [DMESG-FAIL][18] +1 other test dmesg-fail
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-rpls-4/igt@i915_selftest@live.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-rpls-4/igt@i915_selftest@live.html
- fi-kbl-7567u: [PASS][19] -> [DMESG-FAIL][20] +1 other test dmesg-fail
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-kbl-7567u/igt@i915_selftest@live.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-kbl-7567u/igt@i915_selftest@live.html
- bat-twl-1: [PASS][21] -> [DMESG-FAIL][22] +1 other test dmesg-fail
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-twl-1/igt@i915_selftest@live.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-twl-1/igt@i915_selftest@live.html
- bat-jsl-5: [PASS][23] -> [DMESG-FAIL][24] +1 other test dmesg-fail
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-jsl-5/igt@i915_selftest@live.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-jsl-5/igt@i915_selftest@live.html
- bat-apl-1: [PASS][25] -> [DMESG-FAIL][26] +1 other test dmesg-fail
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-apl-1/igt@i915_selftest@live.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-apl-1/igt@i915_selftest@live.html
- bat-rplp-1: [PASS][27] -> [DMESG-FAIL][28] +1 other test dmesg-fail
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-rplp-1/igt@i915_selftest@live.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-rplp-1/igt@i915_selftest@live.html
- fi-rkl-11600: [PASS][29] -> [DMESG-FAIL][30] +1 other test dmesg-fail
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-rkl-11600/igt@i915_selftest@live.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-rkl-11600/igt@i915_selftest@live.html
- fi-cfl-guc: [PASS][31] -> [DMESG-FAIL][32] +1 other test dmesg-fail
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-cfl-guc/igt@i915_selftest@live.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-cfl-guc/igt@i915_selftest@live.html
- fi-kbl-x1275: [PASS][33] -> [DMESG-FAIL][34] +1 other test dmesg-fail
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-kbl-x1275/igt@i915_selftest@live.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-kbl-x1275/igt@i915_selftest@live.html
- bat-adlp-11: [PASS][35] -> [DMESG-FAIL][36] +1 other test dmesg-fail
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-adlp-11/igt@i915_selftest@live.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-adlp-11/igt@i915_selftest@live.html
- fi-cfl-8109u: [PASS][37] -> [DMESG-FAIL][38] +1 other test dmesg-fail
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-cfl-8109u/igt@i915_selftest@live.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-cfl-8109u/igt@i915_selftest@live.html
- fi-kbl-8809g: [PASS][39] -> [DMESG-FAIL][40] +1 other test dmesg-fail
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-kbl-8809g/igt@i915_selftest@live.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-kbl-8809g/igt@i915_selftest@live.html
- fi-ilk-650: [PASS][41] -> [DMESG-FAIL][42] +1 other test dmesg-fail
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-ilk-650/igt@i915_selftest@live.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-ilk-650/igt@i915_selftest@live.html
- fi-tgl-1115g4: [PASS][43] -> [DMESG-FAIL][44] +1 other test dmesg-fail
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-tgl-1115g4/igt@i915_selftest@live.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-tgl-1115g4/igt@i915_selftest@live.html
- bat-adlp-6: [PASS][45] -> [DMESG-FAIL][46] +1 other test dmesg-fail
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-adlp-6/igt@i915_selftest@live.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-adlp-6/igt@i915_selftest@live.html
- fi-skl-6600u: [PASS][47] -> [DMESG-FAIL][48] +1 other test dmesg-fail
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-skl-6600u/igt@i915_selftest@live.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-skl-6600u/igt@i915_selftest@live.html
- bat-twl-2: [PASS][49] -> [DMESG-FAIL][50] +1 other test dmesg-fail
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-twl-2/igt@i915_selftest@live.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-twl-2/igt@i915_selftest@live.html
* igt@i915_selftest@live@vma:
- fi-cfl-8700k: [PASS][51] -> [DMESG-FAIL][52] +1 other test dmesg-fail
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-cfl-8700k/igt@i915_selftest@live@vma.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-cfl-8700k/igt@i915_selftest@live@vma.html
- fi-bsw-nick: [PASS][53] -> [DMESG-FAIL][54] +1 other test dmesg-fail
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/fi-bsw-nick/igt@i915_selftest@live@vma.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/fi-bsw-nick/igt@i915_selftest@live@vma.html
- bat-kbl-2: [PASS][55] -> [DMESG-FAIL][56] +1 other test dmesg-fail
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19152/bat-kbl-2/igt@i915_selftest@live@vma.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/bat-kbl-2/igt@i915_selftest@live@vma.html
Build changes
-------------
* Linux: CI_DRM_19152 -> Patchwork_174203v1
CI-20190529: 20190529
CI_DRM_19152: 0fb8d1900f1a6b9d21aadbfa5f784979b950bcf8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_9098: 9098
Patchwork_174203v1: 0fb8d1900f1a6b9d21aadbfa5f784979b950bcf8 @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v1/index.html
[-- Attachment #2: Type: text/html, Size: 10534 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH 00/10] drm/{i915, xe}: use a shared gtt_view_types.h header
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (10 preceding siblings ...)
2026-09-15 21:48 ` ✗ i915.CI.BAT: failure for drm/{i915,xe}: use a shared gtt_view_types.h header Patchwork
@ 2026-09-28 12:40 ` Jani Nikula
2026-09-30 12:51 ` ✓ i915.CI.BAT: success for drm/{i915,xe}: use a shared gtt_view_types.h header (rev2) Patchwork
2026-09-30 13:38 ` [PATCH 00/10] drm/{i915, xe}: use a shared gtt_view_types.h header Ville Syrjälä
13 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2026-09-28 12:40 UTC (permalink / raw)
To: intel-gfx, intel-xe, ville.syrjala
On Tue, 15 Sep 2026, Jani Nikula <jani.nikula@intel.com> wrote:
> Move i915_gtt_view_types.h under include/drm/intel, and clean up.
Ville, any feedback on this?
BR,
Jani.
>
> Jani Nikula (10):
> drm/intel: move i915_gtt_view_types.h to include/drm/intel
> drm/intel: rename i915_gtt_view_is_*() helpers to
> intel_gtt_view_is_*()
> drm/intel: rename i915_gtt_view* struct/enum to intel_gtt_view*
> drm/intel: add intel_gtt_view_is_partial() for completeness
> drm/xe/display: use intel_gtt_view_is_*() helpers more
> drm/i915/gem: use intel_gtt_view_is_*() helpers more
> drm/i915/vma: use intel_gtt_view_is_*() helpers more
> drm/i915/selftests: use intel_gtt_view_is_*() helpers more
> drm/i915/debugfs: use the intel_gtt_view_is_*() helpers more
> drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_*
>
> .../drm/i915/display/intel_display_types.h | 4 +-
> drivers/gpu/drm/i915/display/intel_fb.c | 18 +++---
> drivers/gpu/drm/i915/display/intel_parent.c | 4 +-
> drivers/gpu/drm/i915/display/intel_parent.h | 6 +-
> drivers/gpu/drm/i915/gem/i915_gem_domain.c | 4 +-
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 14 ++---
> drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 +-
> .../drm/i915/gem/selftests/i915_gem_mman.c | 4 +-
> drivers/gpu/drm/i915/i915_debugfs.c | 20 ++-----
> drivers/gpu/drm/i915/i915_gem.c | 6 +-
> drivers/gpu/drm/i915/i915_gem.h | 6 +-
> drivers/gpu/drm/i915/i915_vma.c | 44 +++++---------
> drivers/gpu/drm/i915/i915_vma.h | 12 ++--
> drivers/gpu/drm/i915/i915_vma_types.h | 29 +++++----
> drivers/gpu/drm/i915/selftests/i915_vma.c | 60 +++++++++----------
> .../compat-i915-headers/i915_gtt_view_types.h | 7 ---
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 28 ++++-----
> include/drm/intel/display_parent_interface.h | 8 +--
> .../drm/intel/gtt_view_types.h | 37 +++++++-----
> 19 files changed, 143 insertions(+), 170 deletions(-)
> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
> rename drivers/gpu/drm/i915/i915_gtt_view_types.h => include/drm/intel/gtt_view_types.h (50%)
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 20+ messages in thread* ✓ i915.CI.BAT: success for drm/{i915,xe}: use a shared gtt_view_types.h header (rev2)
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (11 preceding siblings ...)
2026-09-28 12:40 ` [PATCH 00/10] drm/{i915, xe}: " Jani Nikula
@ 2026-09-30 12:51 ` Patchwork
2026-09-30 13:38 ` [PATCH 00/10] drm/{i915, xe}: use a shared gtt_view_types.h header Ville Syrjälä
13 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2026-09-30 12:51 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
== Series Details ==
Series: drm/{i915,xe}: use a shared gtt_view_types.h header (rev2)
URL : https://patchwork.freedesktop.org/series/174203/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_19242 -> Patchwork_174203v2
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v2/index.html
Participating hosts (39 -> 38)
------------------------------
Missing (1): bat-dg2-13
Changes
-------
No changes found
Build changes
-------------
* Linux: CI_DRM_19242 -> Patchwork_174203v2
CI-20190529: 20190529
CI_DRM_19242: dde43fa4801498eefd0280da6c729ff5a178f866 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_9118: 26513be3e0f711ed835ec50d5cdcb723ef224105 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_174203v2: dde43fa4801498eefd0280da6c729ff5a178f866 @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_174203v2/index.html
[-- Attachment #2: Type: text/html, Size: 1660 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH 00/10] drm/{i915, xe}: use a shared gtt_view_types.h header
2026-09-15 20:09 [PATCH 00/10] drm/{i915,xe}: use a shared gtt_view_types.h header Jani Nikula
` (12 preceding siblings ...)
2026-09-30 12:51 ` ✓ i915.CI.BAT: success for drm/{i915,xe}: use a shared gtt_view_types.h header (rev2) Patchwork
@ 2026-09-30 13:38 ` Ville Syrjälä
13 siblings, 0 replies; 20+ messages in thread
From: Ville Syrjälä @ 2026-09-30 13:38 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, intel-xe
On Tue, Sep 15, 2026 at 11:09:11PM +0300, Jani Nikula wrote:
> Move i915_gtt_view_types.h under include/drm/intel, and clean up.
>
> Jani Nikula (10):
> drm/intel: move i915_gtt_view_types.h to include/drm/intel
> drm/intel: rename i915_gtt_view_is_*() helpers to
> intel_gtt_view_is_*()
> drm/intel: rename i915_gtt_view* struct/enum to intel_gtt_view*
> drm/intel: add intel_gtt_view_is_partial() for completeness
> drm/xe/display: use intel_gtt_view_is_*() helpers more
> drm/i915/gem: use intel_gtt_view_is_*() helpers more
> drm/i915/vma: use intel_gtt_view_is_*() helpers more
> drm/i915/selftests: use intel_gtt_view_is_*() helpers more
> drm/i915/debugfs: use the intel_gtt_view_is_*() helpers more
> drm/intel: rename I915_GTT_VIEW_* enumerations to INTEL_GTT_VIEW_*
I did a quick rebase of my wip tile ys/64 stuff on top of it and
didn't spot anything bad. Spotted a couple of small nits (one in
the header and another in the selftests) to which I replied
separately.
Apart from that the series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> .../drm/i915/display/intel_display_types.h | 4 +-
> drivers/gpu/drm/i915/display/intel_fb.c | 18 +++---
> drivers/gpu/drm/i915/display/intel_parent.c | 4 +-
> drivers/gpu/drm/i915/display/intel_parent.h | 6 +-
> drivers/gpu/drm/i915/gem/i915_gem_domain.c | 4 +-
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 14 ++---
> drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 +-
> .../drm/i915/gem/selftests/i915_gem_mman.c | 4 +-
> drivers/gpu/drm/i915/i915_debugfs.c | 20 ++-----
> drivers/gpu/drm/i915/i915_gem.c | 6 +-
> drivers/gpu/drm/i915/i915_gem.h | 6 +-
> drivers/gpu/drm/i915/i915_vma.c | 44 +++++---------
> drivers/gpu/drm/i915/i915_vma.h | 12 ++--
> drivers/gpu/drm/i915/i915_vma_types.h | 29 +++++----
> drivers/gpu/drm/i915/selftests/i915_vma.c | 60 +++++++++----------
> .../compat-i915-headers/i915_gtt_view_types.h | 7 ---
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 28 ++++-----
> include/drm/intel/display_parent_interface.h | 8 +--
> .../drm/intel/gtt_view_types.h | 37 +++++++-----
> 19 files changed, 143 insertions(+), 170 deletions(-)
> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gtt_view_types.h
> rename drivers/gpu/drm/i915/i915_gtt_view_types.h => include/drm/intel/gtt_view_types.h (50%)
>
> --
> 2.47.3
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 20+ messages in thread