1. 18 3月, 2010 1 次提交
  2. 01 3月, 2010 1 次提交
    • D
      vga_switcheroo: initial implementation (v15) · 6a9ee8af
      Dave Airlie 提交于
      Many new laptops now come with 2 gpus, one to be used for low power
      modes and one for gaming/on-ac applications. These GPUs are typically
      wired to the laptop panel and VGA ports via a multiplexer unit which
      is controlled via ACPI methods.
      
      4 combinations of systems typically exist - with 2 ACPI methods.
      Intel/ATI - Lenovo W500/T500 - use ATPX ACPI method
      ATI/ATI - some ASUS - use ATPX ACPI Method
      Intel/Nvidia - - use _DSM ACPI method
      Nvidia/Nvidia -  - use _DSM ACPI method.
      
      TODO:
      This patch adds support for the ATPX method and initial bits
      for the _DSM methods that need to written by someone with
      access to the hardware.
      Add a proper non-debugfs interface - need to get some proper
      testing first.
      
      v2: add power up/down support for both devices
      on W500 puts i915/radeon into D3 and cuts power to radeon.
      
      v3: redo probing methods, no DMI list, drm devices call to
      register with switcheroo, it tries to find an ATPX method on
      any device and once there is two devices + ATPX it inits the
      switcher.
      
      v4: ATPX msg handling using buffers - should work on more machines
      
      v5: rearchitect after more mjg59 discussion - move ATPX handling to
          radeon driver.
      
      v6: add file headers + initial nouveau bits (to be filled out).
      
      v7: merge delayed switcher code.
      
      v8: avoid suspend/resume of gpu that is off
      
      v9: rearchitect - mjg59 is always right. - move all ATPX code to
      radeon, should allow simpler DSM also proper ATRM handling
      
      v10: add ATRM support for radeon BIOS, add mutex to lock vgasr_priv
      
      v11: fix bug in resuming Intel for 2nd time.
      
      v12: start fixing up nvidia code blindly.
      
      v13: blindly guess at finishing nvidia code
      
      v14: remove radeon audio hacks - fix up intel resume more like upstream
      
      v15: clean up printks + remove unnecessary igd/dis pointers
      
      mount debugfs
      
      /sys/kernel/debug/vgaswitcheroo/switch - should exist if ATPX detected
       + 2 cards.
      
      DIS - immediate change to discrete
      IGD - immediate change to IGD
      DDIS - delayed change to discrete
      DIGD - delayed change to IGD
      ON - turn on not in use
      OFF - turn off not in use
      
      Tested on W500 (Intel/ATI) and T500 (Intel/ATI)
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6a9ee8af
  3. 27 2月, 2010 3 次提交
  4. 23 2月, 2010 2 次提交
    • C
      drm/i915: Record batch buffer following GPU error · 9df30794
      Chris Wilson 提交于
      In order to improve our diagnostic capabilities following a GPU hang
      and subsequent reset, we need to record the batch buffer that triggered
      the error. We assume that the current batch buffer, plus a few details
      about what else is on the active list, will be sufficient -- at the very
      least an improvement over nothing.
      
      The extra information is stored in /debug/dri/.../i915_error_state
      following an error, and may be decoded using
      intel_gpu_tools/tools/intel_error_decode.
      
      v2: Avoid excessive work under spinlocks.
      v3: Include ringbuffer for later analysis.
      v4: Use kunmap correctly and record more buffer state.
      v5: Search ringbuffer for current batch buffer
      v6: Use a work fn for the impossible IRQ error case.
      v7: Avoid non-atomic paths whilst in IRQ context.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      9df30794
    • J
      drm/i915: provide FBC status in debugfs · b5e50c3f
      Jesse Barnes 提交于
      Tools like powertop want to check the current FBC status and report it
      to the user.  So add a debugfs file indicating whether FBC is enabled,
      and if not, why.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      b5e50c3f
  5. 17 2月, 2010 1 次提交
  6. 11 2月, 2010 1 次提交
  7. 16 1月, 2010 1 次提交
  8. 07 1月, 2010 3 次提交
  9. 17 12月, 2009 3 次提交
  10. 08 12月, 2009 1 次提交
  11. 02 12月, 2009 1 次提交
  12. 01 12月, 2009 1 次提交
    • Z
      drm/i915: parse child device from VBT · 6363ee6f
      Zhao Yakui 提交于
      On some laptops there is no HDMI/DP. But the xrandr still reports
      several disconnected HDMI/display ports. In such case the user will be
      confused.
       >DVI1 disconnected (normal left inverted right x axis y axis)
       >DP1 disconnected (normal left inverted right x axis y axis)
       >DVI2 disconnected (normal left inverted right x axis y axis)
       >DP2 disconnected (normal left inverted right x axis y axis)
       >DP3 disconnected (normal left inverted right x axis y axis)
      
      This patch set is to use the child device parsed in VBT to decide whether
      the HDMI/DP/LVDS/TV should be initialized.
      
      Parse the child device from VBT.
      
      The device class type is also added for LFP, TV, HDMI, DP output.
      
      https://bugs.freedesktop.org/show_bug.cgi?id=22785Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Reviewed-by: NAdam Jackson <ajax@redhat.com>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      6363ee6f
  13. 06 11月, 2009 4 次提交
    • Z
      drm/i915: Add ACPI OpRegion support for Ironlake · 01c66889
      Zhao Yakui 提交于
      Add the support of ACPI opregion on Ironlake so that the backlight
      brightness can be adjusted by using ACPI interface
         >/sys/class/backlight/acpi_video0/brightness
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Tested-by: NZhao Yakui <yakui.zhao@intel.com>
      [zhenyuw: cleanups, fix typo for checking GSE irq and convert to
      current irq handling logic.]
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      01c66889
    • C
      drm/i915: Use a single thread workqueue · aed5f1dc
      Chris Wilson 提交于
      Our work is serialised so allocating per-cpu workqueues is overkill and
      a waste of resources.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      aed5f1dc
    • Z
      drm/i915: Replace DRM_DEBUG with DRM_DEBUG_DRIVER · 44d98a61
      Zhao Yakui 提交于
      Replace the DRM_DEBUG with DRM_DEBUG_DRIVER in generic i915 driver.
      Then the debug info can be obtained by adding the boot option of
      "drm.debug=0x02".
      
      At the same time the debug info in increase/decrease clock is also
      printed by using DRM_DEBUG_DRIVER instead of DRM_DEBUG_KMS.
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      44d98a61
    • D
      drm/i915: implement drmmode overlay support v4 · 02e792fb
      Daniel Vetter 提交于
      This implements intel overlay support for kms via a device-specific
      ioctl. Thomas Hellstrom brought up the idea of a general ioctl (on
      dri-devel). We've reached the conclusion that such an infrastructure
      only makes sense when multiple kms overlay implementations exists,
      which atm don't (and it doesn't look like this is gonna change).
      
      Open issues:
      - Runs in sync with the gpu, i.e. unnecessary waiting. I've decided
        to wait on this because the hw tends to hang when changing something
        in this area. I left some dummy functions as infrastructure.
      - polyphase filtering uses a static table.
      - uses uninterruptible sleeps. Unfortunately the alternatives may
        unnecessarily wedged the hw if/when we timeout too early (and
        userspace only overloaded the batch buffers with stuff worth a few
        secs of gpu time).
      
      Changes since v1:
      - fix off-by-one misconception on my side. This fixes fullscreen
        playback.
      Changes since v2:
      - add underrun detection as spec'ed for i965.
      - flush caches properly, fixing visual corruptions.
      Changes since v4:
      - fix up cache flushing of overlay memory regs.
      - killed require_pipe_a logic - it hangs the chip.
      
      Tested-By: diego.abelenda@gmail.com (on a 865G)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      [anholt: Resolved against the MADVISE ioctl going in before this one]
      Signed-off-by: NEric Anholt <eric@anholt.net>
      02e792fb
  14. 14 10月, 2009 1 次提交
  15. 29 9月, 2009 1 次提交
  16. 23 9月, 2009 1 次提交
    • C
      drm/i915: Add tracepoints · 1c5d22f7
      Chris Wilson 提交于
      By adding tracepoint equivalents for WATCH_BUF/EXEC we are able to monitor
      the lifetimes of objects, requests and significant events. These events can
      then be probed using the tracing frameworks, such as systemtap and, in
      particular, perf.
      
      For example to record the stack trace for every GPU stall during a run, use
      
        $ perf record -e i915:i915_gem_request_wait_begin -c 1 -g
      
      And
      
        $ perf report
      
      to view the results.
      
      [Updated to fix compilation issues caused.]
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Ben Gamari <bgamari@gmail.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      1c5d22f7
  17. 22 9月, 2009 1 次提交
  18. 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
  19. 18 9月, 2009 4 次提交
  20. 11 9月, 2009 1 次提交
    • J
      drm/i915: framebuffer compression for pre-GM45 · 80824003
      Jesse Barnes 提交于
      This patch adds framebuffer compression (good for about ~0.5W power
      savings in the best case) support for pre-GM45 chips.  GM45+ have a new,
      more flexible FBC scheme that will be added in a separate patch.
      
      FBC can't always be enabled: the compressed buffer must be physically
      contiguous and reside in stolen space.  So if you have a large display
      and a small amount of stolen memory, you may not be able to take
      advantage of FBC.  In some cases, a BIOS setting controls how much
      stolen space is available.  Increasing this to 8 or 16M can help.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      80824003
  21. 08 9月, 2009 1 次提交
    • D
      drm/i915: get the bridge device once. · ec2a4c3f
      Dave Airlie 提交于
      The driver gets the bridge device in a number of places, upcoming
      vga arb code paths need the bridge device, however they need it in
      under a lock, and the pci lookup can allocate memory. So clean
      this code up before then and get the bridge once for the driver lifetime.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ec2a4c3f
  22. 07 9月, 2009 1 次提交
    • C
      drm/i915: Pad ringbuffer with NOOPs before wrapping · 0ef82af7
      Chris Wilson 提交于
      According to the docs, the ringbuffer is not allowed to wrap in the middle
      of an instruction.
      
      G45 PRM, Vol 1b, p101:
        While the “free space” wrap may allow commands to be wrapped around the
        end of the Ring Buffer, the wrap should only occur between commands.
        Padding (with NOP) may be required to follow this restriction.
      
      Do as commanded.
      
      [Having seen bug reports where there is evidence of split commands, but
      apparently the GPU has continued on merrily before a bizarre and untimely
      death, this may or may not fix a few random hangs.]
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      CC: Eric Anholt <eric@anholt.net>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      0ef82af7
  23. 31 8月, 2009 1 次提交
    • D
      drm/kms: move driver specific fb common code to helper functions (v2) · 785b93ef
      Dave Airlie 提交于
      Initially I always meant this code to be shared, but things
      ran away from me before I got to it.
      
      This refactors the i915 and radeon kms fbdev interaction layers
      out into generic helpers + driver specific pieces.
      
      It moves all the panic/sysrq enhancements to the core file,
      and stores a linked list of kernel fbs. This could possibly be
      improved to only store the fb which has fbcon on it for panics
      etc.
      
      radeon retains some specific codes used for a big endian
      workaround.
      
      changes:
      fix oops in v1
      fix freeing path for crtc_info
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      785b93ef
  24. 06 8月, 2009 1 次提交
  25. 04 8月, 2009 1 次提交
  26. 11 7月, 2009 1 次提交
  27. 02 7月, 2009 1 次提交