1. 02 Mar, 2009 1 commit
  2. 19 Jan, 2009 1 commit
  3. 29 Dec, 2008 5 commits
    • Dave Airlie's avatar
      DRM: add mode setting support · f453ba04
      Dave Airlie authored
      
      
      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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      f453ba04
    • Dave Airlie's avatar
      drm: reorganise start and load. · a9d51a5a
      Dave Airlie authored
      
      
      Make sure we have the primary node so the device can add maps.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a9d51a5a
    • Vegard Nossum's avatar
      drm: fix leak of uninitialized data to userspace · 1147c9cd
      Vegard Nossum authored
      
      
      ...so drm_getunique() is trying to copy some uninitialized data to
      userspace. The ECX register contains the number of words that are
      left to copy -- so there are 5 * 4 = 20 bytes left. The offset of the
      first uninitialized byte (counting from the start of the string) is
      also 20 (i.e. 0xf65d2294&((1 << 5)-1) == 20). So somebody tried to
      copy 40 bytes when the string was only 19 long.
      
      In drm_set_busid() we have this code:
      
              dev->unique_len = 40;
              dev->unique = drm_alloc(dev->unique_len + 1, DRM_MEM_DRIVER);
            ...
              len = snprintf(dev->unique, dev->unique_len, pci:%04x:%02x:%02x.%d",
      
      ...so it seems that dev->unique is never updated to reflect the
      actual length of the string. The remaining bytes (20 in this case)
      are random uninitialized bytes that are copied into userspace.
      
      This patch fixes the problem by setting dev->unique_len after the
      snprintf().
      
      airlied- I've had to fix this up to store the alloced size so
      we have it for drm_free later.
      Reported-by: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
      Signed-off-by: default avatarVegard Nossum <vegardno@thuin.ifi.uio.no>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1147c9cd
    • Dave Airlie's avatar
      drm: move to kref per-master structures. · 7c1c2871
      Dave Airlie authored
      
      
      This is step one towards having multiple masters sharing a drm
      device in order to get fast-user-switching to work.
      
      It splits out the information associated with the drm master
      into a separate kref counted structure, and allocates this when
      a master opens the device node. It also allows the current master
      to abdicate (say while VT switched), and a new master to take over
      the hardware.
      
      It moves the Intel and radeon drivers to using the sarea from
      within the new master structures.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      7c1c2871
    • Dave Airlie's avatar
      drm: cleanup exit path for module unload · e7f7ab45
      Dave Airlie authored
      
      
      The current sub-module unload exit path is a mess, it tries
      to abuse the idr. Just keep a list of devices per driver struct
      and free them in-order on rmmod.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e7f7ab45
  4. 11 Nov, 2008 1 commit
  5. 17 Oct, 2008 2 commits
    • Jesse Barnes's avatar
      drm: kill drm_device->irq · 9bfbd5cb
      Jesse Barnes authored
      
      
      Like the last patch but adds a macro to get at the irq value instead of
      dereferencing pdev directly.  Should  make things easier for the BSD guys and
      if we ever support non-PCI devices.
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      9bfbd5cb
    • Eric Anholt's avatar
      drm: Add GEM ("graphics execution manager") to i915 driver. · 673a394b
      Eric Anholt authored
      
      
      GEM allows the creation of persistent buffer objects accessible by the
      graphics device through new ioctls for managing execution of commands on the
      device.  The userland API is almost entirely driver-specific to ensure that
      any driver building on this model can easily map the interface to individual
      driver requirements.
      
      GEM is used by the 2d driver for managing its internal state allocations and
      will be used for pixmap storage to reduce memory consumption and enable
      zero-copy GLX_EXT_texture_from_pixmap, and in the 3d driver is used to enable
      GL_EXT_framebuffer_object and GL_ARB_pixel_buffer_object.
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      673a394b
  6. 13 Jul, 2008 1 commit
    • Dave Airlie's avatar
      drm: reorganise drm tree to be more future proof. · c0e09200
      Dave Airlie authored
      
      
      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: default avatarDave Airlie <airlied@redhat.com>
      c0e09200
  7. 26 Apr, 2008 1 commit
  8. 06 Feb, 2008 4 commits
  9. 16 Jul, 2007 1 commit
  10. 10 Jul, 2007 3 commits
  11. 22 Mar, 2007 1 commit
    • Thomas Hellstrom's avatar
      drm: fix driver deadlock with AIGLX and reclaim_buffers_locked · 040ac320
      Thomas Hellstrom authored
      
      
      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: default avatarDave Airlie <airlied@linux.ie>
      040ac320
  12. 11 Dec, 2006 1 commit
  13. 06 Dec, 2006 2 commits
  14. 21 Sep, 2006 4 commits
  15. 23 Apr, 2006 1 commit
    • Dave Airlie's avatar
      drm: possible cleanups · 5d23fafb
      Dave Airlie authored
      
      
      This patch contains the following possible cleanups:
      - make the following needlessly global function static:
       - drm_bufs.c: drm_addbufs_fb()
      - remove the following unused EXPORT_SYMBOL's:
       - drm_agpsupport.c: drm_agp_bind_memory
       - drm_bufs.c: drm_rmmap_locked
       - drm_bufs.c: drm_rmmap
       - drm_stub.c: drm_get_dev
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
      5d23fafb
  16. 06 Feb, 2006 1 commit
  17. 02 Feb, 2006 1 commit
  18. 02 Jan, 2006 1 commit
  19. 11 Nov, 2005 1 commit
  20. 10 Nov, 2005 1 commit
    • Dave Airlie's avatar
      drm: rename driver hooks more understandably · 22eae947
      Dave Airlie authored
      
      
      Rename the driver hooks in the DRM to something a little more understandable:
      preinit         ->      load
      postinit        ->      (removed)
      presetup        ->      firstopen
      postsetup       ->      (removed)
      open_helper     ->      open
      prerelease      ->      preclose
      free_filp_priv  ->      postclose
      pretakedown     ->      lastclose
      postcleanup     ->      unload
      release         ->      reclaim_buffers_locked
      version         ->      (removed)
      
      postinit and version were replaced with generic code in the Linux DRM (drivers
      now set their version numbers and description in the driver structure, like on
      BSD).  postsetup wasn't used at all.  Fixes the savage hooks for
      initializing and tearing down mappings at the right times.  Testing involved at
      least starting X, running glxgears, killing glxgears, exiting X, and repeating.
      
      Tested on:      FreeBSD (g200, g400, r200, r128)
                      Linux (r200, savage4)
      
      From: Eric Anholt <anholt@freebsd.org>
      Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
      22eae947
  21. 05 Oct, 2005 1 commit
  22. 24 Sep, 2005 1 commit
    • Dave Airlie's avatar
      drm: lindent the drm directory. · b5e89ed5
      Dave Airlie authored
      
      
      I've been threatening this for a while, so no point hanging around.
      This lindents the DRM code which was always really bad in tabbing department.
      I've also fixed some misnamed files in comments and removed some trailing
      whitespace.
      Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
      b5e89ed5
  23. 10 Jul, 2005 2 commits
    • Dave Airlie's avatar
      drm: cleanup buffer/map code · 836cf046
      Dave Airlie authored
      
      
      This is a patch from DRM CVS that cleans up some code that was in CVS
      that I never moved to the kernel, this patch produces the result of the
      cleanups and puts it into the kernel drm.
      
      From: Eric Anholt <anholt@freebsd.org>, Jon Smirl, Dave Airlie
      Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
      836cf046
    • Dave Airlie's avatar
      drm: add test for AGP devices and driver override for it. · cda17380
      Dave Airlie authored
      
      
      Added device_is_agp callback to drm_driver.  This function is called by the
      platform-specific drm_device_is_agp function.  Added implementation of this
      function the the Linux-specific portion of the MGA driver to detect PCI G450
      cards.  Added code to the Linux-specific portion of the generic DRM layer to
      not initialize AGP infrastructure if the card is not AGP (this matches what
      already existed in BSD).
      
      Fix up i810/i830 and i915 drivers to always return AGP as they don't always
      report the capability.
      
      Fix the MGA to not report AGP for a card that has an AGP chip behind a PCI
      bridge.
      
      From: Ian Romanick, Dave Airlie, Alan Hourihane
      Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
      cda17380
  24. 07 Jul, 2005 1 commit
  25. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4