summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-12-05 12:30:29 +0200
committerJani Nikula <jani.nikula@intel.com>2025-12-10 11:36:11 +0200
commitd6c862572b69fd92f1793738e2e8d7d326ba0740 (patch)
treeb6b30d2a91facbdf5279be38ba53ed061cdaadad /include
parent2397a4c6624a8e192de8e4443fab578b41d9deca (diff)
drm/{i915, xe}/stolen: move stolen memory handling to display parent interface
Call the stolen memory interface through the display parent interface. This makes xe compat gem/i915_gem_stolen.h redundant, and it can be removed. v2: Rebase, convert one more call that appeared Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Link: https://patch.msgid.link/350c82c49fe40f6319d14d309180e2e2752145ac.1764930576.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/intel/display_parent_interface.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
index 61d1b22adc83..f590e846464d 100644
--- a/include/drm/intel/display_parent_interface.h
+++ b/include/drm/intel/display_parent_interface.h
@@ -9,6 +9,7 @@
struct dma_fence;
struct drm_device;
struct intel_hdcp_gsc_context;
+struct intel_stolen_node;
struct ref_tracker;
struct intel_display_rpm_interface {
@@ -47,6 +48,22 @@ struct intel_display_rps_interface {
void (*ilk_irq_handler)(struct drm_device *drm);
};
+struct intel_display_stolen_interface {
+ int (*insert_node_in_range)(struct intel_stolen_node *node, u64 size,
+ unsigned int align, u64 start, u64 end);
+ int (*insert_node)(struct intel_stolen_node *node, u64 size, unsigned int align);
+ void (*remove_node)(struct intel_stolen_node *node);
+ bool (*initialized)(struct drm_device *drm);
+ bool (*node_allocated)(const struct intel_stolen_node *node);
+ u64 (*node_offset)(const struct intel_stolen_node *node);
+ u64 (*area_address)(struct drm_device *drm);
+ u64 (*area_size)(struct drm_device *drm);
+ u64 (*node_address)(const struct intel_stolen_node *node);
+ u64 (*node_size)(const struct intel_stolen_node *node);
+ struct intel_stolen_node *(*node_alloc)(struct drm_device *drm);
+ void (*node_free)(const struct intel_stolen_node *node);
+};
+
/**
* struct intel_display_parent_interface - services parent driver provides to display
*
@@ -72,6 +89,9 @@ struct intel_display_parent_interface {
/** @rpm: RPS interface. Optional. */
const struct intel_display_rps_interface *rps;
+ /** @stolen: Stolen memory. */
+ const struct intel_display_stolen_interface *stolen;
+
/** @vgpu_active: Is vGPU active? Optional. */
bool (*vgpu_active)(struct drm_device *drm);