1. 02 7月, 2010 1 次提交
  2. 27 4月, 2010 1 次提交
  3. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  4. 08 1月, 2010 1 次提交
  5. 02 12月, 2009 1 次提交
    • L
      drm/i915: Fix sync to vblank when VGA output is turned off · 778c9026
      Li Peng 提交于
      In current vblank-wait implementation, if we turn off VGA output,
      drm_wait_vblank will still wait on the disabled pipe until timeout,
      because vblank on the pipe is assumed be enabled. This would cause
      slow system response on some system such as moblin.
      
      This patch resolve the issue by adding a drm helper function
      drm_vblank_off which explicitly clear vblank_enabled[crtc], wake up
      any waiting queue and save last vblank counter before turning off
      crtc. It also slightly change drm_vblank_get to ensure that we will
      will return immediately if trying to wait on a disabled pipe.
      Signed-off-by: NLi Peng <peng.li@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [anholt: hand-applied for conflicts with overlay changes]
      Signed-off-by: NEric Anholt <eric@anholt.net>
      778c9026
  6. 18 11月, 2009 2 次提交
  7. 11 11月, 2009 1 次提交
  8. 26 10月, 2009 1 次提交
  9. 21 9月, 2009 1 次提交
    • D
      drm/vgaarb: add VGA arbitration support to the drm and kms. · 28d52043
      Dave Airlie 提交于
      VGA arb requires DRM support for non-kms drivers, to turn on/off
      irqs when disabling the mem/io regions.
      
      VGA arb requires KMS support for GPUs where we can turn off VGA
      decoding. Currently we know how to do this for intel and radeon
      kms drivers, which allows them to be removed from the arbiter.
      
      This patch comes from Fedora rawhide kernel.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      28d52043
  10. 09 8月, 2009 1 次提交
  11. 19 6月, 2009 1 次提交
  12. 04 6月, 2009 1 次提交
    • D
      drm: fix irq naming for kms drivers. · b8da7de5
      Dave Airlie 提交于
      allocating devname in the i915 driver was a hack originally and I
      forgot to figure out how to do this properly back then.
      
      So this is the cleaner version that just picks devname or driver name
      in the irq code.
      
      It removes the devname allocs from the i915 driver.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b8da7de5
  13. 25 2月, 2009 1 次提交
  14. 08 2月, 2009 1 次提交
    • J
      drm/i915: capture last_vblank count at IRQ uninstall time too · 14d200c5
      Jesse Barnes 提交于
      In dc1336ff (set vblank enable flag correctly
      across IRQ uninstall), we made sure drivers that uninstall their interrupt
      handler set the vblank enabled flag correctly, so that when interrupts are
      re-enabled, vblank interrupts & counts work as expected.  However I missed the
      last_vblank field:  it needs to be updated as well, otherwise, at the next
      drm_update_vblank_count we'll end up comparing a current count to a stale
      one (the last one captured by the disable function), which may trigger the
      wraparound handling, leading to a jumpy counter and hangs in drm_wait_vblank.
      
      The jumpy counter can prevent the DRM_WAIT_ON from returning success if the
      difference between the current count and the requested count is greater than
      2^23, leading to timeouts or hangs, if the ioctl is restarted in a loop (as
      is the case in libdrm < 2.4.4).
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Acked-by: NMichel Dänzer <michel@daenzer.net>
      Tested-by: NTimo Aaltonen <tjaalton@cc.hut.fi>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      14d200c5
  15. 28 1月, 2009 1 次提交
  16. 11 1月, 2009 1 次提交
    • J
      drm/i915: set vblank enabled flag correctly across IRQ install/uninstall · dc1336ff
      Jesse Barnes 提交于
      In the absence of kernel mode setting, many drivers disable IRQs across VT
      switch.  The core DRM vblank code is missing a check for this case however;
      even after IRQ disable, the vblank code will still have the vblank_enabled
      flag set, so unless we track the fact that they're disabled at IRQ uninstall
      time, when we VT switch back in we won't actually re-enable them, which means
      any apps waiting on vblank before the switch will hang.
      
      This patch does that and also adds a sanity check to the wait condition to
      look for the irq_enabled flag in general, as well as adding a wakeup to the
      IRQ uninstall path.
      
      Fixes fdo bug #18879 with compiz hangs at VT switch.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      dc1336ff
  17. 29 12月, 2008 2 次提交
    • E
      drm: Add a debug node for vblank state. · fede5c91
      Eric Anholt 提交于
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      fede5c91
    • D
      DRM: add mode setting support · f453ba04
      Dave Airlie 提交于
      Add mode setting support to the DRM layer.
      
      This is a fairly big chunk of work that allows DRM drivers to provide
      full output control and configuration capabilities to userspace.  It was
      motivated by several factors:
        - the fb layer's APIs aren't suited for anything but simple
          configurations
        - coordination between the fb layer, DRM layer, and various userspace
          drivers is poor to non-existent (radeonfb excepted)
        - user level mode setting drivers makes displaying panic & oops
          messages more difficult
        - suspend/resume of graphics state is possible in many more
          configurations with kernel level support
      
      This commit just adds the core DRM part of the mode setting APIs.
      Driver specific commits using these new structure and APIs will follow.
      
      Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com>
      Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f453ba04
  18. 25 11月, 2008 1 次提交
  19. 11 11月, 2008 1 次提交
  20. 23 10月, 2008 1 次提交
  21. 18 10月, 2008 3 次提交
  22. 25 8月, 2008 1 次提交
  23. 14 7月, 2008 1 次提交
    • D
      drm: reorganise drm tree to be more future proof. · c0e09200
      Dave Airlie 提交于
      With the coming of kernel based modesetting and the memory manager stuff,
      the everything in one directory approach was getting very ugly and
      starting to be unmanageable.
      
      This restructures the drm along the lines of other kernel components.
      
      It creates a drivers/gpu/drm directory and moves the hw drivers into
      subdirectores. It moves the includes into an include/drm, and
      sets up the unifdef for the userspace headers we should be exporting.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c0e09200
  24. 07 5月, 2008 1 次提交
  25. 26 4月, 2008 1 次提交
    • J
      drm/vbl rework: rework how the drm deals with vblank. · ac741ab7
      Jesse Barnes 提交于
      Other Authors: Michel Dänzer <michel@tungstengraphics.com>
      mga: Ian Romanick <idr@us.ibm.com>
      via: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
      
      This re-works the DRM internals to provide a better interface for drivers
      to expose vblank on multiple crtcs.
      
      It also includes work done by Michel on making i915 triple buffering and pageflipping work properly.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ac741ab7
  26. 07 2月, 2008 1 次提交
  27. 15 10月, 2007 2 次提交
  28. 11 7月, 2007 4 次提交
  29. 23 3月, 2007 1 次提交
    • T
      drm: fix driver deadlock with AIGLX and reclaim_buffers_locked · 040ac320
      Thomas Hellstrom 提交于
      Bugzilla Bug #9457
      
      Add refcounting of user waiters to the DRM hardware lock, so that we can use
      DRM_LOCK_CONT flag more conservatively.
      
      Also add a kernel waiter refcount that if nonzero transfers the lock for the
      kernel context when it is released. This is useful when waiting for idle and can be used for very simple fence object driver implementations for the new memory manager
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      040ac320
  30. 07 12月, 2006 3 次提交