]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/i915/display: include xe_bo.h, gem_object_types etc. where needed
authorJani Nikula <jani.nikula@intel.com>
Wed, 29 May 2024 17:48:10 +0000 (20:48 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 6 Jun 2024 13:00:03 +0000 (16:00 +0300)
Include what you use. The dependencies on the headers, and what they
include, is a bit convoluted. Add xe compat gem/gem_object_types.h. Fix
all the places needed.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e9ca3d6127ea22f252d9dbf30cfde99e37538c99.1717004739.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_atomic_plane.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h [new file with mode: 0644]
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
drivers/gpu/drm/xe/display/intel_fb_bo.c
drivers/gpu/drm/xe/display/intel_fbdev_fb.c
drivers/gpu/drm/xe/display/xe_fb_pin.c
drivers/gpu/drm/xe/display/xe_plane_initial.c

index a4ce39a7f2652f6902fa9cbb28860eda53f02e5a..980c5dc70763186d4c3370fa7370e3becdcae473 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #include <linux/dma-fence-chain.h>
+#include <linux/dma-resv.h>
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_gem_atomic_helper.h>
index 77609656317b5ce0d0ba7568c1bf42cc8ac6d05a..83d6a3d901fd7a2ce541d9dd8d2e2cac116ea411 100644 (file)
@@ -47,6 +47,7 @@
 #include <drm/intel/i915_hdcp_interface.h>
 #include <media/cec-notifier.h>
 
+#include "gem/i915_gem_object_types.h" /* for to_intel_bo() */
 #include "i915_vma.h"
 #include "i915_vma_types.h"
 #include "intel_bios.h"
index b6638726949d1fda1a3294b676b4ea50aeeafd2d..8069abf91c5e06f2b17abc7a552a6beabf6fad02 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/dma-fence.h>
 #include <linux/dma-resv.h>
 
+#include "gem/i915_gem_object.h"
 #include "i915_drv.h"
 #include "intel_display.h"
 #include "intel_display_types.h"
index 5ad0b4c8a0fdfdb7f82780b0df5c84404be31906..37ae176bfeb0028210c2554605b9498eb11a5091 100644 (file)
@@ -44,6 +44,7 @@
 #include <drm/drm_gem_framebuffer_helper.h>
 
 #include "gem/i915_gem_mman.h"
+#include "gem/i915_gem_object.h"
 
 #include "i915_drv.h"
 #include "intel_display_types.h"
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h
new file mode 100644 (file)
index 0000000..7d6bb1a
--- /dev/null
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2024 Intel Corporation */
+
+#ifndef __I915_GEM_OBJECT_TYPES_H__
+#define __I915_GEM_OBJECT_TYPES_H__
+
+#include "xe_bo.h"
+
+#define to_intel_bo(x) gem_to_xe_bo((x))
+
+#endif
index ef04d965a574f243779eb31dd15190f641efe010..1da5e67cda29b8236c32473d12daeaddea7e0278 100644 (file)
 
 #include <drm/drm_drv.h>
 
-#include "gem/i915_gem_object.h"
-
 #include "soc/intel_pch.h"
 #include "xe_device.h"
-#include "xe_bo.h"
 #include "xe_pm.h"
 #include "i915_reg_defs.h"
 #include "i915_utils.h"
@@ -112,7 +109,6 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
 #define IS_RAPTORLAKE_U(xe) ((xe)->info.subplatform == XE_SUBPLATFORM_ALDERLAKE_P_RPLU)
 #define IS_ICL_WITH_PORT_F(xe) (xe && 0)
 #define HAS_FLAT_CCS(xe) (xe_device_has_flat_ccs(xe))
-#define to_intel_bo(x) gem_to_xe_bo((x))
 
 #define HAS_128_BYTE_Y_TILING(xe) (xe || 1)
 
index e18521acc516f65f384b20fcdce9437bb19a7843..b89cda053d2c6309c53983be53204b01baa730db 100644 (file)
@@ -4,10 +4,12 @@
  */
 
 #include <drm/drm_modeset_helper.h>
+#include <drm/ttm/ttm_bo.h>
 
 #include "i915_drv.h"
 #include "intel_display_types.h"
 #include "intel_fb_bo.h"
+#include "xe_bo.h"
 
 void intel_fb_bo_framebuffer_fini(struct xe_bo *bo)
 {
index f6bf5896ff1be4a936396a65baf0d60ac3a0138a..5ecc7d4679348ddcdf8ec226f9d54141c8b14b8e 100644 (file)
@@ -3,15 +3,14 @@
  * Copyright © 2023 Intel Corporation
  */
 
-#include "intel_fbdev_fb.h"
-
 #include <drm/drm_fb_helper.h>
 
-#include "xe_gt.h"
-#include "xe_ttm_stolen_mgr.h"
-
 #include "i915_drv.h"
 #include "intel_display_types.h"
+#include "intel_fbdev_fb.h"
+#include "xe_bo.h"
+#include "xe_gt.h"
+#include "xe_ttm_stolen_mgr.h"
 
 struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
                                               struct drm_fb_helper_surface_size *sizes)
index 36e15c4961c11b2fea1f806eb3f2b65b0d86cd39..0449cdb892f3e21b885840d5a7f83049bf0b65a1 100644 (file)
@@ -3,17 +3,18 @@
  * Copyright © 2021 Intel Corporation
  */
 
+#include <drm/ttm/ttm_bo.h>
+
 #include "i915_drv.h"
 #include "intel_display_types.h"
 #include "intel_dpt.h"
 #include "intel_fb.h"
 #include "intel_fb_pin.h"
+#include "xe_bo.h"
 #include "xe_ggtt.h"
 #include "xe_gt.h"
 #include "xe_pm.h"
 
-#include <drm/ttm/ttm_bo.h>
-
 static void
 write_dpt_rotated(struct xe_bo *bo, struct iosys_map *map, u32 *dpt_ofs, u32 bo_ofs,
                  u32 width, u32 height, u32 src_stride, u32 dst_stride)
index 9eaa29e733e1aa282d7d47656ac9e76cad70117f..7672a0cffbd8f69d3cbae7418c68d461cea6e475 100644 (file)
@@ -18,6 +18,7 @@
 #include "intel_fb_pin.h"
 #include "intel_frontbuffer.h"
 #include "intel_plane_initial.h"
+#include "xe_bo.h"
 
 static bool
 intel_reuse_initial_plane_obj(struct intel_crtc *this,