Commit 4799ff41 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915: add .has_fenced_regions to parent interface



Add .has_fenced_regions() to display parent interface, removing more
dependencies on struct drm_i915_private, i915_drv.h, and
gt/intel_gt_types.h.

This allows us to remove the xe compat gt/intel_gt_types.h.

v2: s/fence_support_legacy/has_fenced_regions/ (Ville)

Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/309f61a8742c3bf731c820b2f9e1024143db8598.1763370931.git.jani.nikula@intel.com


Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent e8916738
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -47,9 +47,6 @@

#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"
@@ -64,6 +61,7 @@
#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)++) \
@@ -267,9 +265,7 @@ static u16 intel_fbc_override_cfb_stride(const struct intel_plane_state *plane_s

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)
+5 −0
Original line number Diff line number Diff line
@@ -36,3 +36,8 @@ bool intel_parent_vgpu_active(struct intel_display *display)
{
	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);
}
+2 −0
Original line number Diff line number Diff line
@@ -13,4 +13,6 @@ void intel_parent_irq_synchronize(struct intel_display *display);

bool intel_parent_vgpu_active(struct intel_display *display);

bool intel_parent_has_fenced_regions(struct intel_display *display);

#endif /* __INTEL_PARENT_H__ */
+6 −0
Original line number Diff line number Diff line
@@ -744,10 +744,16 @@ static bool vgpu_active(struct drm_device *drm)
	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)
+0 −11
Original line number Diff line number Diff line
/* 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
Loading