Permalink
Commits on Jul 26, 2016
  1. drm/msm/rd: add module param to dump all bo's

    By default, if using $debugfs/.../rd to log cmdstream, only the
    cmdstream buffers themselves are logged.  But in some cases we want
    to capture other buffers in the submit (to see VBO's or shaders).
    So add a mod-param knob to control this.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Jun 16, 2016
  2. drm/msm/rd: split out snapshot_buf helper

    (reduce the noise in next patch)
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Jun 16, 2016
  3. drm/msm: bump kernel api version

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Jun 1, 2016
  4. drm/msm: deal with arbitrary # of cmd buffers

    For some optimizations coming on the userspace side, splitting larger
    draw or gmem cmds into multiple cmdstream buffers, we need to support
    much more than the previous small/arbitrary limit.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Jun 1, 2016
  5. drm/msm: wire up vmap shrinker

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 27, 2016
  6. drm/msm: change gem->vmap() to get/put

    Before we can add vmap shrinking, we really need to know which vmap'ings
    are currently being used.  So switch to get/put interface.  Stubbed put
    fxns for now.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 26, 2016
  7. drm/msm: shrinker support

    For a first step, only purge obj->madv==DONTNEED objects.  We could be
    more agressive and next try unpinning inactive objects..  but that is
    only useful if you have swap.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 17, 2016
  8. drm/msm: add put_iova() helper

    We'll need this too for shrinker/purging.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Jun 1, 2016
  9. drm/msm: add madvise ioctl

    Doesn't do anything too interesting until we wire up shrinker.  Pretty
    much lifted from i915.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 17, 2016
  10. drm/msm: use mutex_lock_interruptible for submit ioctl

    Be kinder to things that do lots of signal handling (ie. Xorg)
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 17, 2016
Commits on Jun 1, 2016
  1. drm/msm: fix potential submit error path issue

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Jun 1, 2016
Commits on May 29, 2016
  1. drm/msm: fix some crashes in submit fail path

    If submit fails, before fence is created or before submit is added to
    submit-list, then unitialized fields cause problems in the clean-up
    path.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 24, 2016
  2. drm/msm: deal with exhausted vmap space better

    Some, but not all, callers of obj->vmap() would check if return
    IS_ERR().  So let's actually return an error if vmap() fails.  And fixup
    the call-sites that were not handling this properly.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 24, 2016
  3. BACKPORT: backport gfpflags_allow_blocking()

    From d0164ad upstream, but lets not
    backport all of that.
    robclark committed May 29, 2016
  4. BACKPORT: update shrinker to upstream API

    API changed in 1d3d443 .. but lets not
    backport all of that..
    robclark committed May 29, 2016
  5. mm: new shrinker API

    The current shrinker callout API uses an a single shrinker call for
    multiple functions.  To determine the function, a special magical value is
    passed in a parameter to change the behaviour.  This complicates the
    implementation and return value specification for the different
    behaviours.
    
    Separate the two different behaviours into separate operations, one to
    return a count of freeable objects in the cache, and another to scan a
    certain number of objects in the cache for freeing.  In defining these new
    operations, ensure the return values and resultant behaviours are clearly
    defined and documented.
    
    Modify shrink_slab() to use the new API and implement the callouts for all
    the existing shrinkers.
    
    Signed-off-by: Dave Chinner <dchinner@redhat.com>
    Signed-off-by: Glauber Costa <glommer@parallels.com>
    Acked-by: Mel Gorman <mgorman@suse.de>
    Cc: "Theodore Ts'o" <tytso@mit.edu>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
    Cc: Arve Hjønnevåg <arve@android.com>
    Cc: Carlos Maiolino <cmaiolino@redhat.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Chuck Lever <chuck.lever@oracle.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Gleb Natapov <gleb@redhat.com>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: J. Bruce Fields <bfields@redhat.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Jerome Glisse <jglisse@redhat.com>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Kent Overstreet <koverstreet@google.com>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Marcelo Tosatti <mtosatti@redhat.com>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Steven Whitehouse <swhiteho@redhat.com>
    Cc: Thomas Hellstrom <thellstrom@vmware.com>
    Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Dave Chinner committed with robclark Aug 28, 2013
  6. mm/vmap: Add a notifier for when we run out of vmap address space

    vmaps are temporary kernel mappings that may be of long duration.
    Reusing a vmap on an object is preferrable for a driver as the cost of
    setting up the vmap can otherwise dominate the operation on the object.
    However, the vmap address space is rather limited on 32bit systems and
    so we add a notification for vmap pressure in order for the driver to
    release any cached vmappings.
    
    The interface is styled after the oom-notifier where the callees are
    passed a pointer to an unsigned long counter for them to indicate if they
    have freed any space.
    
    v2: Guard the blocking notifier call with gfpflags_allow_blocking()
    v3: Correct typo in forward declaration and move to head of file
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Roman Peniaev <r.peniaev@gmail.com>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: linux-mm@kvack.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Andrew Morton <akpm@linux-foundation.org> # for inclusion via DRM
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/1459777603-23618-3-git-send-email-chris@chris-wilson.co.uk
    Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    ickle committed with robclark Apr 4, 2016
  7. drm/msm: print offender task name on hangcheck recovery

    Track the pid per submit, so we can print the name of the task which
    submitted the batch that caused the gpu to hang.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 3, 2016
  8. drm/msm: fix leak in failed submit path

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 3, 2016
  9. drm/msm: de-indent submit_create()

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 3, 2016
  10. drm/msm: drop return from gpu->submit()

    At this point, there is nothing left to fail.  And submit already has a
    fence assigned and is added to the submit_list.  Any problems from here
    on out are asynchronous (ie. hangcheck/recovery).
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed May 3, 2016
  11. drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment

    Here, a location is reset to NULL before being passed to PTR_ERR.
    So, PTR_ERR should be called before its argument is reassigned
    to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead
    of PTR_ERR and IS_ERR.
    
    Problem found using Coccinelle.
    
    Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    [fixed fmt string warning (s/%ld/%d/)]
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    Vaishali Thakkar committed with robclark Apr 28, 2016
  12. drm/msm/mdp: Add support for more RGBX formats

    Android needs XBGR8888 format. Add all the missing 32-bpp formats
    without alpha for completeness.
    
    Cc: Archit Taneja <architt@codeaurora.org>
    Cc: Rob Clark <robdclark@gmail.com>
    Signed-off-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Archit Taneja  <architt@codeaurora.org>
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robherring committed with robclark Apr 11, 2016
  13. drm/msm: fix ->last_fence() after recover

    It is no longer true that we discard all in-flight submits on recover
    (these days we only discard the first one that hung).  After the first
    re-submitted batch completes it would overwrite the fence with a correct
    value, but there would be a window of time which showed all re-submitted
    batches as already complete.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 17, 2016
  14. WIP: drm/msm: remove unused fxn

    (this ended up squashed into upstream version of one of the preceding
    patches)
    robclark committed May 29, 2016
Commits on Mar 20, 2016
  1. drm/msm: 'struct fence' conversion

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 15, 2016
  2. drm/msm: remove fence_cbs

    This was only used for atomic commit these days.  So instead just give
    atomic it's own work-queue where we can do a block on each bo in turn.
    Simplifies things a whole bunch and makes the 'struct fence' conversion
    easier.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 16, 2016
  3. drm/msm: introduce msm_fence_context

    Better encapsulate the per-timeline stuff into fence-context.  For now
    there is just a single fence-context, but eventually we'll also have one
    per-CRTC to enable fully explicit fencing.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 15, 2016
  4. drm/msm: split locking and pinning BO's

    Split up locking and pinning buffers in the submit path.  This is needed
    because we'll want to insert fencing in between the two steps.
    
    This makes things end up looking more similar to etnaviv submit code
    (which was originally modelled on the msm code but has already added
    'struct fence' support).
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 14, 2016
  5. drm/msm/gpu: simplify tracking in-flight bo's

    Since we already track the array of bo's in the submit object, just
    unconditionally take and drop ref's per submit (rather than only taking
    ref's if bo is not already active).  This simplifies later patches.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 16, 2016
  6. drm/msm: split out timeout_to_jiffies helper

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 16, 2016
  7. drm/msm: use imported dmabuf's reservation object

    This was always the intention, but somehow it was never wired up
    properly.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 16, 2016
  8. drm/msm: move fence code to it's own file

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 15, 2016
  9. drm/msm: move debugfs code to it's own file

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 16, 2016
  10. drm/atomic: export drm_atomic_helper_wait_for_fences()

    Signed-off-by: Rob Clark <robdclark@gmail.com>
    robclark committed Mar 18, 2016