From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [RFC] drm/i915: move i915 specific display adaptation files to display-adapt
Date: Thu, 16 Oct 2025 15:42:01 -0400 [thread overview]
Message-ID: <aPFKieIQItOPUE0d@intel.com> (raw)
In-Reply-To: <20251015160140.2296120-1-jani.nikula@intel.com>
On Wed, Oct 15, 2025 at 07:01:40PM +0300, Jani Nikula wrote:
> The display/ subdirectory currently contains files that are about i915
> core driver adaptation to display rather than generic display
> implementation. Move them to a new i915 subdirectory display-adapt/.
>
> In the xe driver, all of its display/ is basically xe core adaptation to
> display. It's just that i915 display/ contains the actual display
> implementation for both. Ideally, we'd have the shared display code
> somewhere else, and the adaptation in i915 would be under display/, but
> we're not quite ready for that kind of churn yet. So let's just call it
> display-adapt for now.
>
> xe basically has equivalent files to the ones that are being moved,
> apart from intel_dpt.c, for which the implementation is quite different.
>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/Makefile | 23 +++++++++++--------
> .../{display => display-adapt}/intel_bo.c | 3 ++-
> .../intel_display_rpm.c | 5 ++--
> .../{display => display-adapt}/intel_dpt.c | 11 +++++----
> .../intel_dsb_buffer.c | 5 ++--
> .../{display => display-adapt}/intel_fb_bo.c | 9 ++++----
> .../{display => display-adapt}/intel_fb_pin.c | 14 +++++------
> .../intel_fbdev_fb.c | 5 +++-
> .../intel_hdcp_gsc.c | 2 +-
> .../{display => display-adapt}/intel_panic.c | 6 ++---
> .../intel_plane_initial.c | 17 +++++++-------
> 11 files changed, 56 insertions(+), 44 deletions(-)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_bo.c (98%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_display_rpm.c (95%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_dpt.c (97%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_dsb_buffer.c (96%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_fb_bo.c (94%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_fb_pin.c (97%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_fbdev_fb.c (94%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_hdcp_gsc.c (99%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_panic.c (84%)
> rename drivers/gpu/drm/i915/{display => display-adapt}/intel_plane_initial.c (97%)
or perhaps we are ready to move everything else not in above list to
to drivers/gpu/drm/intel-display/ ?
then keep i915/display like the xe/display both as this adapt layer
tending minimize or even die at some point?!
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 6d7800e25e55..6000748fc0b3 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -221,6 +221,18 @@ i915-y += \
> i915-$(CONFIG_HWMON) += \
> i915_hwmon.o
>
> +# display adaptation
> +i915-y += \
> + display-adapt/intel_bo.o \
> + display-adapt/intel_display_rpm.o \
> + display-adapt/intel_dpt.o \
> + display-adapt/intel_dsb_buffer.o \
> + display-adapt/intel_fb_bo.o \
> + display-adapt/intel_fb_pin.o \
> + display-adapt/intel_hdcp_gsc.o \
> + display-adapt/intel_panic.o \
> + display-adapt/intel_plane_initial.o
> +
> # modesetting core code
> i915-y += \
> display/hsw_ips.o \
> @@ -231,7 +243,6 @@ i915-y += \
> display/intel_atomic.o \
> display/intel_audio.o \
> display/intel_bios.o \
> - display/intel_bo.o \
> display/intel_bw.o \
> display/intel_cdclk.o \
> display/intel_cmtg.o \
> @@ -250,7 +261,6 @@ i915-y += \
> display/intel_display_power_map.o \
> display/intel_display_power_well.o \
> display/intel_display_reset.o \
> - display/intel_display_rpm.o \
> display/intel_display_rps.o \
> display/intel_display_snapshot.o \
> display/intel_display_wa.o \
> @@ -259,14 +269,10 @@ i915-y += \
> display/intel_dpio_phy.o \
> display/intel_dpll.o \
> display/intel_dpll_mgr.o \
> - display/intel_dpt.o \
> display/intel_dpt_common.o \
> display/intel_drrs.o \
> display/intel_dsb.o \
> - display/intel_dsb_buffer.o \
> display/intel_fb.o \
> - display/intel_fb_bo.o \
> - display/intel_fb_pin.o \
> display/intel_fbc.o \
> display/intel_fdi.o \
> display/intel_fifo_underrun.o \
> @@ -274,7 +280,6 @@ i915-y += \
> display/intel_frontbuffer.o \
> display/intel_global_state.o \
> display/intel_hdcp.o \
> - display/intel_hdcp_gsc.o \
> display/intel_hdcp_gsc_message.o \
> display/intel_hotplug.o \
> display/intel_hotplug_irq.o \
> @@ -286,12 +291,10 @@ i915-y += \
> display/intel_modeset_setup.o \
> display/intel_modeset_verify.o \
> display/intel_overlay.o \
> - display/intel_panic.o \
> display/intel_pch.o \
> display/intel_pch_display.o \
> display/intel_pch_refclk.o \
> display/intel_plane.o \
> - display/intel_plane_initial.o \
> display/intel_pmdemand.o \
> display/intel_psr.o \
> display/intel_quirks.o \
> @@ -312,7 +315,7 @@ i915-$(CONFIG_ACPI) += \
> display/intel_opregion.o
> i915-$(CONFIG_DRM_FBDEV_EMULATION) += \
> display/intel_fbdev.o \
> - display/intel_fbdev_fb.o
> + display-adapt/intel_fbdev_fb.o
> i915-$(CONFIG_DEBUG_FS) += \
> display/intel_display_debugfs.o \
> display/intel_display_debugfs_params.o \
> diff --git a/drivers/gpu/drm/i915/display/intel_bo.c b/drivers/gpu/drm/i915/display-adapt/intel_bo.c
> similarity index 98%
> rename from drivers/gpu/drm/i915/display/intel_bo.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_bo.c
> index 6ae1374d5c2b..bd3956d09aab 100644
> --- a/drivers/gpu/drm/i915/display/intel_bo.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_bo.c
> @@ -3,11 +3,12 @@
>
> #include <drm/drm_panic.h>
>
> +#include "display/intel_bo.h"
> +
> #include "gem/i915_gem_mman.h"
> #include "gem/i915_gem_object.h"
> #include "gem/i915_gem_object_frontbuffer.h"
> #include "i915_debugfs.h"
> -#include "intel_bo.h"
>
> bool intel_bo_is_tiled(struct drm_gem_object *obj)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_display_rpm.c b/drivers/gpu/drm/i915/display-adapt/intel_display_rpm.c
> similarity index 95%
> rename from drivers/gpu/drm/i915/display/intel_display_rpm.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_display_rpm.c
> index 56c4024201c1..b7a7fd32ef8b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_rpm.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_display_rpm.c
> @@ -1,9 +1,10 @@
> // SPDX-License-Identifier: MIT
> /* Copyright © 2025 Intel Corporation */
>
> +#include "display/intel_display_core.h"
> +#include "display/intel_display_rpm.h"
> +
> #include "i915_drv.h"
> -#include "intel_display_core.h"
> -#include "intel_display_rpm.h"
> #include "intel_runtime_pm.h"
>
> static struct intel_runtime_pm *display_to_rpm(struct intel_display *display)
> diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display-adapt/intel_dpt.c
> similarity index 97%
> rename from drivers/gpu/drm/i915/display/intel_dpt.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_dpt.c
> index c0a817018d08..57f3f22ab940 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpt.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_dpt.c
> @@ -8,12 +8,13 @@
> #include "gem/i915_gem_lmem.h"
> #include "gt/gen8_ppgtt.h"
>
> +#include "display/intel_display_core.h"
> +#include "display/intel_display_rpm.h"
> +#include "display/intel_display_types.h"
> +#include "display/intel_dpt.h"
> +#include "display/intel_fb.h"
> +
> #include "i915_drv.h"
> -#include "intel_display_core.h"
> -#include "intel_display_rpm.h"
> -#include "intel_display_types.h"
> -#include "intel_dpt.h"
> -#include "intel_fb.h"
>
> struct i915_dpt {
> struct i915_address_space vm;
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb_buffer.c b/drivers/gpu/drm/i915/display-adapt/intel_dsb_buffer.c
> similarity index 96%
> rename from drivers/gpu/drm/i915/display/intel_dsb_buffer.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_dsb_buffer.c
> index c77d48bda26a..fcede0bef9ac 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb_buffer.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_dsb_buffer.c
> @@ -3,12 +3,13 @@
> * Copyright 2023, Intel Corporation.
> */
>
> +#include "display/intel_display_types.h"
> +#include "display/intel_dsb_buffer.h"
> +
> #include "gem/i915_gem_internal.h"
> #include "gem/i915_gem_lmem.h"
> #include "i915_drv.h"
> #include "i915_vma.h"
> -#include "intel_display_types.h"
> -#include "intel_dsb_buffer.h"
>
> u32 intel_dsb_buffer_ggtt_offset(struct intel_dsb_buffer *dsb_buf)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_fb_bo.c b/drivers/gpu/drm/i915/display-adapt/intel_fb_bo.c
> similarity index 94%
> rename from drivers/gpu/drm/i915/display/intel_fb_bo.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_fb_bo.c
> index 7336d7294a7b..89fb6d44cdd8 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb_bo.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_fb_bo.c
> @@ -7,11 +7,12 @@
>
> #include "gem/i915_gem_object.h"
>
> +#include "display/intel_display_core.h"
> +#include "display/intel_display_types.h"
> +#include "display/intel_fb.h"
> +#include "display/intel_fb_bo.h"
> +
> #include "i915_drv.h"
> -#include "intel_display_core.h"
> -#include "intel_display_types.h"
> -#include "intel_fb.h"
> -#include "intel_fb_bo.h"
>
> void intel_fb_bo_framebuffer_fini(struct drm_gem_object *obj)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display-adapt/intel_fb_pin.c
> similarity index 97%
> rename from drivers/gpu/drm/i915/display/intel_fb_pin.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_fb_pin.c
> index 45af04cb0fb2..3f33f067ec17 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb_pin.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_fb_pin.c
> @@ -7,18 +7,18 @@
> * DOC: display pinning helpers
> */
>
> +#include "display/intel_display_core.h"
> +#include "display/intel_display_rpm.h"
> +#include "display/intel_display_types.h"
> +#include "display/intel_dpt.h"
> +#include "display/intel_fb.h"
> +#include "display/intel_fb_pin.h"
> +#include "display/intel_plane.h"
> #include "gem/i915_gem_domain.h"
> #include "gem/i915_gem_object.h"
>
> #include "i915_drv.h"
> #include "i915_vma.h"
> -#include "intel_display_core.h"
> -#include "intel_display_rpm.h"
> -#include "intel_display_types.h"
> -#include "intel_dpt.h"
> -#include "intel_fb.h"
> -#include "intel_fb_pin.h"
> -#include "intel_plane.h"
>
> static struct i915_vma *
> intel_fb_pin_to_dpt(const struct drm_framebuffer *fb,
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c b/drivers/gpu/drm/i915/display-adapt/intel_fbdev_fb.c
> similarity index 94%
> rename from drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_fbdev_fb.c
> index 56b145841473..15684cccd85e 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_fbdev_fb.c
> @@ -5,10 +5,13 @@
>
> #include <linux/fb.h>
>
> +#include "display/intel_display_core.h"
> +#include "display/intel_display_types.h"
> +#include "display/intel_fb.h"
> +#include "display/intel_fbdev_fb.h"
> #include "gem/i915_gem_lmem.h"
>
> #include "i915_drv.h"
> -#include "intel_fbdev_fb.h"
>
> struct drm_gem_object *intel_fbdev_fb_bo_create(struct drm_device *drm, int size)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c b/drivers/gpu/drm/i915/display-adapt/intel_hdcp_gsc.c
> similarity index 99%
> rename from drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_hdcp_gsc.c
> index 6a22862d6be1..16f1e61b090b 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_hdcp_gsc.c
> @@ -5,12 +5,12 @@
>
> #include <drm/intel/i915_hdcp_interface.h>
>
> +#include "display/intel_hdcp_gsc.h"
> #include "gem/i915_gem_region.h"
> #include "gt/intel_gt.h"
> #include "gt/uc/intel_gsc_uc_heci_cmd_submit.h"
> #include "i915_drv.h"
> #include "i915_utils.h"
> -#include "intel_hdcp_gsc.h"
>
> struct intel_hdcp_gsc_context {
> struct drm_i915_private *i915;
> diff --git a/drivers/gpu/drm/i915/display/intel_panic.c b/drivers/gpu/drm/i915/display-adapt/intel_panic.c
> similarity index 84%
> rename from drivers/gpu/drm/i915/display/intel_panic.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_panic.c
> index 7311ce4e8b6c..028ff83b2519 100644
> --- a/drivers/gpu/drm/i915/display/intel_panic.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_panic.c
> @@ -3,10 +3,10 @@
>
> #include <drm/drm_panic.h>
>
> +#include "display/intel_display_types.h"
> +#include "display/intel_fb.h"
> +#include "display/intel_panic.h"
> #include "gem/i915_gem_object.h"
> -#include "intel_display_types.h"
> -#include "intel_fb.h"
> -#include "intel_panic.h"
>
> struct intel_panic *intel_panic_alloc(void)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display-adapt/intel_plane_initial.c
> similarity index 97%
> rename from drivers/gpu/drm/i915/display/intel_plane_initial.c
> rename to drivers/gpu/drm/i915/display-adapt/intel_plane_initial.c
> index a9f36b1b50c1..57336ca6b0ed 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
> +++ b/drivers/gpu/drm/i915/display-adapt/intel_plane_initial.c
> @@ -3,17 +3,18 @@
> * Copyright © 2021 Intel Corporation
> */
>
> +#include "display/intel_crtc.h"
> +#include "display/intel_display.h"
> +#include "display/intel_display_core.h"
> +#include "display/intel_display_types.h"
> +#include "display/intel_fb.h"
> +#include "display/intel_frontbuffer.h"
> +#include "display/intel_plane.h"
> +#include "display/intel_plane_initial.h"
> #include "gem/i915_gem_lmem.h"
> #include "gem/i915_gem_region.h"
> +
> #include "i915_drv.h"
> -#include "intel_crtc.h"
> -#include "intel_display.h"
> -#include "intel_display_core.h"
> -#include "intel_display_types.h"
> -#include "intel_fb.h"
> -#include "intel_frontbuffer.h"
> -#include "intel_plane.h"
> -#include "intel_plane_initial.h"
>
> void intel_plane_initial_vblank_wait(struct intel_crtc *crtc)
> {
> --
> 2.47.3
>
next prev parent reply other threads:[~2025-10-16 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 16:01 [RFC] drm/i915: move i915 specific display adaptation files to display-adapt Jani Nikula
2025-10-15 19:45 ` ✓ i915.CI.BAT: success for " Patchwork
2025-10-16 2:04 ` ✗ i915.CI.Full: failure " Patchwork
2025-10-16 19:42 ` Rodrigo Vivi [this message]
2025-10-21 9:00 ` [RFC] " Jani Nikula
2025-10-21 15:03 ` Rodrigo Vivi
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=aPFKieIQItOPUE0d@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).