mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
d22632c83b
For some specialised objects we might need something larger than the regions min_page_size due to some hw restriction, and slightly more hairy is needing something smaller with the guarantee that such objects will never be inserted into any GTT, which is the case for the paging structures. This also fixes how we setup the BO page_alignment, if we later migrate the object somewhere else. For example if the placements are {SMEM, LMEM}, then we might get this wrong. Pushing the min_page_size behaviour into the manager should fix this. v2(Thomas): push the default page size behaviour into buddy_man, and let the user override it with the page-alignment, which looks cleaner v3: rebase on ttm sys changes Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210625103824.558481-1-matthew.auld@intel.com
36 lines
946 B
C
36 lines
946 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __I915_GEM_LMEM_H
|
|
#define __I915_GEM_LMEM_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_i915_private;
|
|
struct drm_i915_gem_object;
|
|
struct intel_memory_region;
|
|
|
|
extern const struct drm_i915_gem_object_ops i915_gem_lmem_obj_ops;
|
|
|
|
void __iomem *
|
|
i915_gem_object_lmem_io_map(struct drm_i915_gem_object *obj,
|
|
unsigned long n,
|
|
unsigned long size);
|
|
|
|
bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
|
|
|
|
bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
|
|
|
|
struct drm_i915_gem_object *
|
|
__i915_gem_object_create_lmem_with_ps(struct drm_i915_private *i915,
|
|
resource_size_t size,
|
|
resource_size_t page_size,
|
|
unsigned int flags);
|
|
struct drm_i915_gem_object *
|
|
i915_gem_object_create_lmem(struct drm_i915_private *i915,
|
|
resource_size_t size,
|
|
unsigned int flags);
|
|
|
|
#endif /* !__I915_GEM_LMEM_H */
|