Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 17, 2013
  1. @robclark
  2. @robclark
  3. @robclark
  4. @crseanpaul @robclark

    drm: Add drm_bridge

    crseanpaul authored robclark committed
    This patch adds the notion of a drm_bridge. A bridge is a chained
    device which hangs off an encoder. The drm driver using the bridge
    should provide the association between encoder and bridge. Once a
    bridge is associated with an encoder, it will participate in mode
    set, dpms, and optionally connection detection.
    
    Since a connector may not be able to determine the connection state
    downstream of the bridge, bridges may implement detect() which will take
    precedence over connector detect() if the bridge is already attached
    to an encoder and that encoder is already attached to the connector.
    In practical terms, this requires the drm driver to make these
    associations at init time, which is fine for SoC applications where
    this link is static.
    
    Signed-off-by: Sean Paul <seanpaul@chromium.org>
  5. @robclark
  6. @robclark

    misc build fixes

    robclark authored
  7. @robclark
  8. @robclark

    WIP: drm/msm: add rd logging debugfs

    robclark authored
    To ease debugging, add debugfs file which can be cat/tail'd to log
    submits, along with fence #.  If GPU hangs, you can look at 'gpu'
    debugfs file to find last completed fence and current register state,
    and compare with logged rd file to narrow down the DRAW_INDX which
    triggered the GPU hang.
  9. @robclark

    drm/msm: add a3xx gpu support

    robclark authored
    Add initial support for a3xx 3d core.
    
    So far, with hardware that I've seen to date, we can have:
     + zero, one, or two z180 2d cores
     + a3xx or a2xx 3d core, which share a common CP (the firmware
       for the CP seems to implement some different PM4 packet types
       but the basics of cmdstream submission are the same)
    
    Which means that the eventual complete "class" hierarchy, once
    support for all past and present hw is in place, becomes:
     + msm_gpu
       + adreno_gpu
         + a3xx_gpu
         + a2xx_gpu
       + z180_gpu
    
    This commit splits out the parts that will eventually be common
    between a2xx/a3xx into adreno_gpu, and the parts that are even
    common to z180 into msm_gpu.
    
    Note that there is no cmdstream validation required.  All memory access
    from the GPU is via IOMMU/MMU.  So as long as you don't map silly things
    to the GPU, there isn't much damage that the GPU can do.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  10. @robclark

    drm/msm: add register definitions for gpu

    robclark authored
    Generated from rnndb files in:
    
    https://github.com/freedreno/envytools
    
    Keep this split out as a separate commit to make it easier to review the
    actual driver.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  11. @robclark

    drm/msm: basic KMS driver for snapdragon

    robclark authored
    The snapdragon chips have multiple different display controllers,
    depending on which chip variant/version.  (As far as I can tell, current
    devices have either MDP3 or MDP4, and upcoming devices have MDSS.)  And
    then external to the display controller are HDMI, DSI, etc. blocks which
    may be shared across devices which have different display controller
    blocks.
    
    To more easily add support for different display controller blocks, the
    display controller specific bits are split out into a "kms" module,
    which provides the kms plane/crtc/encoder objects.
    
    The external HDMI, DSI, etc. blocks are part encoder, and part connector
    currently.  But I think I will pull in the drm_bridge patches from
    chromeos tree, and split them into a bridge+connector, with the
    registers that need to be set in modeset handled by the bridge.  This
    would remove the 'msm_connector' base class.  But some things need to be
    double checked to make sure I could get the correct ON/OFF sequencing..
    
    This patch adds support for mdp4 crtc (including hw cursor), dtv encoder
    (part of MDP4 block), and hdmi.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  12. @robclark

    drm/msm: add register definitions

    robclark authored
    Generated from rnndb files in:
    
    https://github.com/freedreno/envytools
    
    Keep this split out as a separate commit to make it easier to review the
    actual driver.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  13. @robclark

    iommu: adjust api to match upstream

    robclark authored
    Conflicts:
    	drivers/gpu/msm/kgsl_iommu.c
  14. @robclark

    drm: const'ify ioctls table

    robclark authored
    Because, there is no reason for it not to be const.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
    
    Conflicts:
    	drivers/gpu/host1x/drm/drm.c
    	drivers/staging/imx-drm/imx-drm-core.c
  15. @robclark

    drm/omap: use flip-work helper

    robclark authored
    And simplify how we hold a ref+pin to what is being scanned out by using
    fb refcnt'ing.  The previous logic pre-dated fb refcnt, and as a result
    was less straightforward than it could have been.  By holding a ref to
    the fb, we don't have to care about how many plane's there are and
    holding a ref to each color plane's bo.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  16. @robclark

    drm/tilcdc: use flip-work helper

    robclark authored
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  17. @robclark

    drm: add flip-work helper

    robclark authored
    A small helper to queue up work to do, from workqueue context, after a
    flip.  Typically useful to defer unreffing buffers that may be read by
    the display controller until vblank.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  18. @robclark

    drm/omap: kill omap_gem_helpers.c

    robclark authored
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  19. @robclark

    drm/udl: use gem get/put page helpers

    robclark authored
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  20. @robclark

    drm/gma500: use gem get/put page helpers

    robclark authored
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  21. @robclark

    drm/gem: add shmem get/put page helpers

    robclark authored
    Basically just extracting some code duplicated in gma500, omapdrm, udl,
    and upcoming msm driver.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  22. @robclark

    drm/gem: add drm_gem_create_mmap_offset_size()

    robclark authored
    Variant of drm_gem_create_mmap_offset() which doesn't make the
    assumption that virtual size and physical size (obj->size) are the same.
    This is needed in omapdrm to deal with tiled buffers.  And lets us get
    rid of a duplicated and slightly modified version of
    drm_gem_create_mmap_offset() in omapdrm.
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  23. @robclark

    mach-msm: misc fixes/hacks needed for drm driver

    robclark authored
    Get rid of some hacky assignment of clocks to wrong/bogus devices, fix
    some compile errors when disabling ION/PMEM, etc..
Commits on Aug 10, 2013
  1. @mlankhorst @robclark

    reservation: cross-device reservation support, v4

    mlankhorst authored robclark committed
    This adds support for a generic reservations framework that can be
    hooked up to ttm and dma-buf and allows easy sharing of reservations
    across devices.
    
    The idea is that a dma-buf and ttm object both will get a pointer
    to a struct reservation_object, which has to be reserved before
    anything is done with the contents of the dma-buf.
    
    Changes since v1:
     - Fix locking issue in ticket_reserve, which could cause mutex_unlock
       to be called too many times.
    Changes since v2:
     - All fence related calls and members have been taken out for now,
       what's left is the bare minimum to be useful for ttm locking conversion.
    Changes since v3:
     - Removed helper functions too. The documentation has an example
       implementation for locking. With the move to ww_mutex there is no
       need to have much logic any more.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Reviewed-by: Jerome Glisse <jglisse@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    Conflicts:
    	drivers/base/Makefile
  2. @robclark

    locking-selftests: Handle unexpected failures more strictly

    Maarten Lankhorst authored robclark committed
    When CONFIG_PROVE_LOCKING is not enabled, more tests are
    expected to pass unexpectedly, but there no tests that should
    start to fail that pass with CONFIG_PROVE_LOCKING enabled.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
  3. @robclark

    mutex: Add more w/w tests to test EDEADLK path handling

    Maarten Lankhorst authored robclark committed
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20130620113141.4001.54331.stgit@patser
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
  4. @robclark

    mutex: Add more tests to lib/locking-selftest.c

    Maarten Lankhorst authored robclark committed
    None of the ww_mutex codepaths should be taken in the 'normal'
    mutex calls. The easiest way to verify this is by using the
    normal mutex calls, and making sure o.ctx is unmodified.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20130620113130.4001.45423.stgit@patser
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
  5. @robclark

    mutex: Add w/w tests to lib/locking-selftest.c

    Maarten Lankhorst authored robclark committed
    This stresses the lockdep code in some ways specifically useful
    to ww_mutexes. It adds checks for most of the common locking
    errors.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20130620113124.4001.23186.stgit@patser
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
  6. @danvet @robclark

    mutex: Add w/w mutex slowpath debugging

    danvet authored robclark committed
    Injects EDEADLK conditions at pseudo-random interval, with
    exponential backoff up to UINT_MAX (to ensure that every lock
    operation still completes in a reasonable time).
    
    This way we can test the wound slowpath even for ww mutex users
    where contention is never expected, and the ww deadlock
    avoidance algorithm is only needed for correctness against
    malicious userspace. An example would be protecting kernel
    modesetting properties, which thanks to single-threaded X isn't
    really expected to contend, ever.
    
    I've looked into using the CONFIG_FAULT_INJECTION
    infrastructure, but decided against it for two reasons:
    
    - EDEADLK handling is mandatory for ww mutex users and should
      never affect the outcome of a syscall. This is in contrast to -ENOMEM
      injection. So fine configurability isn't required.
    
    - The fault injection framework only allows to set a simple
      probability for failure. Now the probability that a ww mutex acquire
      stage with N locks will never complete (due to too many injected
      EDEADLK backoffs) is zero. But the expected number of ww_mutex_lock
      operations for the completely uncontended case would be O(exp(N)).
      The per-acuiqire ctx exponential backoff solution choosen here only
      results in O(log N) overhead due to injection and so O(log N * N)
      lock operations. This way we can fail with high probability (and so
      have good test coverage even for fancy backoff and lock acquisition
      paths) without running into patalogical cases.
    
    Note that EDEADLK will only ever be injected when we managed to
    acquire the lock. This prevents any behaviour changes for users
    which rely on the EALREADY semantics.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20130620113117.4001.21681.stgit@patser
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
  7. @robclark

    mutex: Add support for wound/wait style locks

    Maarten Lankhorst authored robclark committed
    Wound/wait mutexes are used when other multiple lock
    acquisitions of a similar type can be done in an arbitrary
    order. The deadlock handling used here is called wait/wound in
    the RDBMS literature: The older tasks waits until it can acquire
    the contended lock. The younger tasks needs to back off and drop
    all the locks it is currently holding, i.e. the younger task is
    wounded.
    
    For full documentation please read Documentation/ww-mutex-design.txt.
    
    References: https://lwn.net/Articles/548909/
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Acked-by: Rob Clark <robdclark@gmail.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/51C8038C.9000106@canonical.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
  8. @robclark

    arch: Make __mutex_fastpath_lock_retval return whether fastpath succe…

    Maarten Lankhorst authored robclark committed
    …eded or not
    
    This will allow me to call functions that have multiple
    arguments if fastpath fails. This is required to support ticket
    mutexes, because they need to be able to pass an extra argument
    to the fail function.
    
    Originally I duplicated the functions, by adding
    __mutex_fastpath_lock_retval_arg. This ended up being just a
    duplication of the existing function, so a way to test if
    fastpath was called ended up being better.
    
    This also cleaned up the reservation mutex patch some by being
    able to call an atomic_set instead of atomic_xchg, and making it
    easier to detect if the wrong unlock function was previously
    used.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20130620113105.4001.83929.stgit@patser
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    
    Conflicts:
    	include/asm-generic/mutex-xchg.h
  9. @amluto @robclark

    Add arch_phys_wc_{add, del} to manipulate WC MTRRs if needed

    amluto authored robclark committed
    Several drivers currently use mtrr_add through various #ifdef guards
    and/or drm wrappers.  The vast majority of them want to add WC MTRRs
    on x86 systems and don't actually need the MTRR if PAT (i.e.
    ioremap_wc, etc) are working.
    
    arch_phys_wc_add and arch_phys_wc_del are new functions, available
    on all architectures and configurations, that add WC MTRRs on x86 if
    needed (and handle errors) and do nothing at all otherwise.  They're
    also easier to use than mtrr_add and mtrr_del, so the call sites can
    be simplified.
    
    As an added benefit, this will avoid wasting MTRRs and possibly
    warning pointlessly on PAT-supporting systems.
    
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    Conflicts:
    	include/linux/io.h
  10. @robclark

    backport drm from drm-next 86e81f0

    robclark authored
    Sync to commit:
    
    commit 86e81f0
    Author:     David Herrmann <dh.herrmann@gmail.com>
    AuthorDate: Thu Jul 25 18:02:31 2013 +0200
    Commit:     Dave Airlie <airlied@redhat.com>
    CommitDate: Thu Aug 1 10:28:09 2013 +1000
    
        drm/mm: include required headers in drm_mm.h
    
        We need BUG_ON(), spinlock_t and standard kernel data-types so include the
        right headers.
    
        Subject: [drm-intel:drm-intel-nightly 154/166] include/drm/drm_mm.h:67:2:
         error: unknown type name 'spinlock_t'
        Message-ID: <51f14693.g5HGdcuw2v3m8FOd%fengguang.wu@intel.com>
    
        In case it didn't link to it correctly. Somehow this bug doesn't occur
        here on my machine, hmm. But I think fixing drm_mm.h is better than
        changing the include-order in drm_vma_manager.h, so this is what I
        did.
    
        Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
        Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  11. @robclark

    backport drm from 3.10-rc7

    robclark authored
    Sync to commit:
    
    commit 9e895ac
    Author:     Linus Torvalds <torvalds@linux-foundation.org>
    AuthorDate: Sat Jun 22 09:47:31 2013 -1000
    Commit:     Linus Torvalds <torvalds@linux-foundation.org>
    CommitDate: Sat Jun 22 09:47:31 2013 -1000
    
        Linux 3.10-rc7
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>
  12. @robclark

    msm: hack and slash through the tangled thicket of FB_MSM

    robclark authored
    Conflicts:
    	arch/arm/mach-msm/board-8930-display.c
Something went wrong with that request. Please try again.