• Daniel Vetter's avatar
    drm/gem: Add DEFINE_DRM_GEM_FOPS · f42e1819
    Daniel Vetter authored
    Sadly there's only 1 driver which can use it, everyone else is special
    for some reason:
    
    - gma500 has a horrible runtime PM ioctl wrapper that probably doesn't
      really work but meh.
    - i915 needs special compat_ioctl handler because regrets.
    - arcgpu needs to fixup the pgprot because (no idea why it can't do
      that in the fault handler like everyone else).
    - tegra does even worse stuff with pgprot
    - udl does something with vm_flags too ...
    - cma helpers, etnaviv, mtk, msm, rockchip, omap all implement some
      variation on prefaulting.
    - exynos is exynos, I got lost in the midlayers.
    - vc4 has to reinvent half of cma helpers because those are too much
      midlayer, plus vm_flags dances.
    - vgem also seems unhappy with the default vm_flags.
    
    So pretty sad divergence and I'm sure we could do better, but not
    really an idea. Oh well, maybe this macro here helps to encourage more
    consistency at least going forward.
    Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
    Reviewed-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-25-daniel.vetter@ffwll.ch
    f42e1819
drm_file.c 20.7 KB