1. 15 7月, 2009 1 次提交
  2. 24 6月, 2009 1 次提交
  3. 19 6月, 2009 3 次提交
  4. 15 6月, 2009 3 次提交
    • J
      drm/radeon: introduce kernel modesetting for radeon hardware · 771fe6b9
      Jerome Glisse 提交于
      Add kernel modesetting support to radeon driver, use the ttm memory
      manager to manage memory and DRM/GEM to provide userspace API.
      In order to avoid backward compatibility issue and to allow clean
      design and code the radeon kernel modesetting use different code path
      than old radeon/drm driver.
      
      When kernel modesetting is enabled the IOCTL of radeon/drm
      driver are considered as invalid and an error message is printed
      in the log and they return failure.
      
      KMS enabled userspace will use new API to talk with the radeon/drm
      driver. The new API provide functions to create/destroy/share/mmap
      buffer object which are then managed by the kernel memory manager
      (here TTM). In order to submit command to the GPU the userspace
      provide a buffer holding the command stream, along this buffer
      userspace have to provide a list of buffer object used by the
      command stream. The kernel radeon driver will then place buffer
      in GPU accessible memory and will update command stream to reflect
      the position of the different buffers.
      
      The kernel will also perform security check on command stream
      provided by the user, we want to catch and forbid any illegal use
      of the GPU such as DMA into random system memory or into memory
      not owned by the process supplying the command stream. This part
      of the code is still incomplete and this why we propose that patch
      as a staging driver addition, future security might forbid current
      experimental userspace to run.
      
      This code support the following hardware : R1XX,R2XX,R3XX,R4XX,R5XX
      (radeon up to X1950). Works is underway to provide support for R6XX,
      R7XX and newer hardware (radeon from HD2XXX to HD4XXX).
      
      Authors:
          Jerome Glisse <jglisse@redhat.com>
          Dave Airlie <airlied@redhat.com>
          Alex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      771fe6b9
    • T
      drm: Add the TTM GPU memory manager subsystem. · ba4e7d97
      Thomas Hellstrom 提交于
      TTM is a GPU memory manager subsystem designed for use with GPU
      devices with various memory types (On-card VRAM, AGP,
      PCI apertures etc.). It's essentially a helper library that assists
      the DRM driver in creating and managing persistent buffer objects.
      
      TTM manages placement of data and CPU map setup and teardown on
      data movement. It can also optionally manage synchronization of
      data on a per-buffer-object level.
      
      TTM takes care to provide an always valid virtual user-space address
      to a buffer object which makes user-space sub-allocation of
      big buffer objects feasible.
      
      TTM uses a fine-grained per buffer-object locking scheme, taking
      care to release all relevant locks when waiting for the GPU.
      Although this implies some locking overhead, it's probably a big
      win for devices with multiple command submission mechanisms, since
      the lock contention will be minimal.
      
      TTM can be used with whatever user-space interface the driver
      chooses, including GEM. It's used by the upcoming Radeon KMS DRM driver
      and is also the GPU memory management core of various new experimental
      DRM drivers.
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ba4e7d97
    • D
      drm/radeon: fix mobility flags on new PCI IDs. · 602c11a8
      Dave Airlie 提交于
      These aren't used that much on r600, but may be needed in the future,
      so get them correct now.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      602c11a8
  5. 12 6月, 2009 5 次提交
  6. 11 6月, 2009 2 次提交
    • Y
      drm: add separate drm debugging levels · 4fefcb27
      yakui_zhao 提交于
      Now all the DRM debug info will be reported if the boot option of
      "drm.debug=1" is added. Sometimes it is inconvenient to get the debug
      info in KMS mode. We will get too much unrelated info.
      
      This will separate several DRM debug levels and the debug level can be used
      to print the different debug info. And the debug level is controlled by the
      module parameter of drm.debug
      
      In this patch it is divided into four debug levels;
             	drm_core, drm_driver, drm_kms, drm_mode.
      
      At the same time we can get the different debug info by changing the debug
      level. This can be done by adding the module parameter. Of course it can
      be changed through the /sys/module/drm/parameters/debug after the system is
      booted.
      
      Four debug macro definitions are provided.
      	DRM_DEBUG(fmt, args...)
      	DRM_DEBUG_DRIVER(prefix, fmt, args...)
      	DRM_DEBUG_KMS(prefix, fmt, args...)
      	DRM_DEBUG_MODE(prefix, fmt, args...)
      
      When the boot option of "drm.debug=4" is added, it will print the debug info
      using DRM_DEBUG_KMS macro definition.
      When the boot option of "drm.debug=6" is added, it will print the debug info
      using DRM_DEBUG_KMS/DRM_DEBUG_DRIVER.
      
      Sometimes we expect to print the value of an array.
      For example: SDVO command,
      In such case the following four DRM debug macro definitions are added:
      	DRM_LOG(fmt, args...)
      	DRM_LOG_DRIVER(fmt, args...)
      	DRM_LOG_KMS(fmt, args...)
      	DRM_LOG_MODE(fmt, args...)
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4fefcb27
    • R
      drm: fix LOCK_TEST_WITH_RETURN macro · dcae3626
      Roel Kluin 提交于
      When this macro isn't called with 'file_priv' this will result in a build
      failure.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dcae3626
  7. 10 6月, 2009 1 次提交
  8. 04 6月, 2009 1 次提交
    • K
      drm: Hook up DPMS property handling in drm_crtc.c. Add drm_helper_connector_dpms. · c9fb15f6
      Keith Packard 提交于
      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: NKeith Packard <keithp@keithp.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c9fb15f6
  9. 20 5月, 2009 1 次提交
    • J
      drm/i915: allocate large pointer arrays with vmalloc · 8e7d2b2c
      Jesse Barnes 提交于
      For awhile now, many of the GEM code paths have allocated page or
      object arrays with the slab allocator.  This is nice and fast, but
      won't work well if memory is fragmented, since the slab allocator works
      with physically contiguous memory (i.e. order > 2 allocations are
      likely to fail fairly early after booting and doing some work).
      
      This patch works around the issue by falling back to vmalloc for
      >PAGE_SIZE allocations.  This is ugly, but much less work than chaining
      a bunch of pages together by hand (suprisingly there's not a bunch of
      generic kernel helpers for this yet afaik).  vmalloc space is somewhat
      precious on 32 bit kernels, but our allocations shouldn't be big enough
      to cause problems, though they're routinely more than a page.
      
      Note that this patch doesn't address the unchecked
      alloc-based-on-ioctl-args in GEM; that needs to be fixed in a separate
      patch.
      
      Also, I've deliberately ignored the DRM's "area" junk.  I don't think
      anyone actually uses it anymore and I'm hoping it gets ripped out soon.
      
      [Updated: removed size arg to new free function.  We could unify the
      free functions as well once the DRM mem tracking is ripped out.]
      
      fd.o bug #20152 (part 1/3)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      8e7d2b2c
  10. 15 5月, 2009 1 次提交
  11. 22 4月, 2009 1 次提交
  12. 14 4月, 2009 1 次提交
  13. 09 4月, 2009 1 次提交
    • E
      drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU. · 280b713b
      Eric Anholt 提交于
      Save the bit 17 state of the pages when freeing the page list, and
      reswizzle them if necessary when rebinding the pages (in case they were
      swapped out).  Since we have userland with expectations that the swizzle
      enums let it pread and pwrite contents accurately, we can't expose a new
      swizzle enum for bit 17 (which it would have to GTT map to handle), so we
      handle it down in pread and pwrite by swizzling the copy when bit 17 of the
      page address is set.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      280b713b
  14. 03 4月, 2009 3 次提交
  15. 29 3月, 2009 4 次提交
  16. 28 3月, 2009 2 次提交
  17. 27 3月, 2009 1 次提交
  18. 13 3月, 2009 8 次提交