1. 04 9月, 2013 15 次提交
  2. 03 9月, 2013 7 次提交
  3. 02 9月, 2013 1 次提交
  4. 30 8月, 2013 3 次提交
  5. 29 8月, 2013 1 次提交
    • D
      gpu/vga_switcheroo: add driver control power feature. (v3) · 0d69704a
      Dave Airlie 提交于
      For optimus and powerxpress muxless we really want the GPU
      driver deciding when to power up/down the GPU, not userspace.
      
      This adds the ability for a driver to dynamically power up/down
      the GPU and remove the switcheroo from controlling it, the
      switcheroo reports the dynamic state to userspace also.
      
      It also adds 2 power domains, one for machine where the power
      switch is controlled outside the GPU D3 state, so the powerdown
      ordering is done correctly, and the second for the hdmi audio
      device to make sure it can resume for PCI config space accesses.
      
      v1.1: fix build with switcheroo off
      
      v2: add power domain support for radeon and v1 nvidia dsms
      v2.1: fix typo in off case
      
      v3: add audio power domain for hdmi audio + misc audio fixes
      
      v4: use PCI_SLOT macro, drop power reference on hdmi audio resume
      failure also.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0d69704a
  6. 23 8月, 2013 13 次提交
    • V
      drm/i915: Print seqnos as unsigned in debugfs · fb1ae911
      Ville Syrjälä 提交于
      I don't like seeing signed seqnos. Make them unsigned.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fb1ae911
    • V
      drm/i915: Fix context size calculation on SNB/IVB/VLV · e8016055
      Ville Syrjälä 提交于
      All the different context sizes reported in the CXT_SIZE register
      aren't meant to be simply added together.
      
      While BSpec is somewhat unclear on the topic of the actual context
      size, empirical tests have now revealed the truth. So let's add a
      big fat comment to remind people how it all works.
      
      As a result of correctly interpreting CXT_SIZE, the IVB context
      size is reduced from three pages to two, while SNB context size
      remains at two pages.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e8016055
    • D
      drm/i915: Use POSTING_READ in lcpll code · 35d8f2eb
      Daniel Vetter 提交于
      If we don't use the return value of a mmio read our coding style is to
      use the POSTING_READ macro. This avoids cluttering the mmio traces.
      
      While at it add the missing posting read in the lcpll enable function
      that Paulo spotted.
      
      v2: Drop the _NOTRACE changes, tracing such wait_for loops in the modeset
      code might actually be rather useful!
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      35d8f2eb
    • P
      drm/i915: enable Package C8+ by default · e27e9708
      Paulo Zanoni 提交于
      This should be working, so enable it by default. Also easy to revert.
      
      v2: Rebase, s/allow/enable/.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e27e9708
    • P
      drm/i915: add i915.pc8_timeout function · 90058745
      Paulo Zanoni 提交于
      We currently only enter PC8+ after all its required conditions are
      met, there's no rendering, and we stay like that for at least 5
      seconds.
      
      I chose "5 seconds" because this value is conservative and won't make
      us enter/leave PC8+ thousands of times after the screen is off: some
      desktop environments have applications that wake up and do rendering
      every 1-3 seconds, even when the screen is off and the machine is
      completely idle.
      
      But when I was testing my PC8+ patches I set the default value to
      100ms so I could use the bad-behaving desktop environments to
      stress-test my patches. I also thought it would be a good idea to ask
      our power management team to test different values, but I'm pretty
      sure they would ask me for an easy way to change the timeout. So to
      help these 2 cases I decided to create an option that would make it
      easier to change the default value. I also expect people making
      specific products that use our driver could try to find the perfect
      timeout for them.
      
      Anyway, fixing the bad-behaving applications will always lead to
      better power savings than just changing the timeout value: you need to
      stop waking the Kernel, not quickly put it back to sleep again after
      you wake it for nothing. Bad sleep leads to bad mood!
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      90058745
    • P
      drm/i915: add i915_pc8_status debugfs file · 371db66a
      Paulo Zanoni 提交于
      Make it print the value of the variables on the PC8 struct.
      
      v2: Update to recent renames and add the new fields.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      371db66a
    • P
      drm/i915: allow package C8+ states on Haswell (disabled) · c67a470b
      Paulo Zanoni 提交于
      This patch allows PC8+ states on Haswell. These states can only be
      reached when all the display outputs are disabled, and they allow some
      more power savings.
      
      The fact that the graphics device is allowing PC8+ doesn't mean that
      the machine will actually enter PC8+: all the other devices also need
      to allow PC8+.
      
      For now this option is disabled by default. You need i915.allow_pc8=1
      if you want it.
      
      This patch adds a big comment inside i915_drv.h explaining how it
      works and how it tracks things. Read it.
      
      v2: (this is not really v2, many previous versions were already sent,
           but they had different names)
          - Use the new functions to enable/disable GTIMR and GEN6_PMIMR
          - Rename almost all variables and functions to names suggested by
            Chris
          - More WARNs on the IRQ handling code
          - Also disable PC8 when there's GPU work to do (thanks to Ben for
            the help on this), so apps can run caster
          - Enable PC8 on a delayed work function that is delayed for 5
            seconds. This makes sure we only enable PC8+ if we're really
            idle
          - Make sure we're not in PC8+ when suspending
      v3: - WARN if IRQs are disabled on __wait_seqno
          - Replace some DRM_ERRORs with WARNs
          - Fix calls to restore GT and PM interrupts
          - Use intel_mark_busy instead of intel_ring_advance to disable PC8
      v4: - Use the force_wake, Luke!
      v5: - Remove the "IIR is not zero" WARNs
          - Move the force_wake chunk to its own patch
          - Only restore what's missing from RC6, not everything
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c67a470b
    • P
      drm/i915: fix SDEIMR assertion when disabling LCPLL · bd633a7c
      Paulo Zanoni 提交于
      This was causing WARNs in one machine, so instead of trying to guess
      exactly which hotplug bits should exist, just do the test on the
      non-HPD bits. We don't care about the state of the hotplug bits, we
      just care about the others, that need to be 1.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bd633a7c
    • P
      drm/i915: grab force_wake when restoring LCPLL · 215733fa
      Paulo Zanoni 提交于
      If LCPLL is disabled, there's a chance we might be in package C8 state
      or deeper, and we'll get a hard hang when restoring LCPLL (also, a red
      led lights up on my motherboard). So grab the force_wake, which will
      get us out of RC6 and, as a consequence, out of PC8+ (since we need
      RC6 to get into PC8+).
      
      Note: Discussions with hw designers are still ongoing what exactly
      goes boom here. But I think we can go ahead and just merge this little
      hack for now until it's clear what we actually need.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Add small note about the current state of the discussion
      around this hack.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      215733fa
    • J
      drm/i915: drop WaMbcDriverBootEnable workaround · 3414caf6
      Jesse Barnes 提交于
      Turns out the BIOS will do this for us as needed, and if we try to do it
      again we risk hangs or other bad behavior.
      
      Note that this seems to break libva on ChromeOS after resumes (but
      strangely _not_ after booting up).
      
      This essentially reverts
      
      commit b4ae3f22
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Thu Jun 14 11:04:48 2012 -0700
      
          drm/i915: load boot context at driver init time
      
      and
      
      commit b3bf0766
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Tue Nov 20 13:27:44 2012 -0200
      
          drm/i915: implement WaMbcDriverBootEnable on Haswell
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reported-and-Tested-by: NStéphane Marchesin <marcheu@chromium.org>
      [danvet: Add note about impact and regression citation.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3414caf6
    • R
      drm/i915: Cleaning up the relocate entry function · 5032d871
      Rafael Barbalho 提交于
      As the relocate entry function was getting a bit too big I've moved
      the code that used to use either the cpu or the gtt to for the
      relocation into two separate functions.
      Signed-off-by: NRafael Barbalho <rafael.barbalho@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5032d871
    • P
      drm/i915: merge HSW and SNB PM irq handlers · 1403c0d4
      Paulo Zanoni 提交于
      Because hsw_pm_irq_handler does exactly what gen6_rps_irq_handler does
      and also processes the 2 additional VEBOX bits. So merge those
      functions and wrap the VEBOX bits on a HAS_VEBOX check. This
      check isn't really necessary since the bits are reserved on
      SNB/IVB/VLV, but it's a good documentation on who uses them.
      
      v2: - Change IS_HASWELL check to HAS_VEBOX
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1403c0d4
    • P
      drm/i915: fix how we mask PMIMR when adding work to the queue · 4d3b3d5f
      Paulo Zanoni 提交于
      It seems we've been doing this ever since we started processing the
      RPS events on a work queue, on commit "drm/i915: move gen6 rps
      handling to workqueue", 4912d041.
      
      The problem is: when we add work to the queue, instead of just masking
      the bits we queued and leaving all the others on their current state,
      we mask the bits we queued and unmask all the others. This basically
      means we'll be unmasking a bunch of interrupts we're not going to
      process. And if you look at gen6_pm_rps_work, we unmask back only
      GEN6_PM_RPS_EVENTS, which means the bits we unmasked when adding work
      to the queue will remain unmasked after we process the queue.
      
      Notice that even though we unmask those unrelated interrupts, we never
      enable them on IER, so they don't fire our interrupt handler, they
      just stay there on IIR waiting to be cleared when something else
      triggers the interrupt handler.
      
      So this patch does what seems to make more sense: mask only the bits
      we add to the queue, without unmasking anything else, and so we'll
      unmask them after we process the queue.
      
      As a side effect we also have to remove that WARN, because it is not
      only making sure we don't mask useful interrupts, it is also making
      sure we do unmask useless interrupts! That piece of code should not be
      responsible for knowing which bits should be unmasked, so just don't
      assert anything, and trust that snb_disable_pm_irq should be doing the
      right thing.
      
      With i915.enable_pc8=1 I was getting ocasional "GEN6_PMIIR is not 0"
      error messages due to the fact that we unmask those unrelated
      interrupts but don't enable them.
      
      Note: if bugs start bisecting to this patch, then it probably means
      someone was relying on the fact that we unmask everything by accident,
      then we should fix gen5_gt_irq_postinstall or whoever needs the
      accidentally unmasked interrupts. Or maybe I was just wrong and we
      need to revert this patch :)
      
      Note: This started to be a more real issue with the addition of the
      VEBOX support since now we do enable more than just the minimal set of
      RPS interrupts in the IER register. Which means after the first rps
      interrupt has happened we will never mask the VEBOX user interrupts
      again and so will blow through cpu time needlessly when running video
      workloads.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Add note that this started to matter with VEBOX much more.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4d3b3d5f