1. 11 7月, 2014 3 次提交
  2. 10 7月, 2014 1 次提交
    • P
      drm/i915: fix D_COMP usage on BDW · 9ccd5aeb
      Paulo Zanoni 提交于
      On HSW, the D_COMP register can be accessed through the mailbox (read
      and write) or through MMIO on a MCHBAR offset (read only). On BDW, the
      access should be done through MMIO on another address. So to account
      for all these cases, create hsw_read_dcomp() with the correct
      implementation for reading, and also fix hsw_write_dcomp() to do the
      correct thing on BDW.
      
      With this patch, we can now get back from the PC8+ state on BDW. We
      were previously getting a black screen and lots of dmesg errors.
      Please notice that the bug only happens when you actually reach the
      PC8+ states, not when you only allow it.
      
      Testcase: igt/pm_rpm/rte
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9ccd5aeb
  3. 09 7月, 2014 1 次提交
  4. 08 7月, 2014 2 次提交
    • B
      drm/i915/bdw: implement semaphore wait · 5ee426ca
      Ben Widawsky 提交于
      Semaphore waits use a new instruction, MI_SEMAPHORE_WAIT. The seqno to
      wait on is all well defined by the table in the previous patch. There is
      nothing else different from previous GEN's semaphore synchronization
      code.
      
      v2: Update macros to not require the other ring's ring->id (Chris)
      
      v3: Add missing VCS2 gen8_ring_wait init besides
          s/ring_buffer/engine_cs (Rodrigo)
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5ee426ca
    • B
      drm/i915/bdw: implement semaphore signal · 3e78998a
      Ben Widawsky 提交于
      Semaphore signalling works similarly to previous GENs with the exception
      that the per ring mailboxes no longer exist. Instead you must define
      your own space, somewhere in the GTT.
      
      The comments in the code define the layout I've opted for, which should
      be fairly future proof. Ie. I tried to define offsets in abstract terms
      (NUM_RINGS, seqno size, etc).
      
      NOTE: If one wanted to move this to the HWSP they could. I've decided
      one 4k object would be easier to deal with, and provide potential wins
      with cache locality, but that's all speculative.
      
      v2: Update the macro to not need the other ring's ring->id (Chris)
      Update the comment to use the correct formula (Chris)
      
      v3: Move the macros the ringbuffer.h to prevent churn in next patch
      (Ville)
      
      v4: Fixed compilation rebase conflict
      commit 1ec9e26d
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Fri Feb 14 14:01:11 2014 +0100
      
          drm/i915: Consolidate binding parameters into flags
      
      v5: VCS2 rebase
      Replace hweight_long with hweight32
      
      v6 (Rodrigo): * Add missed VC2 gen8 ring signal init
         	      * fixing conflicst on rebase
          	      * minor fixes on address table
      	      * remove WARN_ON
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      [danvet: s/BUG_ON/WARN_ON/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3e78998a
  5. 07 7月, 2014 1 次提交
  6. 18 6月, 2014 1 次提交
  7. 17 6月, 2014 1 次提交
  8. 13 6月, 2014 2 次提交
  9. 11 6月, 2014 9 次提交
  10. 05 6月, 2014 2 次提交
  11. 22 5月, 2014 2 次提交
  12. 21 5月, 2014 1 次提交
    • V
      drm/i915: Fix mmio vs. CS flip race on ILK+ · 75f7f3ec
      Ville Syrjälä 提交于
      Starting from ILK, mmio flips also cause a flip done interrupt to be
      signalled. This means if we first do a set_base and follow it
      immediately with the CS flip, we might mistake the flip done interrupt
      caused by the set_base as the flip done interrupt caused by the CS
      flip.
      
      The hardware has a flip counter which increments every time a mmio or
      CS flip is issued. It basically counts the number of DSPSURF register
      writes. This means we can sample the counter before we put the CS
      flip into the ring, and then when we get a flip done interrupt we can
      check whether the CS flip has actually performed the surface address
      update, or if the interrupt was caused by a previous but yet
      unfinished mmio flip.
      
      Even with the flip counter we still have a race condition of the CS flip
      base address update happens after the mmio flip done interrupt was
      raised but not yet processed by the driver. When the interrupt is
      eventually processed, the flip counter will already indicate that the
      CS flip has been executed, but it would not actually complete until the
      next start of vblank. We can use the DSPSURFLIVE register to check
      whether the hardware is actually scanning out of the buffer we expect,
      or if we managed hit this race window.
      
      This covers all the cases where the CS flip actually changes the base
      address. If the base address remains unchanged, we might still complete
      the CS flip before it has actually completed. But since the address
      didn't change anyway, the premature flip completion can't result in
      userspace overwriting data that's still being scanned out.
      
      CTG already has the flip counter and DSPSURFLIVE registers, and
      although the flip done interrupt is still limited to CS flips alone,
      the code now also checks the flip counter on CTG as well.
      
      v2: s/dspsurf/gtt_offset/ (Chris)
      
      Testcase: igt/kms_mmio_vs_cs_flip/setcrtc_vs_cs_flip
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73027Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Add g4x_ prefix to flip_count_after_eq.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      75f7f3ec
  13. 20 5月, 2014 12 次提交
  14. 19 5月, 2014 2 次提交