From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 01/16] drm/i915: Introduce intel_parent_fb_pin_get_map()
Date: Fri, 24 Apr 2026 12:14:04 +0300 [thread overview]
Message-ID: <cfbcaeb2a7a96b0a6f91e7f0e9b42313a8371f1d@intel.com> (raw)
In-Reply-To: <20260423165346.20884-2-ville.syrjala@linux.intel.com>
On Thu, 23 Apr 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Introduce the "fb_pin" parent interface, as the first trivial step
> move the *_get_map() stuff there.
>
> The whole "fb_pin" as an interface might not really make sense,
> and perhaps this (and other stuff) should just be collected into
> some kind of "bo" interface. But let's go with "fb_pin" for now
> to match where things are implemented, and possibly restructure
> it later.
Yeah, I've also come to the conclusion that trying to always get things
like this right in advance is somewhat of a waste of time. You'll only
see things clearly once everything is in place.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fb_pin.h | 1 -
> drivers/gpu/drm/i915/display/intel_fbdev.c | 7 +++++--
> drivers/gpu/drm/i915/display/intel_fbdev.h | 4 ++--
> drivers/gpu/drm/i915/display/intel_parent.c | 7 +++++++
> drivers/gpu/drm/i915/display/intel_parent.h | 5 +++++
> drivers/gpu/drm/i915/display/intel_plane.c | 4 ++--
> drivers/gpu/drm/i915/i915_driver.c | 2 ++
> drivers/gpu/drm/i915/i915_fb_pin.c | 8 +++++++-
> drivers/gpu/drm/i915/i915_fb_pin.h | 9 +++++++++
> drivers/gpu/drm/xe/display/xe_display.c | 2 ++
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 8 +++++++-
> drivers/gpu/drm/xe/display/xe_fb_pin.h | 9 +++++++++
> include/drm/intel/display_parent_interface.h | 8 ++++++++
> 13 files changed, 65 insertions(+), 9 deletions(-)
> create mode 100644 drivers/gpu/drm/i915/i915_fb_pin.h
> create mode 100644 drivers/gpu/drm/xe/display/xe_fb_pin.h
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.h b/drivers/gpu/drm/i915/display/intel_fb_pin.h
> index 5825503c38ea..805e23067004 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb_pin.h
> +++ b/drivers/gpu/drm/i915/display/intel_fb_pin.h
> @@ -35,6 +35,5 @@ void intel_fb_unpin_vma(struct i915_vma *vma, int fence_id);
> int intel_plane_pin_fb(struct intel_plane_state *new_plane_state,
> const struct intel_plane_state *old_plane_state);
> void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state);
> -void intel_fb_get_map(struct i915_vma *vma, struct iosys_map *map);
>
> #endif
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 9ab0ac49abb7..ce4082da30e8 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -55,6 +55,7 @@
> #include "intel_fb_pin.h"
> #include "intel_fbdev.h"
> #include "intel_frontbuffer.h"
> +#include "intel_parent.h"
> #include "intel_plane.h"
>
> struct intel_fbdev {
> @@ -563,7 +564,9 @@ struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev)
> return fbdev ? fbdev->vma : NULL;
> }
>
> -void intel_fbdev_get_map(struct intel_fbdev *fbdev, struct iosys_map *map)
> +void intel_fbdev_get_map(struct intel_display *display, struct iosys_map *map)
> {
> - intel_fb_get_map(fbdev->vma, map);
> + struct intel_fbdev *fbdev = display->fbdev.fbdev;
> +
> + intel_parent_fb_pin_get_map(display, fbdev->vma, map);
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.h b/drivers/gpu/drm/i915/display/intel_fbdev.h
> index 150cc5f45bb3..edaf5d16a456 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.h
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.h
> @@ -23,7 +23,7 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
> void intel_fbdev_setup(struct intel_display *display);
> struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev);
> struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev);
> -void intel_fbdev_get_map(struct intel_fbdev *fbdev, struct iosys_map *map);
> +void intel_fbdev_get_map(struct intel_display *display, struct iosys_map *map);
> #else
> #define INTEL_FBDEV_DRIVER_OPS \
> .fbdev_probe = NULL
> @@ -40,7 +40,7 @@ static inline struct i915_vma *intel_fbdev_vma_pointer(struct intel_fbdev *fbdev
> return NULL;
> }
>
> -static inline void intel_fbdev_get_map(struct intel_fbdev *fbdev, struct iosys_map *map)
> +static inline void intel_fbdev_get_map(struct intel_display *display, struct iosys_map *map)
> {
> }
> #endif
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.c b/drivers/gpu/drm/i915/display/intel_parent.c
> index 67b21a42d354..070cc60f49b3 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.c
> +++ b/drivers/gpu/drm/i915/display/intel_parent.c
> @@ -52,6 +52,13 @@ void intel_parent_dpt_resume(struct intel_display *display, struct intel_dpt *dp
> display->parent->dpt->resume(dpt);
> }
>
> +/* fb_pin */
> +void intel_parent_fb_pin_get_map(struct intel_display *display,
> + struct i915_vma *vma, struct iosys_map *map)
> +{
> + return display->parent->fb_pin->get_map(vma, map);
> +}
> +
> /* frontbuffer */
> struct intel_frontbuffer *intel_parent_frontbuffer_get(struct intel_display *display, struct drm_gem_object *obj)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.h b/drivers/gpu/drm/i915/display/intel_parent.h
> index 5f0c835b9416..2b9e829e7f47 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.h
> +++ b/drivers/gpu/drm/i915/display/intel_parent.h
> @@ -18,6 +18,7 @@ struct intel_frontbuffer;
> struct intel_hdcp_gsc_context;
> struct intel_panic;
> struct intel_stolen_node;
> +struct iosys_map;
>
> /* dpt */
> struct intel_dpt *intel_parent_dpt_create(struct intel_display *display,
> @@ -26,6 +27,10 @@ void intel_parent_dpt_destroy(struct intel_display *display, struct intel_dpt *d
> void intel_parent_dpt_suspend(struct intel_display *display, struct intel_dpt *dpt);
> void intel_parent_dpt_resume(struct intel_display *display, struct intel_dpt *dpt);
>
> +/* fb_pin */
> +void intel_parent_fb_pin_get_map(struct intel_display *display,
> + struct i915_vma *vma, struct iosys_map *map);
> +
> /* frontbuffer */
> struct intel_frontbuffer *intel_parent_frontbuffer_get(struct intel_display *display, struct drm_gem_object *obj);
> void intel_parent_frontbuffer_ref(struct intel_display *display, struct intel_frontbuffer *front);
> diff --git a/drivers/gpu/drm/i915/display/intel_plane.c b/drivers/gpu/drm/i915/display/intel_plane.c
> index c2b58d3b9c23..e50e1a15410a 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_plane.c
> @@ -1404,7 +1404,7 @@ static void intel_panic_flush(struct drm_plane *_plane)
> if (fb == intel_fbdev_framebuffer(display->fbdev.fbdev)) {
> struct iosys_map map;
>
> - intel_fbdev_get_map(display->fbdev.fbdev, &map);
> + intel_fbdev_get_map(display, &map);
> drm_clflush_virt_range(map.vaddr, fb->base.pitches[0] * fb->base.height);
> return;
> }
> @@ -1462,7 +1462,7 @@ static int intel_get_scanout_buffer(struct drm_plane *plane,
> return -ENODEV;
>
> if (fb == intel_fbdev_framebuffer(display->fbdev.fbdev)) {
> - intel_fbdev_get_map(display->fbdev.fbdev, &sb->map[0]);
> + intel_fbdev_get_map(display, &sb->map[0]);
> } else {
> int ret;
> /* Can't disable tiling if DPT is in use */
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index d31819758f3d..c23436be5973 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -99,6 +99,7 @@
> #include "i915_drv.h"
> #include "i915_dsb_buffer.h"
> #include "i915_edram.h"
> +#include "i915_fb_pin.h"
> #include "i915_file_private.h"
> #include "i915_getparam.h"
> #include "i915_gmch.h"
> @@ -769,6 +770,7 @@ static const struct intel_display_parent_interface parent = {
> .bo = &i915_display_bo_interface,
> .dpt = &i915_display_dpt_interface,
> .dsb = &i915_display_dsb_interface,
> + .fb_pin = &i915_display_fb_pin_interface,
> .frontbuffer = &i915_display_frontbuffer_interface,
> .hdcp = &i915_display_hdcp_interface,
> .initial_plane = &i915_display_initial_plane_interface,
> diff --git a/drivers/gpu/drm/i915/i915_fb_pin.c b/drivers/gpu/drm/i915/i915_fb_pin.c
> index b0e121462ca3..b800b55530a5 100644
> --- a/drivers/gpu/drm/i915/i915_fb_pin.c
> +++ b/drivers/gpu/drm/i915/i915_fb_pin.c
> @@ -8,6 +8,7 @@
> */
>
> #include <drm/drm_print.h>
> +#include <drm/intel/display_parent_interface.h>
>
> #include "display/intel_display_core.h"
> #include "display/intel_display_types.h"
> @@ -18,6 +19,7 @@
> #include "gem/i915_gem_domain.h"
> #include "gem/i915_gem_object.h"
>
> +#include "i915_fb_pin.h"
> #include "i915_dpt.h"
> #include "i915_drv.h"
> #include "i915_vma.h"
> @@ -352,7 +354,11 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
> }
> }
>
> -void intel_fb_get_map(struct i915_vma *vma, struct iosys_map *map)
> +static void i915_fb_pin_get_map(struct i915_vma *vma, struct iosys_map *map)
> {
> iosys_map_set_vaddr_iomem(map, i915_vma_get_iomap(vma));
> }
> +
> +const struct intel_display_fb_pin_interface i915_display_fb_pin_interface = {
> + .get_map = i915_fb_pin_get_map,
> +};
> diff --git a/drivers/gpu/drm/i915/i915_fb_pin.h b/drivers/gpu/drm/i915/i915_fb_pin.h
> new file mode 100644
> index 000000000000..18c6c0b61ab8
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_fb_pin.h
> @@ -0,0 +1,9 @@
> +/* SPDX-License-Identifier: MIT */
> +/* Copyright © 2026 Intel Corporation */
> +
> +#ifndef __I915_FB_PIN_H__
> +#define __I915_FB_PIN_H__
> +
> +extern const struct intel_display_fb_pin_interface i915_display_fb_pin_interface;
> +
> +#endif /* __I915_FB_PIN_H__ */
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 0747044f7c2a..aa73023b7398 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -40,6 +40,7 @@
> #include "xe_display_pcode.h"
> #include "xe_display_rpm.h"
> #include "xe_dsb_buffer.h"
> +#include "xe_fb_pin.h"
> #include "xe_frontbuffer.h"
> #include "xe_hdcp_gsc.h"
> #include "xe_initial_plane.h"
> @@ -553,6 +554,7 @@ static bool has_auxccs(struct drm_device *drm)
> static const struct intel_display_parent_interface parent = {
> .bo = &xe_display_bo_interface,
> .dsb = &xe_display_dsb_interface,
> + .fb_pin = &xe_display_fb_pin_interface,
> .frontbuffer = &xe_display_frontbuffer_interface,
> .hdcp = &xe_display_hdcp_interface,
> .initial_plane = &xe_display_initial_plane_interface,
> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> index 948446346c53..afb6cdda537e 100644
> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> @@ -3,6 +3,7 @@
> * Copyright © 2021 Intel Corporation
> */
>
> +#include <drm/intel/display_parent_interface.h>
> #include <drm/ttm/ttm_bo.h>
>
> #include "intel_display_core.h"
> @@ -13,6 +14,7 @@
> #include "xe_bo.h"
> #include "xe_device.h"
> #include "xe_display_vma.h"
> +#include "xe_fb_pin.h"
> #include "xe_ggtt.h"
> #include "xe_pat.h"
> #include "xe_pm.h"
> @@ -498,7 +500,11 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
> old_plane_state->ggtt_vma = NULL;
> }
>
> -void intel_fb_get_map(struct i915_vma *vma, struct iosys_map *map)
> +static void xe_fb_pin_get_map(struct i915_vma *vma, struct iosys_map *map)
> {
> *map = vma->bo->vmap;
> }
> +
> +const struct intel_display_fb_pin_interface xe_display_fb_pin_interface = {
> + .get_map = xe_fb_pin_get_map,
> +};
> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.h b/drivers/gpu/drm/xe/display/xe_fb_pin.h
> new file mode 100644
> index 000000000000..8a42d4009f5d
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.h
> @@ -0,0 +1,9 @@
> +/* SPDX-License-Identifier: MIT */
> +/* Copyright © 2026 Intel Corporation */
> +
> +#ifndef __XE_FB_PIN_H__
> +#define __XE_FB_PIN_H__
> +
> +extern const struct intel_display_fb_pin_interface xe_display_fb_pin_interface;
> +
> +#endif /* __XE_FB_PIN_H__ */
> diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
> index 270dc028bec2..ee2e9572bfca 100644
> --- a/include/drm/intel/display_parent_interface.h
> +++ b/include/drm/intel/display_parent_interface.h
> @@ -24,6 +24,7 @@ struct intel_hdcp_gsc_context;
> struct intel_initial_plane_config;
> struct intel_panic;
> struct intel_stolen_node;
> +struct iosys_map;
> struct ref_tracker;
> struct seq_file;
> struct vm_area_struct;
> @@ -69,6 +70,10 @@ struct intel_display_dsb_interface {
> void (*flush_map)(struct intel_dsb_buffer *dsb_buf);
> };
>
> +struct intel_display_fb_pin_interface {
> + void (*get_map)(struct i915_vma *vma, struct iosys_map *map);
> +};
> +
> struct intel_display_frontbuffer_interface {
> struct intel_frontbuffer *(*get)(struct drm_gem_object *obj);
> void (*ref)(struct intel_frontbuffer *front);
> @@ -211,6 +216,9 @@ struct intel_display_parent_interface {
> /** @dsb: DSB buffer interface */
> const struct intel_display_dsb_interface *dsb;
>
> + /** @fb_pin: Framebuffer pin interface */
> + const struct intel_display_fb_pin_interface *fb_pin;
> +
> /** @frontbuffer: Frontbuffer interface */
> const struct intel_display_frontbuffer_interface *frontbuffer;
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-04-24 9:14 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 16:53 [PATCH 00/16] drm/i915: Introduce 'fb_pin' parent interface Ville Syrjala
2026-04-23 16:53 ` [PATCH 01/16] drm/i915: Introduce intel_parent_fb_pin_get_map() Ville Syrjala
2026-04-24 9:14 ` Jani Nikula [this message]
2026-04-23 16:53 ` [PATCH 02/16] drm/i915: Move intel_fb_pin_params to the parent interface Ville Syrjala
2026-04-24 9:19 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 03/16] drm/i915: Move the i915_dpt_offset()==0 assert Ville Syrjala
2026-04-24 9:19 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 04/16] drm/i915: Reorganize intel_plane_pin_fb() a bit Ville Syrjala
2026-04-24 9:55 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 05/16] drm/i915: Introduce i915_fb_pin_dpt_(un)pin() Ville Syrjala
2026-04-24 9:56 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 06/16] drm/i915: Introduce i915_fb_pin_ggtt_(un)pin() Ville Syrjala
2026-04-24 9:59 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 07/16] drm/xe: Move the FORCE_WC assert into __xe_pin_fb_vma() Ville Syrjala
2026-04-24 10:02 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 08/16] drm/xe: Kill the fbdev vma reuse hack Ville Syrjala
2026-04-24 10:06 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 09/16] drm/xe: Reorganize intel_plane_pin_fb() a bit Ville Syrjala
2026-04-24 10:07 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 10/16] drm/xe: Introduce xe_fb_pin_dpt_(un)pin() Ville Syrjala
2026-04-24 10:12 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 11/16] drm/xe: Introduce xe_fb_pin_ggtt_(un)pin() Ville Syrjala
2026-04-24 10:13 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 12/16] drm/xe: Restructure reuse_vma() Ville Syrjala
2026-04-24 10:30 ` Jani Nikula
2026-04-30 16:19 ` [PATCH v2 " Ville Syrjala
2026-04-23 16:53 ` [PATCH 13/16] drm/i915: Introduce the main fb_pin parent interface Ville Syrjala
2026-04-24 10:48 ` Jani Nikula
2026-04-24 10:55 ` Ville Syrjälä
2026-04-23 16:53 ` [PATCH 14/16] drm/i915/fbdev: Use intel_parent_fb_pin_ggtt_(un)pin() Ville Syrjala
2026-04-24 12:54 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 15/16] drm/xe: Use xe_fb_pin_ggtt_pin() for the initial FB pin Ville Syrjala
2026-04-24 12:58 ` Jani Nikula
2026-04-23 16:53 ` [PATCH 16/16] drm/i915: Consolidate the intel_plane_(un)pin_fb() implementations Ville Syrjala
2026-04-24 13:30 ` Jani Nikula
2026-04-27 12:08 ` Ville Syrjälä
2026-04-23 17:01 ` ✗ CI.checkpatch: warning for drm/i915: Introduce 'fb_pin' parent interface Patchwork
2026-04-23 17:02 ` ✓ CI.KUnit: success " Patchwork
2026-04-30 18:10 ` ✗ CI.checkpatch: warning for drm/i915: Introduce 'fb_pin' parent interface (rev2) Patchwork
2026-04-30 18:11 ` ✓ CI.KUnit: success " Patchwork
2026-04-30 19:15 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-05-01 6:29 ` ✓ Xe.CI.FULL: success " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cfbcaeb2a7a96b0a6f91e7f0e9b42313a8371f1d@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox