[Intel-gfx] [PATCH 3/5] drm/i915: Add cpu fault handler for mmap_offset

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 26 12:46:39 UTC 2019


Quoting Abdiel Janulgue (2019-08-26 13:21:00)
> +       for (i = 0; i < size >> PAGE_SHIFT; i++) {
> +               struct page *page = i915_gem_object_get_page(obj, i);
> +
> +               vmf_ret = vmf_insert_pfn(area,
> +                                        (unsigned long)area->vm_start + i * PAGE_SIZE,
> +                                        page_to_pfn(page));
> +               if (vmf_ret & VM_FAULT_ERROR) {
> +                       vmf_ret = i915_error_to_vmf_fault(vm_fault_to_errno(vmf_ret, 0),
> +                                                         &dev_priv->gt);

Sigh. You take a mm/, run it through the internal error convertor that
*only* applies to i915 errors, and then return the original fault code.
-Chris


More information about the Intel-gfx mailing list