1. 17 9月, 2013 5 次提交
  2. 13 9月, 2013 6 次提交
  3. 10 9月, 2013 3 次提交
    • C
      drm/i915: Write RING_TAIL once per-request · 09246732
      Chris Wilson 提交于
      Ignoring the legacy DRI1 code, and a couple of special cases (to be
      discussed later), all access to the ring is mediated through requests.
      The first write to a ring will grab a seqno and mark the ring as having
      an outstanding_lazy_request. Either through explicitly adding a request
      after an execbuffer or through an implicit wait (either by the CPU or by
      a semaphore), that sequence of writes will be terminated with a request.
      So we can ellide all the intervening writes to the tail register and
      send the entire command stream to the GPU at once. This will reduce the
      number of *serialising* writes to the tail register by a factor or 3-5
      times (depending upon architecture and number of workarounds, context
      switches, etc involved). This becomes even more noticeable when the
      register write is overloaded with a number of debugging tools. The
      astute reader will wonder if it is then possible to overflow the ring
      with a single command. It is not. When we start a command sequence to
      the ring, we check for available space and issue a wait in case we have
      not. The ring wait will in this case be forced to flush the outstanding
      register write and then poll the ACTHD for sufficient space to continue.
      
      The exception to the rule where everything is inside a request are a few
      initialisation cases where we may want to write GPU commands via the CS
      before userspace wakes up and page flips.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      09246732
    • V
      drm/i915: Call intel_update_watermarks() in specific place during modeset · f37fcc2a
      Ville Syrjälä 提交于
      Make the call to intel_update_watermarks() just once or twice during
      modeset. Ideally it should happen independently when each plane gets
      enabled/disabled, but for now it seems better to keep it in central
      place. We can improve things when we get all the planes sorted out
      in a better way.
      
      When enabling set up the watermarks just before the pipe is enabled.
      And when disabling we need to wait until we've marked the crtc as
      inactive, as otherwise intel_crtc_active() would still think the pipe
      is enabled and the computed watermarks would reflect that.
      
      v2: Pimp up the commit message a bit
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f37fcc2a
    • V
      drm/i915: Pass crtc to intel_update_watermarks() · 46ba614c
      Ville Syrjälä 提交于
      Passing the appropriate crtc to intel_update_watermarks() should help
      in avoiding needless work in the future.
      
      v2: Avoid clash with internal 'crtc' variable in some wm functions
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      46ba614c
  4. 05 9月, 2013 1 次提交
  5. 04 9月, 2013 10 次提交
  6. 30 8月, 2013 1 次提交
  7. 23 8月, 2013 6 次提交
    • 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: 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: 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: make IVB FDI training match spec v3 · 139ccd3f
      Jesse Barnes 提交于
      The existing code was trying different vswing and preemphasis settings
      in the wrong place, and wasn't trying them enough.  So add a loop to
      walk through them, properly disabling FDI TX and RX in between if a
      failure is detected.
      
      v2: remove unneeded reg writes, add delays around bit lock checks (Jesse)
      v3: fix TX and RX disable per spec (Paulo)
          fix delays per spec (Paulo)
          make RX symbol lock check match TX bit lock check (Paulo)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51983Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      139ccd3f
  8. 22 8月, 2013 4 次提交
  9. 15 8月, 2013 1 次提交
    • C
      drm/i915: Don't deref pipe->cpu_transcoder in the hangcheck code · 63b66e5b
      Chris Wilson 提交于
      If we get an error event really early in the driver setup sequence,
      which gen3 is especially prone to with various display GTT faults we
      Oops. So try to avoid this.
      
      Additionally with Haswell the transcoders are a separate bank of
      registers from the pipes (4 transcoders, 3 pipes). In event of an
      error, we want to be sure we have a complete and accurate picture of
      the machine state, so record all the transcoders in addition to all
      the active pipes.
      
      This regression has been introduced in
      
      commit 702e7a56
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Tue Oct 23 18:29:59 2012 -0200
      
          drm/i915: convert PIPECONF to use transcoder instead of pipe
      
      Based on the patch "drm/i915: Dump all transcoder registers on error"
      from Chris Wilson:
      
      v2: Rebase so that we don't try to be clever and try to figure out the
      cpu transcoder from hw state. That exercise should be done when we
      analyze the error state offline.
      
      The actual bugfix is to not call intel_pipe_to_cpu_transcoder in the
      error state capture code in case the pipes aren't fully set up yet.
      
      v3: Simplifiy the err->num_transcoders computation a bit. While at it
      make the error capture stuff save on systems without a display block.
      
      v4: Fix fail, spotted by Jani.
      
      v5: Completely new commit message, cc: stable.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60021
      Cc: stable@vger.kernel.org
      Tested-by: NDustin King <daking@rescomp.stanford.edu>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      63b66e5b
  10. 10 8月, 2013 2 次提交
  11. 09 8月, 2013 1 次提交