Re: [PATCH 2/4] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Abdiel Janulgue (2019-11-15 11:45:47)
> +i915_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
> +                          struct drm_file *file)
>  {
> -       struct drm_i915_gem_mmap_gtt *args = data;
> +       struct drm_i915_private *i915 = to_i915(dev);
> +       struct drm_i915_gem_mmap_offset *args = data;
> +       enum i915_mmap_type type;
> +
> +       switch (args->flags) {
> +       case I915_MMAP_OFFSET_GTT:
> +               if (!i915_ggtt_has_aperture(&i915->ggtt))
> +                       return -ENODEV;
> +               type = I915_MMAP_TYPE_GTT;
> +               break;
> +
> +       case I915_MMAP_OFFSET_WC:
> +               if (!boot_cpu_has(X86_FEATURE_PAT))
> +                       return -ENODEV;
> +               type = I915_MMAP_TYPE_WC;
> +               break;
> +
> +       case I915_MMAP_OFFSET_WB:
> +               type = I915_MMAP_TYPE_WB;
> +               break;
> +
> +       case I915_MMAP_OFFSET_UC:
> +               if (!boot_cpu_has(X86_FEATURE_PAT))
> +                       return -ENODEV;
> +               type = I915_MMAP_TYPE_UC;
> +               break;
> +
> +       default:
> +               return -EINVAL;
> +       }
>  
>         return __assign_gem_object_mmap_data(file, args->handle,
>                                              I915_MMAP_TYPE_GTT,

s/TYPE_GTT/type/?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux