#include "gem/i915_gem_stolen.h"
-#include "gt/intel_gt_types.h"
-
-#include "i915_drv.h"
#include "i915_vma.h"
#include "i9xx_plane_regs.h"
#include "intel_de.h"
#include "intel_fbc_regs.h"
#include "intel_frontbuffer.h"
#include "intel_parent.h"
+#include "intel_step.h"
#define for_each_fbc_id(__display, __fbc_id) \
for ((__fbc_id) = INTEL_FBC_A; (__fbc_id) < I915_MAX_FBCS; (__fbc_id)++) \
static bool intel_fbc_has_fences(struct intel_display *display)
{
- struct drm_i915_private __maybe_unused *i915 = to_i915(display->drm);
-
- return intel_gt_support_legacy_fencing(to_gt(i915));
+ return intel_parent_has_fenced_regions(display);
}
static u32 i8xx_fbc_ctl(struct intel_fbc *fbc)
{
return display->parent->vgpu_active && display->parent->vgpu_active(display->drm);
}
+
+bool intel_parent_has_fenced_regions(struct intel_display *display)
+{
+ return display->parent->has_fenced_regions && display->parent->has_fenced_regions(display->drm);
+}
bool intel_parent_vgpu_active(struct intel_display *display);
+bool intel_parent_has_fenced_regions(struct intel_display *display);
+
#endif /* __INTEL_PARENT_H__ */
return intel_vgpu_active(to_i915(drm));
}
+static bool has_fenced_regions(struct drm_device *drm)
+{
+ return intel_gt_support_legacy_fencing(to_gt(to_i915(drm)));
+}
+
static const struct intel_display_parent_interface parent = {
.rpm = &i915_display_rpm_interface,
.irq = &i915_display_irq_interface,
.vgpu_active = vgpu_active,
+ .has_fenced_regions = has_fenced_regions,
};
const struct intel_display_parent_interface *i915_driver_parent_interface(void)
+++ /dev/null
-/* SPDX-License-Identifier: MIT */
-/*
- * Copyright © 2023 Intel Corporation
- */
-
-#ifndef __INTEL_GT_TYPES__
-#define __INTEL_GT_TYPES__
-
-#define intel_gt_support_legacy_fencing(gt) 0
-
-#endif
/** @vgpu_active: Is vGPU active? Optional. */
bool (*vgpu_active)(struct drm_device *drm);
+
+ /** @has_fenced_regions: Support legacy fencing? Optional. */
+ bool (*has_fenced_regions)(struct drm_device *drm);
};
#endif