1. 16 5月, 2014 3 次提交
  2. 14 5月, 2014 2 次提交
  3. 13 5月, 2014 11 次提交
  4. 06 5月, 2014 2 次提交
    • V
      drm/i915: Remove useless checks from primary enable/disable · 10efa932
      Ville Syrjälä 提交于
      We won't be calling intel_enable_primary_plane() or
      intel_disable_primary_plane() with the primary plane in the
      wrong state. So remove the useless DISPLAY_PLANE_ENABLE checks.
      
      v2: Convert the checks to WARNs instead (Daniel,Paulo)
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      10efa932
    • V
      drm/i915: Make sprite updates atomic · 8d7849db
      Ville Syrjälä 提交于
      Add a mechanism by which we can evade the leading edge of vblank. This
      guarantees that no two sprite register writes will straddle on either
      side of the vblank start, and that means all the writes will be latched
      together in one atomic operation.
      
      We do the vblank evade by checking the scanline counter, and if it's too
      close to the start of vblank (too close has been hardcoded to 100usec
      for now), we will wait for the vblank start to pass. In order to
      eliminate random delayes from the rest of the system, we operate with
      interrupts disabled, except when waiting for the vblank obviously.
      
      Note that we now go digging through pipe_to_crtc_mapping[] in the
      vblank interrupt handler, which is a bit dangerous since we set up
      interrupts before the crtcs. However in this case since it's the vblank
      interrupt, we don't actually unmask it until some piece of code
      requests it.
      
      v2: preempt_check_resched() calls after local_irq_enable() (Jesse)
          Hook up the vblank irq stuff on BDW as well
      v3: Pass intel_crtc instead of drm_crtc (Daniel)
          Warn if crtc.mutex isn't locked (Daniel)
          Add an explicit compiler barrier and document the barriers (Daniel)
          Note the irq vs. modeset setup madness in the commit message (Daniel)
      v4: Use prepare_to_wait() & co. directly and eliminate vbl_received
      v5: Refactor intel_pipe_handle_vblank() vs. drm_handle_vblank() (Chris)
          Check for min/max scanline <= 0 (Chris)
          Don't call intel_pipe_update_end() if start failed totally (Chris)
          Check that the vblank counters match on both sides of the critical
          section (Chris)
      v6: Fix atomic update for interlaced modes
      v7: Reorder code for better readability (Chris)
      v8: Drop preempt_check_resched(). It's not available to modules
          anymore and isn't even needed unless we ourselves cause
          a wakeup needing reschedule while interrupts are off
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NSourab Gupta <sourabgupta@gmail.com>
      Reviewed-by: NAkash Goel <akash.goels@gmail.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8d7849db
  5. 05 5月, 2014 8 次提交
    • D
      drm/i915: Make encoder->mode_set callbacks optional · 0d56bf0b
      Daniel Vetter 提交于
      For a bunch of reasons we want to move away from the ->mode_set
      callbacks: All hw state setup needs to move into ->enable hooks (so
      that DOMS can do runtime pm) and all the configuration setup needs to
      move into the compute_config functions.
      
      To start with this make the enocer->mode_set callback optional.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0d56bf0b
    • V
      drm/i915: Make primary_enabled match the actual hardware state · 98ec7739
      Ville Syrjälä 提交于
      The BIOS can enable a pipe but leave the primary plane disabled. This
      coflicts with out current idea of primary_enabled. Read the actual
      hardware plane state and set primary_enabled appropriately.
      
      We currently assume that primary_enabled is always true when we're about
      to disable a crtc. That needs to change now as the plane may not be
      enabled. So replace the relevant WARNs with early returns in
      intel_{enable,disable}_primary_hw_plane().
      
      Fixes the following warning
      [    3.831602] WARNING: CPU: 0 PID: 1112 at linux/drivers/gpu/drm/i915/intel_display.c:1918 intel_disable_primary_hw_plane+0xe4/0xf0 [i915]()
      
      which got introduced here by me:
       commit e9e39655c0c30cddc3f8c09a757678a24dd36737
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Mon Apr 28 15:53:25 2014 +0300
      
          drm/i915: Remove useless checks from primary enable/disable
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      98ec7739
    • V
      drm/i915: Fix assert_plane warning during FDI link train · 1c8562f6
      Ville Syrjälä 提交于
      assert_plane_enabled() is now triggering during FDI link train because
      we no longer enable planes that early.
      
      This problem got introduced in:
       commit a5c4d7bc
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Fri Mar 7 18:32:13 2014 +0200
      
          drm/i915: Disable/enable planes as the first/last thing during modeset on ILK+
      
      Just drop the assert since we shouldn't need planes for link training.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Squash in fixup for now unused plane local variable, reported
      by 0-day tester.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1c8562f6
    • V
      drm/i915: Fix deadlock during driver init on ILK · 8a6543ba
      Ville Syrjälä 提交于
      We have a struct_mutex deadlock during driver init on ILK
      
      [   54.320273] =============================================
      [   54.320371] [ INFO: possible recursive locking detected ]
      [   54.320471] 3.15.0-rc2-flip_race+ #2 Not tainted
      [   54.320567] ---------------------------------------------
      [   54.320665] modprobe/2178 is trying to acquire lock:
      [   54.320762]  (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa0568b05>] intel_enable_gt_powersave+0xa5/0x9d0 [i915]
      [   54.321111]
      [   54.321111] but task is already holding lock:
      [   54.321250]  (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa05b4c2e>] intel_modeset_init_hw+0x3e/0x60 [i915]
      [   54.321583]
      [   54.321583] other info that might help us debug this:
      [   54.321724]  Possible unsafe locking scenario:
      [   54.321724]
      [   54.321863]        CPU0
      [   54.321954]        ----
      [   54.322046]   lock(&dev->struct_mutex);
      [   54.322221]   lock(&dev->struct_mutex);
      [   54.322397]
      [   54.322397]  *** DEADLOCK ***
      [   54.322397]
      [   54.322638]  May be due to missing lock nesting notation
      [   54.322638]
      [   54.322781] 4 locks held by modprobe/2178:
      [   54.322875]  #0:  (&dev->mutex){......}, at: [<ffffffff813592eb>] __driver_attach+0x5b/0xb0
      [   54.323230]  #1:  (&dev->mutex){......}, at: [<ffffffff813592f9>] __driver_attach+0x69/0xb0
      [   54.323582]  #2:  (drm_global_mutex){+.+.+.}, at: [<ffffffffa04e1e0d>] drm_dev_register+0x2d/0x120 [drm]
      [   54.323945]  #3:  (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa05b4c2e>] intel_modeset_init_hw+0x3e/0x60 [i915]
      
      This regression got introduced in:
       commit 586d5270b60dc1f35cc3ca982d403765bad77965
       Author: Imre Deak <imre.deak@intel.com>
       Date:   Mon Apr 14 20:24:28 2014 +0300
      
          drm/i915: move getting struct_mutex lower in the callstack during GPU reset
      
      Fix the problem by not taking struct_mutex around intel_enable_gt_powersave()
      in intel_modeset_init_hw() since intel_enable_gt_powersave() now grabs the
      mutex itself.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8a6543ba
    • I
      drm/i915: make runtime PM swizzling/ring_freq init platform independent · 92b806d3
      Imre Deak 提交于
      We need to re-init sizzling on all platforms so move it to the
      platform independent runtime resume callback. The ring frequency reinit
      is also needed everywhere except on VLV, but gen6_update_ring_freq()
      will be a noop on VLV, so we can move this function too to platform
      independent code.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      92b806d3
    • I
      drm/i915: factor out gen6_update_ring_freq · c2bc2fc5
      Imre Deak 提交于
      This is needed by the next patch moving the call out from platform
      specific RPM callbacks to platform independent code.
      
      No functional change.
      
      v2:
      - patch introduce in v2 of the patchset
      v3:
      - simplify platform check condition (Ville)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c2bc2fc5
    • I
      drm/i915: make runtime PM interrupt enable/disable platform independent · b5478bcd
      Imre Deak 提交于
      We need to disable the interrupts for all platforms, so make the helpers
      for this platform independent and call them from them platform
      independent runtime suspend/resume callbacks.
      
      On HSW/BDW this will move interrupt disabling/re-enabling at the
      beginning/end of runtime suspend/resume respectively, but I don't see
      any reason why this would cause a problem there. In any case this seems
      to be the correct thing to do even on those platforms.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b5478bcd
    • I
      drm/i915: add missing error capturing of the PIPESTAT reg · f301b1e1
      Imre Deak 提交于
      While checking the error capture path I noticed that we lacked the
      power domain-on check for PIPESTAT so fix this by moving that to where
      the rest of pipe registers are captured.
      
      The move also revealed that we actually don't include this register in
      the error report, so fix that too.
      
      v2:
      - patch introduced in v2 of the patchset
      v3:
      - add back !HAS_PCH_SPLIT check (Ville)
      [ Ignore my previous comment about the gen<=5 || vlv check, I realized
        that it's the same as !HAS_PCH_SPLIT. ]
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f301b1e1
  6. 23 4月, 2014 1 次提交
  7. 17 4月, 2014 1 次提交
  8. 16 4月, 2014 2 次提交
  9. 11 4月, 2014 1 次提交
  10. 09 4月, 2014 3 次提交
  11. 03 4月, 2014 1 次提交
  12. 02 4月, 2014 5 次提交