1. 17 10月, 2019 1 次提交
    • G
      drm: add mmap() to drm_gem_object_funcs · c40069cb
      Gerd Hoffmann 提交于
      drm_gem_object_funcs->vm_ops alone can't handle everything which needs
      to be done for mmap(), tweaking vm_flags for example.  So add a new
      mmap() callback to drm_gem_object_funcs where this code can go to.
      
      Note that the vm_ops field is not used in case the mmap callback is
      present, it is expected that the callback sets vma->vm_ops instead.
      
      Also setting vm_flags and vm_page_prot is the job of the new callback.
      so drivers have more control over these flags.
      
      drm_gem_mmap_obj() will use the new callback for object specific mmap
      setup.  With this in place the need for driver-speific fops->mmap
      callbacks goes away, drm_gem_mmap can be hooked instead.
      
      drm_gem_prime_mmap() will use the new callback too to just mmap gem
      objects directly instead of jumping though loops to make
      drm_gem_object_lookup() and fops->mmap work.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-2-kraxel@redhat.com
      c40069cb
  2. 13 8月, 2019 2 次提交
  3. 07 8月, 2019 2 次提交
  4. 05 8月, 2019 1 次提交
  5. 20 7月, 2019 1 次提交
  6. 04 7月, 2019 1 次提交
  7. 29 6月, 2019 1 次提交
  8. 21 6月, 2019 1 次提交
  9. 17 6月, 2019 1 次提交
  10. 28 5月, 2019 1 次提交
  11. 25 4月, 2019 1 次提交
    • S
      drm/gem: Fix sphinx warnings · 761e473f
      Sean Paul 提交于
      Sphinx really wants colons after arguments :/
      
      Fixes the following warnings:
      drm_gem.c:1384: warning: Function parameter or member 'fence_array' not described in 'drm_gem_fence_array_add'
      drm_gem.c:1384: warning: Function parameter or member 'fence' not described in 'drm_gem_fence_array_add'
      drm_gem.c:1435: warning: Function parameter or member 'fence_array' not described in 'drm_gem_fence_array_add_implicit'
      drm_gem.c:1435: warning: Function parameter or member 'obj' not described in 'drm_gem_fence_array_add_implicit'
      drm_gem.c:1435: warning: Function parameter or member 'write' not described in 'drm_gem_fence_array_add_implicit'
      
      Fixes: 5d5a179d ("drm: Add helpers for setting up an array of dma_fence dependencies.")
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Qiang Yu <yuq825@gmail.com> (v1)
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190424204916.222155-1-sean@poorly.run
      761e473f
  12. 17 4月, 2019 1 次提交
  13. 13 4月, 2019 1 次提交
  14. 20 3月, 2019 1 次提交
  15. 15 3月, 2019 1 次提交
  16. 19 2月, 2019 1 次提交
  17. 04 2月, 2019 1 次提交
  18. 10 1月, 2019 1 次提交
  19. 20 11月, 2018 1 次提交
    • N
      drm/gem: Add drm_gem_object_funcs · b39b5394
      Noralf Trønnes 提交于
      This adds an optional function table on GEM objects.
      The main benefit is for drivers that support more than one type of
      memory (shmem,vram,cma) for their buffers depending on the hardware it
      runs on. With the callbacks attached to the GEM object itself, it is
      easier to have core helpers for the the various buffer types. The driver
      only has to make the decision about buffer type on GEM object creation
      and all other callbacks can be handled by the chosen helper.
      
      drm_driver->gem_prime_res_obj has not been added since there's a todo to
      put a reservation_object into drm_gem_object.
      
      v3: Add todo entry
      
      v2: Drop drm_gem_object_funcs->prime_mmap in favour of
      drm_gem_prime_mmap() (Daniel Vetter)
      
      v1:
      - drm_gem_object_funcs.map -> .prime_map let it only do PRIME mmap like
        the function it superseeds (Daniel Vetter)
      - Flip around the if ladders and make obj->funcs the first choice
        highlighting the fact that this the new default way of doing it
        (Daniel Vetter)
      Signed-off-by: NNoralf Trønnes <noralf@tronnes.org>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-4-noralf@tronnes.org
      b39b5394
  20. 15 9月, 2018 1 次提交
    • C
      drm: Differentiate the lack of an interface from invalid parameter · 69fdf420
      Chris Wilson 提交于
      If the ioctl is not supported on a particular piece of HW/driver
      combination, report ENOTSUP (aka EOPNOTSUPP) so that it can be easily
      distinguished from both the lack of the ioctl and from a regular invalid
      parameter.
      
      v2: Across all the kms ioctls we had a mixture of reporting EINVAL,
      ENODEV and a few ENOTSUPP (most where EINVAL) for a failed
      drm_core_check_feature(). Update everybody to report ENOTSUPP.
      
      v3: ENOTSUPP is an internal errno! It's value (524) does not correspond
      to a POSIX errno, the one we want is ENOTSUP. However,
      uapi/asm-generic/errno.h doesn't include ENOTSUP but man errno says
      
      	"ENOTSUP and EOPNOTSUPP have the same value on Linux,
      	but according to POSIX.1 these error values should be
      	distinct."
      
      so use EOPNOTSUPP as its equivalent.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v2
      Link: https://patchwork.freedesktop.org/patch/msgid/20180913192050.24812-1-chris@chris-wilson.co.uk
      69fdf420
  21. 13 7月, 2018 1 次提交
  22. 26 3月, 2018 1 次提交
  23. 19 2月, 2018 1 次提交
  24. 11 11月, 2017 1 次提交
  25. 27 10月, 2017 1 次提交
  26. 05 10月, 2017 1 次提交
  27. 26 9月, 2017 1 次提交
  28. 02 9月, 2017 1 次提交
  29. 22 8月, 2017 2 次提交
  30. 11 8月, 2017 1 次提交
  31. 29 7月, 2017 1 次提交
  32. 18 7月, 2017 2 次提交
    • T
      x86, drm, fbdev: Do not specify encrypted memory for video mappings · 95cf9264
      Tom Lendacky 提交于
      Since video memory needs to be accessed decrypted, be sure that the
      memory encryption mask is not set for the video ranges.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NBorislav Petkov <bp@suse.de>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Toshimitsu Kani <toshi.kani@hpe.com>
      Cc: kasan-dev@googlegroups.com
      Cc: kvm@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-efi@vger.kernel.org
      Cc: linux-mm@kvack.org
      Link: http://lkml.kernel.org/r/a19436f30424402e01f63a09b32ab103272acced.1500319216.git.thomas.lendacky@amd.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      95cf9264
    • D
      drm: Don't complain too much about struct_mutex. · 3379c04c
      Daniel Vetter 提交于
      For modern drivers the DRM core doesn't use struct_mutex at all, which
      means it's defacto a driver-private lock. But since we still need it
      for legacy drivers we can't initialize it in drivers, which means all
      the different instances share one lockdep key. Despite that they might
      be placed in totally different places in the locking hierarchy.
      
      This results in a lot of bogus lockdep splats when running stuff on
      systems with multiple gpus. Partially remedy the situation by only
      doing might_lock checks on drivers that do use struct_mutex still for
      gem locking.
      
      A more complete solution would be to do the mutex_init in the drm core
      only for legacy drivers, plus add it to each modern driver that still
      needs it, which would also give each its own lockdep key. Trying to do
      that dynamically doesn't work, because lockdep requires it's keys to
      be statically allocated.
      
      v2: {} everywhere (Chris)
      
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170715095328.25671-1-daniel.vetter@ffwll.ch
      3379c04c
  33. 18 5月, 2017 1 次提交
  34. 28 2月, 2017 1 次提交
  35. 25 1月, 2017 1 次提交
  36. 19 9月, 2016 1 次提交