[Intel-gfx] [PATCH 09/22] drm/i915/lmem: support kernel mapping

Chris Wilson chris at chris-wilson.co.uk
Fri Sep 27 19:24:14 UTC 2019


Quoting Matthew Auld (2019-09-27 18:33:56)
>  static const struct drm_i915_gem_object_ops i915_gem_object_internal_ops = {
>         .flags = I915_GEM_OBJECT_HAS_STRUCT_PAGE |
> -                I915_GEM_OBJECT_IS_SHRINKABLE,
> +                I915_GEM_OBJECT_IS_SHRINKABLE |
> +                I915_GEM_OBJECT_IS_MAPPABLE,
> +
>  const struct drm_i915_gem_object_ops i915_gem_shmem_ops = {
>         .flags = I915_GEM_OBJECT_HAS_STRUCT_PAGE |
> -                I915_GEM_OBJECT_IS_SHRINKABLE,
> +                I915_GEM_OBJECT_IS_SHRINKABLE |
> +                I915_GEM_OBJECT_IS_MAPPABLE,

>  static const struct drm_i915_gem_object_ops huge_ops = {
>         .flags = I915_GEM_OBJECT_HAS_STRUCT_PAGE |
> -                I915_GEM_OBJECT_IS_SHRINKABLE,
> +                I915_GEM_OBJECT_IS_SHRINKABLE |
> +                I915_GEM_OBJECT_IS_MAPPABLE,

Where's huge_pages and userptr?

In short any that HAS_STRUCT_PAGE is also mappable by your definition
(we can use kmap on them). I suggest maybe using HAS_IOMEM and then
	if (!(obj->ops->flags & (HAS_STRUCT_PAGE | HAS_IOMEM))
?
-Chris


More information about the Intel-gfx mailing list