1. 29 Apr, 2016 27 commits
  2. 28 Apr, 2016 8 commits
  3. 26 Apr, 2016 5 commits
    • Daniel Vetter's avatar
      drm: Switch blobs to the new generic modeset obj refcounting · 152ef5fa
      Daniel Vetter authored
      Need to move the free function around a bit, but otherwise mostly
      just removing code.
      
      Specifically we can nuke all the _locked variants since the weak idr
      reference is now protected by the idr_mutex, which we never hold
      anywhere expect in the lookup/reg/unreg functions. And those never
      call anything else.
      
      Another benefit of this is that this patch switches the weak reference
      logic from kref_put_mutex to kref_get_unless_zero. And the later is in
      general more flexible wrt accomodating multiple weak references
      protected by different locks, which might or might not come handy
      eventually.
      
      But one consequence of that switch is that we need to acquire the
      blob_lock from the free function for the list_del calls. That's a bit
      tricky to pull off, but works well if we pick the exact same scheme as
      is already used for framebuffers. Most important changes:
      
      - filp list is maintainer by create/destroy_blob ioctls directly
        (already the case, so we can just remove the redundant list_del from
        the free function).
      
      - filp close handler walks the filp-private list lockless - works
        because we know no one else can access it. I copied the same comment
        from the fb code over to explain this.
      
      - Otherwise we need to sufficiently restrict blob_lock critical
        sections to avoid all the unreference calls. Easy to do once the
        blob_lock only protects the list, and no longer the weak reference.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      152ef5fa
    • Daniel Vetter's avatar
      drm/atomic-helpers: Don't duplicate code in destroy helpers · b0b5511b
      Daniel Vetter authored
      Random drive-by refactoring I spotted.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b0b5511b
    • Daniel Vetter's avatar
      drm: Fix fb leaks and WARN spew in get/set_prop ioctls · 1649c33b
      Daniel Vetter authored
      Dave Airlie had at least the refcount leak fixed in a later patch (but
      that patch does other things which need a bit more work). But we still
      have the trouble that silly userspace could hit the WARN_ON in
      drm_mode_object_find.
      
      Fix this all up to make sure we don't leak objects, and don't spew
      into demsg.
      
      Fixes: d0f37cf6 ("drm/mode: move framebuffer reference into object.")
      Testcase: igt/kms_addfb_basic/invalid-*-prop*
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1649c33b
    • Daniel Vetter's avatar
      drm: Improve kerneldoc for new mode object refcounting · 05981422
      Daniel Vetter authored
      Slipped through the cracks in my review. The one issue I spotted
      is that drm_mode_object_find now acquires references and can be
      used on FB objects, which caused follow-on bugs in get/set_prop ioctls.
      Follow-up patches will fix that.
      
      [airlied: fixup some incr fb/decr object mixups]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      05981422
    • Dave Airlie's avatar
      Merge branch 'topic-arcpgu-v6' of... · 944a3f32
      Dave Airlie authored
      Merge branch 'topic-arcpgu-v6' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-next
      
      This is DRM driver for ARC PGU - simple bitstreamer used on
      Synopsys ARC SDP boards (both AXS101 and AXS103).
      
      * 'topic-arcpgu-v6' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux:
        arc: axs10x - add support of ARC PGU
        MAINTAINERS: Add maintainer for ARC PGU display controller
        drm: Add DT bindings documentation for ARC PGU display controller
        drm: Add support of ARC PGU display controller
      944a3f32