1. 11 7月, 2013 1 次提交
    • D
      drm/i915: improve SERR_INT clearing for fifo underrun reporting · 1dd246fb
      Daniel Vetter 提交于
      The current code won't report any fifo underruns on cpt if just one
      pipe has fifo underrun reporting disabled. We can't enable the
      interrupts, but we can still check the per-transcoder bits and so
      report the underrun delayed if:
      - We always clear the transcoder's bit (and none of the other bits)
        when enabling.
      - We check the transcoder's bit after disabling (to avoid racing with
        the interrupt handler).
      
      v2: I've forgotten to actually remove the old SERR_INT clearing.
      
      v3: Use transcoder_name as suggested by Paulo Zanoni. Paulo also
      noticed a logic bug: When an underrun interrupt fires we report it
      both in the interrupt handler and when checking for underruns when
      disabling it in cpt_set_fifo_underrun_reporting. But that second check
      is only required if the interrupt is disabled and we're switching of
      underrun reporting (e.g. because we're disabling the crtc). Hence
      check for that condition.
      
      At first I wanted to rework the code to pass that bit of information
      from the uppper functions down to cpt_set_fifo_underrun_reporting. But
      that turned out too messy. Hence the quick&dirty check whether the
      south error interrupt source is masked off or not.
      
      v4: Streamline the control flow a bit.
      
      v5: s/pipe/pch transcoder/ in the dmesg output, suggested by Paulo.
      
      v6: Review from Paulo:
      - Reorder the was_enabled assignment to only read the register when we
        need it. Also add a comment that we need to do that before updating
        the register.
      - s/%i/%c/ fix for the debug output.
      - Fix the checkpath complaint in the SERR_INT_TRANS_FIFO_UNDERRUN
        #define.
      
      v7: Hopefully put that elusive SERR hunk back into this patch, spotted
      by Paulo.
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1dd246fb
  2. 09 7月, 2013 1 次提交
  3. 02 7月, 2013 1 次提交
  4. 01 7月, 2013 4 次提交
  5. 18 6月, 2013 1 次提交
  6. 13 6月, 2013 1 次提交
    • V
      drm/i915: Try harder to disable trickle feed on VLV · e0d8d59b
      Ville Syrjälä 提交于
      The specs are a bit unclear whether the per-plane trickle feed disable
      control exists on VLV. There is another trickle feed disable control
      in the MI_ARB register.
      
      After some experimentation it turns out both the DSPCNTR trickle feed
      bits and the MI_ARB bit can be toggled. However the DSPCNTR bits don't
      seem to have any effect.
      
      The MI_ARB bit, on the other hand, has a noticable effect. I performed
      an experiment where I reduced the FIFO size via DSPARB and observed the
      effect of the MI_ARB trickle feed bit on the display.
      
      Using a 1920x1080-60 mode, with MI_ARB=0x4 the display started to have
      problems with DSPARB=0x42424242, whereas with MI_ARB=0x0 the problems
      didn't start until DSPARB=0x09090909. This seems to confirm that the
      MI_ARB trickle feed bit actually does work.
      
      So replace the use of the DSPCNTR trickle feed bits with MI_ARB
      on VLV.
      
      v2: Amend commit message with results from experimentation
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e0d8d59b
  7. 11 6月, 2013 2 次提交
  8. 07 6月, 2013 1 次提交
    • R
      drm/i915: WA: FBC Render Nuke. · fd3da6c9
      Rodrigo Vivi 提交于
      WaFbcNukeOn3DBlt for IVB, HSW.
      
      According BSPec: "Workaround: Do not enable Render Command Streamer tracking for FBC.
      Instead insert a LRI to address 0x50380 with data 0x00000004 after the PIPE_CONTROL that
      follows each render submission."
      
      v2: Chris noticed that flush_domains check was missing here and also suggested to do
          LRI only when fbc is enabled. To avoid do a I915_READ on every flush lets use the
          module parameter check.
      
      v3: Adding Wa name as Damien suggested.
      
      v4: Ville noticed VLV doesn't support fbc at all and comment came wrong from spec.
      
      v5: Ville noticed than on blt a Cache Clean LRI should be used instead the Nuke one.
      
      v6: Check for flush domain on blt (by Ville).
          Check for scanout dirty (by Chris).
      
      v7: Apply proper fbc_dirty implemented by Chris.
      
      v8: remove unused variables.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fd3da6c9
  9. 06 6月, 2013 1 次提交
  10. 05 6月, 2013 1 次提交
  11. 01 6月, 2013 10 次提交
    • P
      drm/i915: implement IPS feature · 42db64ef
      Paulo Zanoni 提交于
      Intermediate Pixel Storage is a feature that should reduce the number
      of times the display engine wakes up memory to read pixels, so it
      should allow deeper PC states. IPS can only be enabled on ULT pipe A
      with 8:8:8 pipe pixel formats.
      
      With eDP 1920x1080 and correct watermarks but without FBC this moves
      my PC7 residency from 2.5% to around 38%.
      
      v2: - It's tied to pipe A, not port A
          - Add pipe_config support (Chris)
          - Add some assertions (Chris)
          - Rebase against latest dinq
      v3: - Don't ever set ips_enabled to false (Daniel)
          - Only check for ips_enabled at hsw_disable_ips (Daniel)
      v4: - Add hsw_compute_ips_config (Daniel)
          - Use the new dump_pipe_config (Daniel)
      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>
      42db64ef
    • B
      drm/i915: Enable vebox interrupts · 12638c57
      Ben Widawsky 提交于
      Similar to a patch originally written by:
      
      v2: Reversed the meanings of masked and enabled (Haihao)
      Made non-destructive writes in case enable/disabler rps runs first
      (Haihao)
      
      v3: Reword error message (Damien)
      Modify postinstall to do the right thing based on previous fixup. (Ben)
      
      CC: Xiang, Haihao <haihao.xiang@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      12638c57
    • B
      drm/i915: consolidate interrupt naming scheme · cc609d5d
      Ben Widawsky 提交于
      The motivation here is we're going to add some new interrupt definitions
      and handling outside of the GT interrupts which is all we've managed so
      far (with some RPS exceptions). By consolidating the names in the future
      we can make thing a bit cleaner as we don't need to define register
      names twice, and we can leverage pretty decent overlap in HW registers
      since ILK.
      
      To explain briefly what is in the comments: there are two sets of
      interrupt masking/enabling registers. At least so far, the definitions
      of the two sets overlap. The old code setup distinct names for
      interrupts in each set, ie. one for global, and one for ring. This made
      things confusing when using the wrong defines in the wrong places.
      
      rebase: Modified VLV bits
      
      v2: Renamed GT_RENDER_MASTER to GT_RENDER_CS_MASTER (Damien)
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cc609d5d
    • B
      drm/i915: make PM interrupt writes non-destructive · 4848405c
      Ben Widawsky 提交于
      PM interrupts have an expanded role on HSW. It helps route the EBOX
      interrupts. This patch is necessary to make the existing code which
      touches the mask, and enable registers more friendly to other code paths
      that also will need these registers.
      
      To be more explicit:
      At preinstall all interrupts are masked and disabled. This implies that
      preinstall should always happen before any enabling/disabling of RPS or
      other interrupts.
      
      The PMIMR is touched by the workqueue, so enable/disable touch IER and
      IIR. Similarly, the code currently expects IMR has no use outside of the
      RPS related interrupts so they unconditionally set 0, or ~0. We could
      use IER in the workqueue, and IMR elsewhere, but since the workqueue
      use-case is more transient the existing usage makes sense.
      
      Disable RPS events:
      IER := IER & ~GEN6_PM_RPS_EVENTS // Disable RPS related interrupts
      IIR := GEN6_PM_RPS_EVENTS // Disable any outstanding interrupts
      
      Enable RPS events:
      IER := IER | GEN6_PM_RPS_EVENTS // Enable the RPS related interrupts
      IIR := GEN6_PM_RPS_EVENTS // Make sure there were no leftover events
      (really shouldn't happen)
      
      v2: Shouldn't destroy PMIIR or PMIMR VEBOX interrupt state in
      enable/disable rps functions (Haihao)
      
      v3: Bug found by Chris where we were clearing the wrong bits at rps
      disable.
          expanded commit message
      
      v4: v3 was based off the wrong branch
      
      v5: Added the setting of PMIMR because of previous patch update
      
      CC: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4848405c
    • P
      drm/i915: properly set HSW WM_LP watermarks · cca32e9a
      Paulo Zanoni 提交于
      We were previously only setting the WM_PIPE registers, now we are
      setting the LP watermark registers. This should allow deeper PC
      states, resulting in power savings.
      
      We're only using 1/2 data buffer partitioning for now.
      
      v2: Merge both hsw_compute_pri_wm_* functions (Ville)
      v3: - Simplify hsw_compute_wm_results (Ville)
          - Rebase due to changes on the previous patch
      v4: Unconfuse wm_lp/level (Ville)
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cca32e9a
    • P
      drm/i915: properly set HSW WM_PIPE registers · 801bcfff
      Paulo Zanoni 提交于
      We were previously calling sandybridge_update_wm on HSW, but the SNB
      function didn't really match the HSW specification, so we were just
      writing the wrong values.
      
      With this patch, the haswell_update_wm function will set the correct
      values for the WM_PIPE registers, but it will still keep all the LP
      watermarks disabled.
      
      The patch may look a little bit over-complicated for now, but it's
      because much of the infrastructure for setting the LP watermarks is
      already in place, so we won't have too much code churn on the patch
      that sets the LP watermarks.
      
      v2: - Fix pixel_rate on panel fitter case (Ville)
          - Try to not overflow (Ville)
          - Remove useless variable (Ville)
          - Fix p->pri_horiz_pixels (Paulo)
      v3: - Fix rounding errors on hsw_wm_method2 (Ville)
      v4: - Fix memcmp bug (Paulo)
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      801bcfff
    • B
      drm/i915: Vebox ringbuffer init · 9a8a2213
      Ben Widawsky 提交于
      v2: Add set_seqno which didn't exist before rebase (Haihao)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NXiang, Haihao <haihao.xiang@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9a8a2213
    • B
      drm/i915: Add VECS semaphore bits · 1950de14
      Ben Widawsky 提交于
      Like the other rings, the VECS supports semaphores. The semaphore stuff
      is a bit wonky so this patch on it's own should be nice for review.
      
      This patch should have no functional impact.
      
      v2: Fix the English parts of clarification (again, register names were
      right, text was reversed) (Damien)
      Restore the still valid invariant. (Damien)
      The bsd semaphore register should be MI_SEMAPHORE_SYNC_VVE (Damien)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1950de14
    • B
      drm/i915: Semaphore MBOX update generalization · ad776f8b
      Ben Widawsky 提交于
      This replaces the existing MBOX update code with a more generalized
      calculation for emitting mbox updates. We also create a sentinel for
      doing the updates so we can more abstractly deal with the rings.
      
      When doing MBOX updates the code must be aware of the /other/ rings.
      Until now the platforms which supported semaphores had a fixed number of
      rings and so it made sense for the code to be very specialized
      (hardcoded).
      
      The patch does contain a functional change, but should have no
      behavioral changes.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ad776f8b
    • B
      drm/i915: Comments for semaphore clarification · 5586181f
      Ben Widawsky 提交于
      Semaphores are tied very closely to the rings in the GPU. Trivial patch
      adds comments to the existing code so that when we add new rings we can
      include comments there as well. It also helps distinguish the ring to
      semaphore mailbox interactions by using the ringname in the semaphore
      data structures.
      
      This patch should have no functional impact.
      
      v2: The English parts (as opposed to register names) of the comments
      were reversed. (Damien)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5586181f
  12. 24 5月, 2013 1 次提交
    • J
      drm/i915: refactor VLV IOSF sideband accessors to use one helper · 5a09ae9f
      Jani Nikula 提交于
      Both the intel_dpio_{read,write} and valleyview_{punit,nc}_{read,write}
      use the IOSF sideband interface. They access the same registers and do
      mostly the same stuff, but no shared code. There are even duplicate
      register defines for the same registers. Both have locking, but the
      former use dpio_lock and the latter rps.hw_lock. It's racy.
      
      This patch refactors the sideband access to a single function that
      expects dpio_lock to be held. The dpio_lock is only used for sideband
      stuff, so it's a better match than rps.hw_lock for the purpose. The rps
      stuff still needs rps.hw_lock, since it's used to protect more than just
      the register access, so rps code will need to hold both locks.
      
      Based on the work by Shobhit Kumar <shobhit.kumar@intel.com> and Yogesh
      Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com>.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5a09ae9f
  13. 23 5月, 2013 1 次提交
    • P
      drm/i915: set FORCE_ARB_IDLE_PLANES workaround · 90a88643
      Paulo Zanoni 提交于
      Commit 1544d9d5 added a workaround
      inside haswell_init_clock_gating and mentioned it is "a workaround for
      early silicon revisions and should be removed later". This workaround
      is documented in bit 31 of PRI_CTL. I asked Arthur and he mentioned
      that setting FORCE_ARB_IDLE_PLANES replaces that workaround for the
      newer machines. So use the new one.
      
      Also notice that there's still another workaround for PRI_CTL that
      involves WM_DBG, but it's not the one we're reverting. And notice that
      we were previously setting WM_DBG_DISALLOW_MULTIPIPE_LP which disables
      the LP watermarks when more than one pipe is used, and we really don't
      want this because we need the LP watermarks if we want to reach deeper
      PC states.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Add a comment for the w/a name Ville dug out of Bspec.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      90a88643
  14. 11 5月, 2013 4 次提交
  15. 08 5月, 2013 1 次提交
    • B
      Revert "drm/i915: Calculate correct stolen size for GEN7+" · c4ae25ec
      Ben Widawsky 提交于
      This reverts commit 03752f5b.
      
      This revert requires a bit of explanation on how I understand things
      work. Internally the architects/designers decide how the stolen encoding
      works. We put it in a doc. BIOS writers take these docs and implement
      it. Driver writers read the doc too, and read the value left by the BIOS
      writers, and then we make magic.
      
      The failing here is that in the docs we had[1] contained two different
      definitions for this register for Gen7. (We have both a PCI register,
      and an MMIO, and each of these were different). At the time [2] of
      03752f5b, we asked the architects what the correct value should be; but
      that doesn't match the reality (BIOS) unfortunately.
      
      So on all machines I can get my hands on, this revert is the right thing
      to do. I've also worked with the product group to confirm that they
      agree this revert is what we should do. People using HW made my "people"
      who both write their own BIOS, and have access to our docs (Apple?).
      Investigations are still ongoing about whether we need to add a list
      of machines needing special handling, but this patch should be the
      right thing for pretty much everyone.
      
      [1] The docs are still wrong on this one. Now instead of two registers with
      two definitions, we have one register with BOTH definitions, progress?
      [2] The open source PRMs have the "wrong" definitions in chapter Volume
      1 part6, section 1.1.12.
      
      This digging was inspired by Paulo.
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Augment the patch saying that it's still a bit unclear
      whether there are any machines out there with "wrong" firmware and
      whether we need to add a list to handle them specially.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c4ae25ec
  16. 06 5月, 2013 3 次提交
  17. 03 5月, 2013 1 次提交
  18. 30 4月, 2013 3 次提交
  19. 25 4月, 2013 1 次提交
  20. 24 4月, 2013 1 次提交