1. 01 6月, 2013 8 次提交
    • 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
  2. 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
  3. 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
  4. 11 5月, 2013 4 次提交
  5. 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
  6. 06 5月, 2013 3 次提交
  7. 03 5月, 2013 1 次提交
  8. 30 4月, 2013 3 次提交
  9. 25 4月, 2013 1 次提交
  10. 24 4月, 2013 1 次提交
  11. 19 4月, 2013 4 次提交
  12. 18 4月, 2013 7 次提交
  13. 09 4月, 2013 1 次提交
  14. 03 4月, 2013 3 次提交
  15. 02 4月, 2013 1 次提交