This project is mirrored from Pull mirroring updated .
  1. 01 Nov, 2011 1 commit
  2. 29 Aug, 2011 1 commit
  3. 07 Jul, 2011 1 commit
  4. 09 Jun, 2011 1 commit
  5. 31 Mar, 2011 1 commit
  6. 21 Mar, 2011 1 commit
  7. 07 Feb, 2011 1 commit
    • Dave Airlie's avatar
      drm: dumb scanout create/mmap for intel/radeon (v3) · ff72145b
      Dave Airlie authored
      This is just an idea that might or might not be a good idea,
      it basically adds two ioctls to create a dumb and map a dumb buffer
      suitable for scanout. The handle can be passed to the KMS ioctls to create
      a framebuffer.
      It looks to me like it would be useful in the following cases:
      a) in development drivers - we can always provide a shadowfb fallback.
      b) libkms users - we can clean up libkms a lot and avoid linking
      to libdrm_*.
      c) plymouth via libkms is a lot easier.
      Userspace bits would be just calls + mmaps. We could probably
      mark these handles somehow as not being suitable for acceleartion
      so as top stop people who are dumber than dumb.
      Signed-off-by: default avatarDave Airlie <>
  8. 25 Jan, 2011 1 commit
  9. 09 Dec, 2010 1 commit
  10. 06 Oct, 2010 1 commit
  11. 10 Aug, 2010 2 commits
  12. 21 Jul, 2010 2 commits
    • Chris Wilson's avatar
      drm: Return EBUSY if the framebuffer is unbound when flipping. · 90c1efdd
      Chris Wilson authored
      It looks like there is a race condition between unbinding a framebuffer
      on a hotplug event and user space trying to flip:
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
      IP: [<ffffffffa008c7d3>] intel_crtc_page_flip+0xc9/0x39c [i915]
      PGD 114724067 PUD 1145bd067 PMD 0
      Oops: 0000 [#1] SMP
      Pid: 10954, comm: X Not tainted 2.6.35-rc5_stable_20100714+ #1
      RIP: 0010:[<ffffffffa008c7d3>]  [<ffffffffa008c7d3>]
      intel_crtc_page_flip+0xc9/0x39c [i915]
      RSP: 0018:ffff880114927cc8  EFLAGS: 00010282
      RAX: 0000000000000000 RBX: ffff88012df48320 RCX: ffff88010c945600
      RDX: ffff880001a109c8 RSI: ffff88010c945840 RDI: ffff88012df48320
      RBP: ffff880114927d18 R08: ffff88012df48280 R09: ffff88012df48320
      R10: 0000000003c2e0b0 R11: 0000000000003246 R12: ffff88010c945840
      R13: ffff88012df48000 R14: 0000000000000060 R15: ffff88012dbb8000
      FS:  00007f9e6078e830(0000) GS:ffff880001a00000(0000)
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000058 CR3: 00000001177a8000 CR4: 00000000000406f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process X (pid: 10954, threadinfo ffff880114926000, task
       ffff88010c945600 ffff880115b176c0 ffff88012db10000 0000000000000246
      <0> fffffff40006101c ffff88010c945600 00000000ffffffea ffff88010c945600
      <0> ffff88012df48320 ffff88011b4b6780 ffff880114927d78 ffffffffa003bd0e
      Call Trace:
       [<ffffffffa003bd0e>] drm_mode_page_flip_ioctl+0x1bc/0x214 [drm]
       [<ffffffffa00311fc>] drm_ioctl+0x25e/0x35e [drm]
       [<ffffffffa003bb52>] ? drm_mode_page_flip_ioctl+0x0/0x214 [drm]
       [<ffffffff810f1c3c>] vfs_ioctl+0x2a/0x9e
       [<ffffffff810f227e>] do_vfs_ioctl+0x531/0x565
       [<ffffffff810f2307>] sys_ioctl+0x55/0x77
       [<ffffffff810e56d6>] ? sys_read+0x47/0x6f
       [<ffffffff81002a2b>] system_call_fastpath+0x16/0x1b
      Code: 45 d4 f4 ff ff ff 0f 84 e0 02 00 00 48 8b 4d b0 49 8d 9d 20 03 00 00 48
      89 df 49 89 4c 24 38 49 8b 07 49 89 44 24 20 49 8b 47 20 <48> 8b 40 58 49 c7 04
      24 00 00 00 00 49 c7 44 24 18 a9 a5 08 a0
      RIP  [<ffffffffa008c7d3>] intel_crtc_page_flip+0xc9/0x39c [i915]
       RSP <ffff880114927cc8>
      CR2: 0000000000000058
        Bug 28811 - [page-flipping] GPU hang when modeset after unplugging
                    another monitor (under compiz)
      Signed-off-by: default avatarChris Wilson <>
      Reviewed-by: default avatarJesse Barnes <>
      Signed-off-by: default avatarDave Airlie <>
    • Ben Skeggs's avatar
      drm: add "auto" dithering method · 92897b5c
      Ben Skeggs authored
      There's no convenient/reliable way for drivers to both obey the dithering
      mode property, and to be able to attempt to provide a good default in all
      This commit adds an "auto" method to the property which drivers can default
      to if they wish, whilst still allowing the user to override the choice as
      they do now.
      Signed-off-by: default avatarBen Skeggs <>
      Signed-off-by: default avatarDave Airlie <>
  13. 16 Jul, 2010 1 commit
  14. 07 Jun, 2010 1 commit
  15. 07 Apr, 2010 2 commits
    • Dave Airlie's avatar
      drm/kms/fb: separate fbdev connector list from core drm connectors · 0b4c0f3f
      Dave Airlie authored
      This breaks the connection between the core drm connector list
      and the fbdev connector usage, and allows them to become disjoint
      in the future. It also removes the untype void* that was in the
      connector struct to support this.
      All connectors are added to the fbdev now but this could be
      changed in the future.
      Signed-off-by: default avatarDave Airlie <>
    • Dave Airlie's avatar
      drm/fb: fix fbdev object model + cleanup properly. · 38651674
      Dave Airlie authored
      The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work.
      This patch
      a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs.
      b) migrated all the fb helper functions out of the crtc helper file into the fb helper file.
      c) pushed the fb probing/hotplug control into the driver
      d) makes the surface sizes into a structure for ease of passing
      This changes the intel/radeon/nouveau drivers to use the new helper.
      Signed-off-by: default avatarDave Airlie <>
  16. 06 Apr, 2010 1 commit
  17. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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.
      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
      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
      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
      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: default avatarTejun Heo <>
      Guess-its-ok-by: default avatarChristoph Lameter <>
      Cc: Ingo Molnar <>
      Cc: Lee Schermerhorn <>
  18. 08 Jan, 2010 1 commit
  19. 04 Dec, 2009 1 commit
  20. 03 Dec, 2009 1 commit
    • Jakob Bornecrantz's avatar
      drm: Add dirty ioctl and property · 884840aa
      Jakob Bornecrantz authored
      This commit adds a ioctl and property to allow userspace
      to notify the kernel that a framebuffer has changed. Instead
      of snooping the command stream this allows finer grained
      tracking of which areas have changed.
      The primary user for this functionality is virtual hardware
      like the vmware svga device, but also Xen hardware likes to
      be notify. There is also real hardware like DisplayLink and
      DisplayPort that might take advantage of this ioctl.
      Signed-off-by: default avatarJakob Bornecrantz <>
      Signed-off-by: default avatarDave Airlie <>
  21. 01 Dec, 2009 1 commit
  22. 18 Nov, 2009 1 commit
  23. 05 Nov, 2009 1 commit
  24. 05 Oct, 2009 1 commit
  25. 25 Sep, 2009 1 commit
    • Dave Airlie's avatar
      drm/kms: start adding command line interface using fb. · d50ba256
      Dave Airlie authored
      [note this requires an fb patch posted to linux-fbdev-devel already]
      This uses the normal video= command line option to control the kms
      output setup at boot time. It is used to override the autodetection
      done by kms.
      video= normally takes a framebuffer as the first parameter, in kms
      it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output
      connector is specified the mode string will apply to all connectors.
      The mode specification used will match down the probed modes, and if
      no mode is found it will add a CVT mode that matches.
      video=1024x768 - all connectors match a 1024x768 mode or add a CVT on
      video=VGA-1:1024x768, VGA-1 connector gets mode only.
      The same strings as used in current fb modedb.c are used, except I've
      added three more letters, e, D, d, e = enable, D = enable Digital,
      d = disable, which allow a connector to be forced into a certain state.
      Signed-off-by: default avatarDave Airlie <>
  26. 07 Sep, 2009 1 commit
  27. 19 Aug, 2009 2 commits
  28. 13 Aug, 2009 1 commit
  29. 04 Aug, 2009 5 commits
  30. 03 Jun, 2009 1 commit
    • Keith Packard's avatar
      drm: Hook up DPMS property handling in drm_crtc.c. Add drm_helper_connector_dpms. · c9fb15f6
      Keith Packard authored
      Making the drm_crtc.c code recognize the DPMS property and invoke the
      connector->dpms function doesn't remove any capability from the driver while
      reducing code duplication.
      That just highlighted the problem with the existing DPMS functions which
      could turn off the connector, but failed to turn off any relevant crtcs. The
      new drm_helper_connector_dpms function manages all of that, using the
      drm_helper-specific crtc and encoder dpms functions, automatically computing
      the appropriate DPMS level for each object in the system.
      This fixes the current troubles in the i915 driver which left PLLs, pipes
      and planes running while in DPMS_OFF mode or even while they were unused.
      Signed-off-by: default avatarKeith Packard <>
      Signed-off-by: default avatarDave Airlie <>
  31. 20 Feb, 2009 1 commit
  32. 22 Jan, 2009 1 commit
    • Jesse Barnes's avatar
      drm: create mode_config idr lock · ad2563c2
      Jesse Barnes authored
      Create a separate mode_config IDR lock for simplicity.  The core DRM
      config structures (connector, mode, etc. lists) are still protected by
      the mode_config mutex, but the CRTC IDR (used for the various identifier
      IDs) is now protected by the mode_config idr_mutex.  Simplifies the
      locking a bit and removes a warning.
      All objects are protected by the config mutex, we may in the future,
      split the object further to have reference counts.
      Signed-off-by: default avatarJesse Barnes <>
      Signed-off-by: default avatarDave Airlie <>