1. 17 6月, 2017 1 次提交
  2. 16 6月, 2017 2 次提交
  3. 15 6月, 2017 31 次提交
  4. 14 6月, 2017 2 次提交
    • D
      drm/syncobj: add sync_file interaction. (v1.2) · 3ee45a3b
      Dave Airlie 提交于
      This interface allows importing the fence from a sync_file into
      an existing drm sync object, or exporting the fence attached to
      an existing drm sync object into a new sync file object.
      
      This should only be used to interact with sync files where necessary.
      
      v1.1: fence put fixes (Chris), drop fence from ioctl names (Chris)
      fixup for new fence replace API.
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3ee45a3b
    • D
      drm: introduce sync objects (v4) · e9083420
      Dave Airlie 提交于
      Sync objects are new toplevel drm object, that contain a
      pointer to a fence. This fence can be updated via command
      submission ioctls via drivers.
      
      There is also a generic wait obj API modelled on the vulkan
      wait API (with code modelled on some amdgpu code).
      
      These objects can be converted to an opaque fd that can be
      passes between processes.
      
      v2: rename reference/unreference to put/get (Chris)
      fix leaked reference (David Zhou)
      drop mutex in favour of cmpxchg (Chris)
      v3: cleanups from danvet, rebase on drm_fops rename
      check fd_flags is 0 in ioctls.
      v4: export find/free, change replace fence to take a
      syncobj. In order to support lookup first, replace
      later semantics which seem in the end to be cleaner.
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e9083420
  5. 13 6月, 2017 2 次提交
    • C
      drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path · d0b1d259
      Christophe JAILLET 提交于
      If one 'drm_gem_handle_create()' fails, we leak somes handles and some
      memory.
      
      In order to fix it:
        - move the 'free(bo_state)' at the end of the function so that it is also
          called in the eror handling path. This has the side effect to also try
          to free it if the first 'kcalloc' fails. This is harmless.
        - add a new label, err_delete_handle, in order to delete already
          allocated handles in error handling path
        - remove the now useless 'err' label
      
      The way the code is now written will also delete the handles if the
      'copy_to_user()' call fails.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170512123803.1886-1-christophe.jaillet@wanadoo.fr
      d0b1d259
    • H
      drm/vc4/vc4_bo.c: always set bo->resv · 24bb206f
      Hans Verkuil 提交于
      The bo->resv pointer could be NULL, leading to kernel oopses
      like the one below.
      
      This patch ensures that bo->resv is always set in vc4_create_object
      ensuring that it is never NULL.
      
      Thanks to Eric Anholt for pointing to the correct solution.
      
      [   19.738487] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [   19.746805] pgd = ffff8000275fc000
      [   19.750319] [00000000] *pgd=0000000000000000
      [   19.754715] Internal error: Oops: 96000004 [#1] PREEMPT SMP
      [   19.760369] Modules linked in: smsc95xx usbnet vc4 drm_kms_helper drm pwm_bcm2835 i2c_bcm2835 bcm2835_rng rng_core bcm2835_dma virt_dma
      [   19.772767] CPU: 0 PID: 1297 Comm: Xorg Not tainted 4.12.0-rc1-rpi3 #58
      [   19.779476] Hardware name: Raspberry Pi 3 Model B (DT)
      [   19.784688] task: ffff800028268000 task.stack: ffff800026c08000
      [   19.790705] PC is at ww_mutex_lock_interruptible+0x14/0xc0
      [   19.796329] LR is at vc4_submit_cl_ioctl+0x4fc/0x998 [vc4]
      ...
      [   20.240855] [<ffff0000088975f4>] ww_mutex_lock_interruptible+0x14/0xc0
      [   20.247528] [<ffff0000009b3ea4>] vc4_submit_cl_ioctl+0x4fc/0x998 [vc4]
      [   20.254372] [<ffff0000008f75f8>] drm_ioctl+0x180/0x438 [drm]
      [   20.260120] [<ffff00000821383c>] do_vfs_ioctl+0xa4/0x7d0
      [   20.265510] [<ffff000008213fe4>] SyS_ioctl+0x7c/0x98
      [   20.270550] [<ffff000008082f30>] el0_svc_naked+0x24/0x28
      [   20.275941] Code: d2800002 d5384103 910003fd f9800011 (c85ffc04)
      [   20.282527] ---[ end trace 1f6bd640ff32ae12 ]---
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Link: http://patchwork.freedesktop.org/patch/msgid/14e68768-6c92-2d74-92fd-196dbc50d8f7@xs4all.nl
      24bb206f
  6. 09 6月, 2017 2 次提交