mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
drm/{i915, xe}/stolen: add device pointer to struct intel_stolen_node
Add backpointers to i915/xe to allow simplifying some interfaces in follow-up. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://lore.kernel.org/r/321354d47f9e530159caefef510d5394f4177470.1758732183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
f74bab2d90
commit
e8848d3d37
|
|
@ -25,6 +25,7 @@
|
|||
#include "intel_pci_config.h"
|
||||
|
||||
struct intel_stolen_node {
|
||||
struct drm_i915_private *i915;
|
||||
struct drm_mm_node node;
|
||||
};
|
||||
|
||||
|
|
@ -1064,12 +1065,15 @@ u64 i915_gem_stolen_node_size(const struct intel_stolen_node *node)
|
|||
|
||||
struct intel_stolen_node *i915_gem_stolen_node_alloc(struct drm_device *drm)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(drm);
|
||||
struct intel_stolen_node *node;
|
||||
|
||||
node = kzalloc(sizeof(*node), GFP_KERNEL);
|
||||
if (!node)
|
||||
return NULL;
|
||||
|
||||
node->i915 = i915;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "xe_validation.h"
|
||||
|
||||
struct intel_stolen_node {
|
||||
struct xe_device *xe;
|
||||
struct xe_bo *bo;
|
||||
};
|
||||
|
||||
|
|
@ -104,12 +105,15 @@ u64 i915_gem_stolen_node_size(const struct intel_stolen_node *node)
|
|||
|
||||
struct intel_stolen_node *i915_gem_stolen_node_alloc(struct drm_device *drm)
|
||||
{
|
||||
struct xe_device *xe = to_xe_device(drm);
|
||||
struct intel_stolen_node *node;
|
||||
|
||||
node = kzalloc(sizeof(*node), GFP_KERNEL);
|
||||
if (!node)
|
||||
return NULL;
|
||||
|
||||
node->xe = xe;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user