1. 22 11月, 2012 2 次提交
    • C
      drm/i915: Flush outstanding unpin tasks before pageflipping · b4a98e57
      Chris Wilson 提交于
      If we accumulate unpin tasks because we are pageflipping faster than the
      system can schedule its workers, we can effectively create a
      pin-leak. The solution taken here is to limit the number of unpin tasks
      we have per-crtc and to flush those outstanding tasks if we accumulate
      too many. This should prevent any jitter in the normal case, and also
      prevent the hang if we should run too fast.
      
      Note: It is important that we switch from the system workqueue to our
      own dev_priv->wq since all work items on that queue are guaranteed to
      only need the dev->struct_mutex and not any modeset resources. For
      otherwise if we have a work item ahead in the queue which needs the
      modeset lock (like the output detect work used by both polling or
      hpd), this work and so the unpin work will never execute since the
      pageflip code already holds that lock. Unfortunately there's no
      lockdep support for this scenario in the workqueue code.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46991Reported-and-tested-by: NTvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Added note about workqueu deadlock.]
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56337Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b4a98e57
    • D
      drm/i915: drop buggy write to FDI_RX_CHICKEN register · 607a6f7a
      Daniel Vetter 提交于
      Jani Nikula noticed that the parentheses are wrong and we & the bit
      with the register address instead of the read-back value. He sent a
      patch to correct that.
      
      On second look, we write the same register in the previous line, and
      the w/a seems to be to set FDI_RX_PHASE_SYNC_POINTER_OVR to enable the
      logic, then keep always set FDI_RX_PHASE_SYNC_POINTER_OVR and toggle
      FDI_RX_PHASE_SYNC_POINTER_EN before/after enabling the pc transcoder.
      
      So the right things seems to be to simply kill the 2nd write.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Dropped a bogus ~ from the commit message that somehow crept
      in.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      607a6f7a
  2. 12 11月, 2012 38 次提交