1. 17 4月, 2019 1 次提交
  2. 13 4月, 2019 1 次提交
  3. 20 3月, 2019 1 次提交
  4. 15 3月, 2019 1 次提交
  5. 19 2月, 2019 1 次提交
  6. 04 2月, 2019 1 次提交
  7. 10 1月, 2019 1 次提交
  8. 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
  9. 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
  10. 13 7月, 2018 1 次提交
  11. 26 3月, 2018 1 次提交
  12. 19 2月, 2018 1 次提交
  13. 11 11月, 2017 1 次提交
  14. 27 10月, 2017 1 次提交
  15. 05 10月, 2017 1 次提交
  16. 26 9月, 2017 1 次提交
  17. 02 9月, 2017 1 次提交
  18. 22 8月, 2017 2 次提交
  19. 11 8月, 2017 1 次提交
  20. 29 7月, 2017 1 次提交
  21. 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
  22. 18 5月, 2017 1 次提交
  23. 28 2月, 2017 1 次提交
  24. 25 1月, 2017 1 次提交
  25. 19 9月, 2016 1 次提交
  26. 02 6月, 2016 1 次提交
    • D
      drm/doc: Appease sphinx · 2e7a5701
      Daniel Vetter 提交于
      Mostly this is unexpected indents. But really it's just a
      demonstration for my patch, all these issues have been found&fixed
      using the correct source file and line number support I just added.
      All line numbers have been perfectly accurate.
      
      One issue looked a bit fishy in intel_lrc.c, where I don't quite grok
      what sphinx is unhappy about. But since that file looks like it has
      never seen a proper kernel-doc parser I figured better to fix in a
      separate path.
      
      v2: Use fancy new &drm_device->struct_mutex linking (Jani).
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: linux-doc@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      2e7a5701
  27. 30 5月, 2016 1 次提交
  28. 17 5月, 2016 1 次提交
  29. 04 5月, 2016 2 次提交
  30. 20 4月, 2016 1 次提交
  31. 15 4月, 2016 1 次提交
    • C
      drm: Release driver references to handle before making it available again · f6cd7dae
      Chris Wilson 提交于
      When userspace closes a handle, we remove it from the file->object_idr
      and then tell the driver to drop its references to that file/handle.
      However, as the file/handle is already available again for reuse, it may
      be reallocated back to userspace and active on a new object before the
      driver has had a chance to drop the old file/handle references.
      
      Whilst calling back into the driver, we have to drop the
      file->table_lock spinlock and so to prevent reusing the closed handle we
      mark that handle as stale in the idr, perform the callback and then
      remove the handle. We set the stale handle to point to the NULL object,
      then any idr_find() whilst the driver is removing the handle will return
      NULL, just as if the handle is already removed from idr.
      
      Note: This will be used to have a direct handle -> vma lookup table,
      instead of first a handle -> obj lookup, and then an (obj, vm) -> vma
      lookup.
      
      v2: Use NULL rather than an ERR_PTR to avoid having to adjust callers.
      idr_alloc() tracks existing handles using an internal bitmap, so we are
      free to use the NULL object as our stale identifier.
      v3: Needed to update the return value check after changing from using
      the stale error pointer to NULL.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: dri-devel@lists.freedesktop.org
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Thierry Reding <treding@nvidia.com>
      [danvet: Add note about the use-case.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460721308-32405-1-git-send-email-chris@chris-wilson.co.uk
      f6cd7dae
  32. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  33. 05 1月, 2016 5 次提交