1. 09 Mar, 2016 4 commits
  2. 04 Mar, 2016 2 commits
  3. 03 Mar, 2016 2 commits
  4. 01 Mar, 2016 14 commits
  5. 29 Feb, 2016 1 commit
    • Matt Roper's avatar
      drm/i915: Add two-stage ILK-style watermark programming (v11) · ed4a6a7c
      Matt Roper authored
      
      In addition to calculating final watermarks, let's also pre-calculate a
      set of intermediate watermark values at atomic check time.  These
      intermediate watermarks are a combination of the watermarks for the old
      state and the new state; they should satisfy the requirements of both
      states which means they can be programmed immediately when we commit the
      atomic state (without waiting for a vblank).  Once the vblank does
      happen, we can then re-program watermarks to the more optimal final
      value.
      
      v2: Significant rebasing/rewriting.
      
      v3:
       - Move 'need_postvbl_update' flag to CRTC state (Daniel)
       - Don't forget to check intermediate watermark values for validity
         (Maarten)
       - Don't due async watermark optimization; just do it at the end of the
         atomic transaction, after waiting for vblanks.  We do want it to be
         async eventually, but adding that now will cause more trouble for
         Maarten's in-progress work.  (Maarten)
       - Don't allocate space in crtc_state for intermediate watermarks on
         platforms that don't need it (gen9+).
       - Move WaCxSRDisabledForSpriteScaling:ivb into intel_begin_crtc_commit
         now that ilk_update_wm is gone.
      
      v4:
       - Add a wm_mutex to cover updates to intel_crtc->active and the
         need_postvbl_update flag.  Since we don't have async yet it isn't
         terribly important yet, but might as well add it now.
       - Change interface to program watermarks.  Platforms will now expose
         .initial_watermarks() and .optimize_watermarks() functions to do
         watermark programming.  These should lock wm_mutex, copy the
         appropriate state values into intel_crtc->active, and then call
         the internal program watermarks function.
      
      v5:
       - Skip intermediate watermark calculation/check during initial hardware
         readout since we don't trust the existing HW values (and don't have
         valid values of our own yet).
       - Don't try to call .optimize_watermarks() on platforms that don't have
         atomic watermarks yet.  (Maarten)
      
      v6:
       - Rebase
      
      v7:
       - Further rebase
      
      v8:
       - A few minor indentation and line length fixes
      
      v9:
       - Yet another rebase since Maarten's patches reworked a bunch of the
         code (wm_pre, wm_post, etc.) that this was previously based on.
      
      v10:
       - Move wm_mutex to dev_priv to protect against racing commits against
         disjoint CRTC sets. (Maarten)
       - Drop unnecessary clearing of cstate->wm.need_postvbl_update (Maarten)
      
      v11:
       - Now that we've moved to atomic watermark updates, make sure we call
         the proper function to program watermarks in
         {ironlake,haswell}_crtc_enable(); the failure to do so on the
         previous patch iteration led to us not actually programming the
         watermarks before turning on the CRTC, which was the cause of the
         underruns that the CI system was seeing.
       - Fix inverted logic for determining when to optimize watermarks.  We
         were needlessly optimizing when the intermediate/optimal values were
         the same (harmless), but not actually optimizing when they differed
         (also harmless, but wasteful from a power/bandwidth perspective).
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1456276813-5689-1-git-send-email-matthew.d.roper@intel.com
      ed4a6a7c
  6. 25 Feb, 2016 4 commits
  7. 18 Feb, 2016 2 commits
  8. 17 Feb, 2016 4 commits
  9. 16 Feb, 2016 3 commits
    • Maarten Lankhorst's avatar
      drm/i915: Lock mode_config.mutex in intel_display_resume. · ea49c9ac
      Maarten Lankhorst authored
      Unfortunately i915 is still not fully atomic, and expects mode_config.mutex
      to be held during modeset until we finally fix it.
      
      This fixes the following WARN when resuming:
      
      [  425.208983] ------------[ cut here ]------------
      [  425.208990] WARNING: CPU: 0 PID: 6828 at drivers/gpu/drm/drm_edid.c:3555 drm_select_eld+0xa5/0xd0()
      [  425.209015] Modules linked in: pl2303 usbserial snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic intel_powerclamp coretemp i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep lpc_ich snd_hda_core snd_pcm i2c_hid i2c_designware_platform i2c_designware_core r8169 mii sdhci_acpi sdhci mmc_core
      [  425.209018] CPU: 0 PID: 6828 Comm: kworker/u4:5 Tainted: G     U  W       4.5.0-rc4-gfxbench+ #1
      [  425.209020] Hardware name: \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff/DN2820FYK, BIOS FYBYT10H.86A.0038.2014.0717.1455 07/17/2014
      [  425.209027] Workqueue: events_unbound async_run_entry_fn
      [  425.209032]  0000000000000000 ffff880072433958 ffffffff813f6b05 0000000000000000
      [  425.209036]  ffffffff81aaef2d ffff880072433990 ffffffff81078291 ffff880036b933d8
      [  425.209039]  ffff88006d528000 ffff88006d52b3d8 ffff88006d52b3d8 ffff88007315b6f8
      [  425.209040] Call Trace:
      [  425.209045]  [<ffffffff813f6b05>] dump_stack+0x67/0x92
      [  425.209049]  [<ffffffff81078291>] warn_slowpath_common+0x81/0xc0
      [  425.209052]  [<ffffffff81078385>] warn_slowpath_null+0x15/0x20
      [  425.209054]  [<ffffffff8151e195>] drm_select_eld+0xa5/0xd0
      [  425.209101]  [<ffffffffa01f34f4>] intel_audio_codec_enable+0x44/0x160 [i915]
      [  425.209135]  [<ffffffffa023eac7>] intel_enable_hdmi_audio+0x87/0x90 [i915]
      [  425.209169]  [<ffffffffa023eb5a>] g4x_enable_hdmi+0x8a/0xa0 [i915]
      [  425.209202]  [<ffffffffa023f41b>] vlv_hdmi_pre_enable+0x1cb/0x240 [i915]
      [  425.209236]  [<ffffffffa020edcf>] valleyview_crtc_enable+0x10f/0x290 [i915]
      [  425.209270]  [<ffffffffa020ba49>] intel_atomic_commit+0x769/0x17a0 [i915]
      [  425.209274]  [<ffffffff81526ad5>] ? drm_atomic_check_only+0x145/0x660
      [  425.209276]  [<ffffffff81527022>] drm_atomic_commit+0x32/0x50
      [  425.209310]  [<ffffffffa0215fa0>] intel_display_resume+0xa0/0x130 [i915]
      [  425.209338]  [<ffffffffa018c1bb>] i915_drm_resume+0xcb/0x160 [i915]
      [  425.209366]  [<ffffffffa018c272>] i915_pm_resume+0x22/0x30 [i915]
      [  425.209370]  [<ffffffff8143d91e>] pci_pm_resume+0x6e/0xe0
      [  425.209373]  [<ffffffff8143d8b0>] ? pci_pm_resume_noirq+0xa0/0xa0
      [  425.209375]  [<ffffffff815409ae>] dpm_run_callback+0x6e/0x280
      [  425.209378]  [<ffffffff815410b2>] device_resume+0x92/0x250
      [  425.209380]  [<ffffffff81541288>] async_resume+0x18/0x40
      [  425.209382]  [<ffffffff8109c7a5>] async_run_entry_fn+0x45/0x140
      [  425.209386]  [<ffffffff81093293>] process_one_work+0x1e3/0x620
      [  425.209388]  [<ffffffff810931f7>] ? process_one_work+0x147/0x620
      [  425.209391]  [<ffffffff81093719>] worker_thread+0x49/0x490
      [  425.209393]  [<ffffffff810936d0>] ? process_one_work+0x620/0x620
      [  425.209396]  [<ffffffff81099e0a>] kthread+0xea/0x100
      [  425.209400]  [<ffffffff81099d20>] ? kthread_create_on_node+0x1f0/0x1f0
      [  425.209404]  [<ffffffff817ba03f>] ret_from_fork+0x3f/0x70
      [  425.209407]  [<ffffffff81099d20>] ? kthread_create_on_node+0x1f0/0x1f0
      [  425.209409] ---[ end trace d1b247107f34a8b2 ]---
      
      Fixes: e2c8b870
      
       ("drm/i915: Use atomic helpers for suspend, v2.")
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1455632862-18557-1-git-send-email-maarten.lankhorst@linux.intel.com
      
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ea49c9ac
    • Maarten Lankhorst's avatar
      drm/i915: Fix some minor issues with atomic cdclk. · e8788cbc
      Maarten Lankhorst authored
      The check for active_crtcs == 0 was performed by the callers, when changing
      the patches I forgot to remove those hunks.
      
      This resulted in skylake scalers still not having the correct cdclk to
      calculate scaling when all crtc's were dpms off.
      
      Fixes: 1a617b77
      
       ("drm/i915: Keep track of the cdclk as if all crtc's were active.")
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1455614711-9045-1-git-send-email-maarten.lankhorst@linux.intel.com
      
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      e8788cbc
    • Maarten Lankhorst's avatar
      drm/i915: Use atomic helpers for suspend, v2. · e2c8b870
      Maarten Lankhorst authored
      
      Instead of duplicating the functionality now that we no longer need
      to preserve dpll state we can move to using the upstream suspend helper.
      
      Changes since v1:
      - Call hw readout with all mutexes held.
      - Rework intel_display_suspend to only assign modeset_restore_state
        on success.
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/56C2E686.5060803@linux.intel.com
      
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      e2c8b870
  10. 15 Feb, 2016 3 commits
  11. 09 Feb, 2016 1 commit