Skip to content

Commit 2fff55d

Browse files
committed
drm/xe/compat: refactor compat i915_drv.h
The compat i915_drv.h contains things that aren't there in the original i915_drv.h. Split out gem/i915_gem_object.h and i915_scheduler_types.h, moving the corresponding pieces out, including FORCEWAKE_ALL to intel_uncore.h. Technically I915_PRIORITY_DISPLAY should be in i915_priolist_types.h, but it's a bit overkill to split out another file just for that. i915_scheduler_types.h shall do. With this, the compat i915_drv.h becomes a strict subset of the original. Reviewed-by: Nemesa Garg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/d6bd95bf52aa37f48ddec3e675b7a3cc66829eef.1741192597.git.jani.nikula@intel.com [Jani: fix i915_gem_object.h header guard while applying] Signed-off-by: Jani Nikula <[email protected]>
1 parent fb64f55 commit 2fff55d

File tree

5 files changed

+32
-8
lines changed

5 files changed

+32
-8
lines changed

drivers/gpu/drm/i915/display/intel_atomic_plane.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
#include <drm/drm_gem.h>
4242
#include <drm/drm_gem_atomic_helper.h>
4343

44+
#include "gem/i915_gem_object.h"
4445
#include "i915_config.h"
4546
#include "i915_drv.h"
47+
#include "i915_scheduler_types.h"
4648
#include "i915_vma.h"
4749
#include "i9xx_plane_regs.h"
4850
#include "intel_atomic_plane.h"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/* Copyright © 2025 Intel Corporation */
3+
4+
#ifndef __I915_GEM_OBJECT_H__
5+
#define __I915_GEM_OBJECT_H__
6+
7+
struct dma_fence;
8+
struct i915_sched_attr;
9+
10+
static inline void i915_gem_fence_wait_priority(struct dma_fence *fence,
11+
const struct i915_sched_attr *attr)
12+
{
13+
}
14+
15+
#endif

drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
9595

9696
#define HAS_128_BYTE_Y_TILING(xe) (xe || 1)
9797

98-
#define I915_PRIORITY_DISPLAY 0
99-
struct i915_sched_attr {
100-
int priority;
101-
};
102-
#define i915_gem_fence_wait_priority(fence, attr) do { (void) attr; } while (0)
103-
104-
#define FORCEWAKE_ALL XE_FORCEWAKE_ALL
105-
10698
#ifdef CONFIG_ARM64
10799
/*
108100
* arm64 indirectly includes linux/rtc.h,
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/* Copyright © 2025 Intel Corporation */
3+
4+
#ifndef __I915_SCHEDULER_TYPES_H__
5+
#define __I915_SCHEDULER_TYPES_H__
6+
7+
#define I915_PRIORITY_DISPLAY 0
8+
9+
struct i915_sched_attr {
10+
int priority;
11+
};
12+
13+
#endif

drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include "xe_device_types.h"
1111
#include "xe_mmio.h"
1212

13+
#define FORCEWAKE_ALL XE_FORCEWAKE_ALL
14+
1315
static inline struct intel_uncore *to_intel_uncore(struct drm_device *drm)
1416
{
1517
return &to_xe_device(drm)->uncore;

0 commit comments

Comments
 (0)