Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/309f61a8742c3bf731c820b2f9e1024143db8598.1763370931.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+18 -17
+2 -6
drivers/gpu/drm/i915/display/intel_fbc.c
··· 47 47 48 48 #include "gem/i915_gem_stolen.h" 49 49 50 - #include "gt/intel_gt_types.h" 51 - 52 - #include "i915_drv.h" 53 50 #include "i915_vma.h" 54 51 #include "i9xx_plane_regs.h" 55 52 #include "intel_de.h" ··· 61 64 #include "intel_fbc_regs.h" 62 65 #include "intel_frontbuffer.h" 63 66 #include "intel_parent.h" 67 + #include "intel_step.h" 64 68 65 69 #define for_each_fbc_id(__display, __fbc_id) \ 66 70 for ((__fbc_id) = INTEL_FBC_A; (__fbc_id) < I915_MAX_FBCS; (__fbc_id)++) \ ··· 265 267 266 268 static bool intel_fbc_has_fences(struct intel_display *display) 267 269 { 268 - struct drm_i915_private __maybe_unused *i915 = to_i915(display->drm); 269 - 270 - return intel_gt_support_legacy_fencing(to_gt(i915)); 270 + return intel_parent_has_fenced_regions(display); 271 271 } 272 272 273 273 static u32 i8xx_fbc_ctl(struct intel_fbc *fbc)
+5
drivers/gpu/drm/i915/display/intel_parent.c
··· 36 36 { 37 37 return display->parent->vgpu_active && display->parent->vgpu_active(display->drm); 38 38 } 39 + 40 + bool intel_parent_has_fenced_regions(struct intel_display *display) 41 + { 42 + return display->parent->has_fenced_regions && display->parent->has_fenced_regions(display->drm); 43 + }
+2
drivers/gpu/drm/i915/display/intel_parent.h
··· 13 13 14 14 bool intel_parent_vgpu_active(struct intel_display *display); 15 15 16 + bool intel_parent_has_fenced_regions(struct intel_display *display); 17 + 16 18 #endif /* __INTEL_PARENT_H__ */
+6
drivers/gpu/drm/i915/i915_driver.c
··· 744 744 return intel_vgpu_active(to_i915(drm)); 745 745 } 746 746 747 + static bool has_fenced_regions(struct drm_device *drm) 748 + { 749 + return intel_gt_support_legacy_fencing(to_gt(to_i915(drm))); 750 + } 751 + 747 752 static const struct intel_display_parent_interface parent = { 748 753 .rpm = &i915_display_rpm_interface, 749 754 .irq = &i915_display_irq_interface, 750 755 .vgpu_active = vgpu_active, 756 + .has_fenced_regions = has_fenced_regions, 751 757 }; 752 758 753 759 const struct intel_display_parent_interface *i915_driver_parent_interface(void)
-11
drivers/gpu/drm/xe/compat-i915-headers/gt/intel_gt_types.h
··· 1 - /* SPDX-License-Identifier: MIT */ 2 - /* 3 - * Copyright © 2023 Intel Corporation 4 - */ 5 - 6 - #ifndef __INTEL_GT_TYPES__ 7 - #define __INTEL_GT_TYPES__ 8 - 9 - #define intel_gt_support_legacy_fencing(gt) 0 10 - 11 - #endif
+3
include/drm/intel/display_parent_interface.h
··· 51 51 52 52 /** @vgpu_active: Is vGPU active? Optional. */ 53 53 bool (*vgpu_active)(struct drm_device *drm); 54 + 55 + /** @has_fenced_regions: Support legacy fencing? Optional. */ 56 + bool (*has_fenced_regions)(struct drm_device *drm); 54 57 }; 55 58 56 59 #endif