mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
drm/i915: add i915_gem_object_create_region_at()
Add a generic interface for allocating an object at some specific offset, and convert stolen over. Later we will want to hook this up to different backends. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220315181425.576828-4-matthew.auld@intel.com
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Copyright © 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "gem/i915_gem_region.h"
|
||||
#include "i915_drv.h"
|
||||
#include "intel_atomic_plane.h"
|
||||
#include "intel_display.h"
|
||||
@@ -69,7 +70,8 @@ initial_plane_vma(struct drm_i915_private *i915,
|
||||
size * 2 > i915->stolen_usable_size)
|
||||
return NULL;
|
||||
|
||||
obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);
|
||||
obj = i915_gem_object_create_region_at(i915->mm.stolen_region,
|
||||
base, size, 0);
|
||||
if (IS_ERR(obj))
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user