1. 19 9月, 2014 3 次提交
  2. 10 9月, 2014 1 次提交
  3. 03 9月, 2014 4 次提交
  4. 26 8月, 2014 1 次提交
  5. 20 8月, 2014 1 次提交
  6. 18 8月, 2014 2 次提交
    • I
      drm/i915: make sure VDD is turned off during system suspend · 07f9cd0b
      Imre Deak 提交于
      Atm we may leave eDP VDD enabled during system suspend after the CRTCs
      are disabled through an HPD->DPCD read event. So disable VDD during
      suspend at a point when no HPDs can occur.
      
      Note that runtime suspend doesn't have the same problem, since there the
      RPM ref held by VDD provides already the needed serialization.
      
      v2:
      - add note to commit message about the runtime suspend path (Ville)
      - use edp_panel_vdd_off_sync(), so we can keep the WARN in
        edp_panel_vdd_off() (Ville)
      v3:
      - rebased on -fixes (for_each_intel_encoder()->list_for_each_entry())
        (Imre)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v2)
      Cc: stable@vger.kernel.org (3.16+)
      [Jani: fix sparse warning reported by Fengguang Wu]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      07f9cd0b
    • I
      drm/i915: cancel hotplug and dig_port work during suspend and unload · 1d0d343a
      Imre Deak 提交于
      Make sure these work handlers don't run after we system suspend or
      unload the driver. Note that we don't cancel the handlers during runtime
      suspend. That could lead to a lockup, since we take a runtime PM ref
      from the handlers themselves. Fortunaltely canceling there is not needed
      since the RPM ref itself provides for the needed serialization.
      
      v2:
      - fix the order of canceling dig_port_work wrt. hotplug_work (Ville)
      - zero out {long,short}_hpd_port_mask and hpd_event_bits for speed
        (Ville)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: stable@vger.kernel.org (3.16+)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      1d0d343a
  7. 14 8月, 2014 2 次提交
    • S
      drm/i915: Sharing platform specific sequence between runtime and system suspend/ resume paths · 016970be
      Sagar Kamble 提交于
      On VLV, post S0i3 during i915_drm_thaw following issue is observed during ring
      initialization.
      
      [ 335.604039] [drm:stop_ring] ERROR render ring :timed out trying to stop ring
      [ 336.607340] [drm:stop_ring] ERROR render ring :timed out trying to stop ring
      [ 336.607345] [drm:init_ring_common] ERROR failed to set render ring head to zero ctl 00000000 head 00000000 tail 00000000 start 00000000
      [ 337.610645] [drm:stop_ring] ERROR bsd ring :timed out trying to stop ring
      [ 338.613952] [drm:stop_ring] ERROR bsd ring :timed out trying to stop ring
      [ 338.613956] [drm:init_ring_common] ERROR failed to set bsd ring head to zero ctl 00000000 head 00000000 tail 00000000 start 00000000
      [ 339.617256] [drm:stop_ring] ERROR render ring :timed out trying to stop ring
      [ 339.617258] -----------[ cut here ]-----------
      [ 339.617267] WARNING: CPU: 0 PID: 6 at drivers/gpu/drm/i915/intel_ringbuffer.c:1666 intel_cleanup_ring+0xe6/0xf0()
      [ 339.617396] --[ end trace 5ef5ed1a3c92e2a6 ]--
      [ 339.617428] [drm:__i915_drm_thaw] ERROR failed to re-initialize GPU, declaring wedged!
      
      This is happening since wake is not enabled and Gunit registers are not restored.
      For this system suspend/resume paths need to follow save/restore and additional
      platform specific setup in suspend_complete and resume_prepare.
      
      suspend_complete is shared unconditionaly for VLV, HSW, BDW. resume_prepare for
      HSW and BDW has pc8 disabling which is needed during thaw_early so sharing
      uncondtionally. For VLV and SNB runtime resume specific sequence exists.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Goel, Akash <akash.goel@intel.com>
      Signed-off-by: NSagar Kamble <sagar.a.kamble@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      016970be
    • S
      drm/i915: Created common handler for platform specific suspend/resume · ebc32824
      Sagar Kamble 提交于
      With this change, intel_runtime_suspend and intel_runtime_resume functions
      become completely platform agnostic. Platform specific suspend/resume
      changes are moved to intel_suspend_complete and intel_resume_prepare.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Goel, Akash <akash.goel@intel.com>
      Signed-off-by: NSagar Kamble <sagar.a.kamble@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ebc32824
  8. 13 8月, 2014 1 次提交
    • C
      drm/i915: Localise the fbdev console lock frobbing · 82e3b8c1
      Chris Wilson 提交于
      Rather than take and release the console_lock() around a non-existent
      DRM_I915_FBDEV, move the lock acquisation into the callee where it will
      be compiled out by the config option entirely. This includes moving the
      deferred fb_set_suspend() dance and encapsulating it entirely within
      intel_fbdev.c.
      
      v2: Use an integral work item so that we can explicitly flush the work
      upon suspend/unload.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      [danvet: Add the flush_work in fbdev_fini per the mailing list
      discussion. And s/BUG_ON/WARN_ON/ because.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      82e3b8c1
  9. 08 8月, 2014 1 次提交
    • R
      Revert "drm/i915: Enable semaphores on BDW" · be71eabe
      Rodrigo Vivi 提交于
      This reverts commit 521e62e4.
      
      Although POST_SYNC brought a bit of stability to Semaphores on BDW
      it didn't solved all issues and some hungs can still occour when
      semaphores are enabled on BDW. Also some sloweness can be found on some
      igt tests, althoguth it apparently doesn't affect real workloads.
      
      Besides that, no real performance gain was found on our tests with different
      and even multiple workloads.
      
      Let's disable it again for now. At least until we are sure it is safe
      to re-enable it.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      be71eabe
  10. 24 7月, 2014 1 次提交
  11. 23 7月, 2014 2 次提交
  12. 22 7月, 2014 1 次提交
    • D
      drm/i915: add DP 1.2 MST support (v0.7) · 0e32b39c
      Dave Airlie 提交于
      This adds DP 1.2 MST support on Haswell systems.
      
      Notes:
      a) this reworks irq handling for DP MST ports, so that we can
      avoid the mode config locking in the current hpd handlers, as
      we need to process up/down msgs at a better time.
      
      Changes since v0.1:
      use PORT_PCH_HOTPLUG to detect short vs long pulses
      add a workqueue to deal with digital events as they can get blocked on the
      main workqueue beyong mode_config mutex
      fix a bunch of modeset checker warnings
      acks irqs in the driver
      cleanup the MST encoders
      
      Changes since v0.2:
      check irq status again in work handler
      move around bring up and tear down to fix DPMS on/off
      use path properties.
      
      Changes since v0.3:
      updates for mst apis
      more state checker fixes
      irq handling improvements
      fbcon handling support
      improved reference counting of link - fixes redocking.
      
      Changes since v0.4:
      handle gpu reset hpd reinit without oopsing
      check link status on HPD irqs
      fix suspend/resume
      
      Changes since v0.5:
      use proper functions to get max link/lane counts
      fix another checker backtrace - due to connectors disappearing.
      set output type in more places fro, unknown->displayport
      don't talk to devices if no HPD asserted
      check mst on short irqs only
      check link status properly
      rebase onto prepping irq changes.
      drop unsued force_act
      
      Changes since v0.6:
      cleanup unused struct entry.
      
      [airlied: fix some sparse warnings].
      Reviewed-by: NTodd Previte <tprevite@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0e32b39c
  13. 08 7月, 2014 3 次提交
    • I
      drm/i915: make system freeze support depend on CONFIG_ACPI_SLEEP · 95fa2eee
      Imre Deak 提交于
      To achieve further power savings during system freeze (aka connected
      standby, or s0ix) we have to send a PCI_D1 opregion notification. As
      the information about the state we're entering (system freeze,
      suspend to ram or suspend to disk) is only available through the ACPI
      subsystem, make this support depend on the relevant kconfig option.
      Things will still work if this option isn't set, albeit with less than
      optimial power saving.
      
      This also fixes a compile breakage when the option is not set introduced
      in
      
      commit e5747e3a
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Thu Jun 12 08:35:47 2014 -0700
      
          drm/i915: send proper opregion notifications on suspend/resume
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      95fa2eee
    • D
      drm/fb-helper: Fix hpd vs. initial config races · 50c3dc97
      Daniel Vetter 提交于
      Some drivers need to be able to have a perfect race-free fbcon setup.
      Current drivers only enable hotplug processing after the call to
      drm_fb_helper_initial_config which leaves a tiny but important race.
      
      This race is especially noticable on embedded platforms where the
      driver itself enables the voltage for the hdmi output, since only then
      will monitors (after a bit of delay, as usual) respond by asserting
      the hpd pin.
      
      Most of the infrastructure is already there with the split-out
      drm_fb_helper_init. And drm_fb_helper_initial_config already has all
      the required locking to handle concurrent hpd events since
      
      commit 53f1904b
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Mar 20 14:26:35 2014 +0100
      
          drm/fb-helper: improve drm_fb_helper_initial_config locking
      
      The only missing bit is making drm_fb_helper_hotplug_event save
      against concurrent calls of drm_fb_helper_initial_config. The only
      unprotected bit is the check for fb_helper->fb.
      
      With that drivers can first initialize the fb helper, then enabel
      hotplug processing and then set up the initial config all in a
      completely race-free manner. Update kerneldoc and convert i915 as a
      proof of concept.
      
      Feature requested by Thierry since his tegra driver atm reliably boots
      slowly enough to misses the hotplug event for an external hdmi screen,
      but also reliably boots to quickly for the hpd pin to be asserted when
      the fb helper calls into the hdmi ->detect function.
      
      Cc: Thierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      50c3dc97
    • R
      drm/i915: Enable semaphores on BDW · 521e62e4
      Rodrigo Vivi 提交于
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      521e62e4
  14. 01 7月, 2014 1 次提交
    • P
      drm/i915: flush delayed_resume_work when suspending · 84a2ab8e
      Paulo Zanoni 提交于
      It is possible that, by the time we run i915_drm_freeze(),
      delayed_resume_work was already queued but did not run yet. If it
      still didn't run after intel_runtime_pm_disable_interrupts(), by the
      time it runs it will try to change the interrupt registers with the
      interrupts already disabled, which will trigger a WARN. We can
      reliably reproduce this with the pm_rpm system-suspend test case.
      
      In order to avoid the problem, we have to flush the work before
      disabling the interrupts. We could also cancel the work instead of
      flushing it, but that would require us to put a runtime PM reference -
      and any other resource we may need in the future - in case the work
      was already queued, so I believe flushing the work is more
      future-proof, although less efficient. But I can also change this part
      if someone requests.
      
      Another thing I tried was to move the intel_suspend_gt_powersave()
      call to before intel_runtime_pm_disable_interrupts(), but since that
      function needs to be called after the interrupts are already disabled,
      due to dev_priv->rps.work, this strategy didn't work.
      
      Testcase: igt/pm_rpm/system-suspend
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80517Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      84a2ab8e
  15. 20 6月, 2014 2 次提交
  16. 13 6月, 2014 3 次提交
  17. 12 6月, 2014 2 次提交
  18. 11 6月, 2014 1 次提交
  19. 05 6月, 2014 3 次提交
    • R
      drm/i915: BDW: Adding missing cursor offsets. · 15d24aa5
      Rodrigo Vivi 提交于
      BDW uses IVB cursor offsets.
      
      Whithout this patch it is not possible to use multiple outputs with cursor
      on BDW.
      The cursor gets completely crazy because update position uses the wrong
      cursor register for the second pipe.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79621Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15d24aa5
    • J
      drm/i915: tell the user if both KMS and UMS are disabled · c9cd7b65
      Jani Nikula 提交于
      If both KMS is disabled (by i915.modeset=0 or nomodeset parameters) and
      UMS is disabled (by CONFIG_DRM_I915_UMS=n, the default), the user might
      not be aware his setup is not supported. Inform the users (and, by
      extension, the poor i915 developers having to read their dmesgs in bug
      reports) why their graphics experience might be lacking.
      
      A similar message was added on the UMS path in
      commit e147accb
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Thu Oct 10 15:25:37 2013 +0300
      
          drm/i915: tell the user KMS is required for gen6+
      
      but it won't be reached if CONFIG_DRM_I915_UMS=n since
      commit b30324ad
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Wed Nov 13 22:11:25 2013 +0100
      
          drm/i915: Deprecated UMS support
      
      v2: Use DRM_DEBUG_DRIVER.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9cd7b65
    • D
      drm/i915: Improve irq handling after gpu resets · 78ad455f
      Daniel Vetter 提交于
      Currently we do a full re-init of all interrupts after a gpu hang.
      Which is pretty bad since we don't restore the interrupts we've
      enabled at runtime correctly. Even with that addressed it's rather
      horribly race.
      
      But on g4x and later we only reset the gt and not the entire gpu.
      Which means we only need to reset the GT interrupt bits. Which has the
      nice benefit that vblank waits, pipe CRC interrupts and everything
      else display related just keeps on working.
      
      The downside is that gt interrupt handling (i.e. ring->get/put_irq) is
      still racy. But as long as the gpu hang reliably wakes all waters and
      we have a short time where the refcount drops to 0 we'll recover. So
      not that bad really.
      
      v2: Ville noticed that GTIMR and PMIMR don't get cleared, only the
      subordinate per-ring registers. So let's rip out all the interrupt dancing.
      The FIXME comment is still required though since the ring irq handling
      happens at the per-ring interrupt mask registers, too.
      
      Testcase: igt/kms_flip/vblank-vs-hang
      Testcase: igt/kms_pipe_crc_basic/hang-*
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      78ad455f
  20. 04 6月, 2014 1 次提交
    • D
      drm: Split connection_mutex out of mode_config.mutex (v3) · 6e9f798d
      Daniel Vetter 提交于
      After the split-out of crtc locks from the big mode_config.mutex
      there's still two major areas it protects:
      - Various connector probe states, like connector->status, EDID
        properties, probed mode lists and similar information.
      - The links from connector->encoder and encoder->crtc and other
        modeset-relevant connector state (e.g. properties which control the
        panel fitter).
      
      The later is used by modeset operations. But they don't really care
      about the former since it's allowed to e.g. enable a disconnected VGA
      output or with a mode not in the probed list.
      
      Thus far this hasn't been a problem, but for the atomic modeset
      conversion Rob Clark needs to convert all modeset relevant locks into
      w/w locks. This is required because the order of acquisition is
      determined by how userspace supplies the atomic modeset data. This has
      run into troubles in the detect path since the i915 load detect code
      needs _both_ protections offered by the mode_config.mutex: It updates
      probe state and it needs to change the modeset configuration to enable
      the temporary load detect pipe.
      
      The big deal here is that for the probe/detect users of this lock a
      plain mutex fits best, but for atomic modesets we really want a w/w
      mutex. To fix this lets split out a new connection_mutex lock for the
      modeset relevant parts.
      
      For simplicity I've decided to only add one additional lock for all
      connector/encoder links and modeset configuration states. We have
      piles of different modeset objects in addition to those (like bridges
      or panels), so adding per-object locks would be much more effort.
      
      Also, we're guaranteed (at least for now) to do a full modeset if we
      need to acquire this lock. Which means that fine-grained locking is
      fairly irrelevant compared to the amount of time the full modeset will
      take.
      
      I've done a full audit, and there's just a few things that justify
      special focus:
      - Locking in drm_sysfs.c is almost completely absent. We should
        sprinkle mode_config.connection_mutex over this file a bit, but
        since it already lacks mode_config.mutex this patch wont make the
        situation any worse. This is material for a follow-up patch.
      
      - omap has a omap_framebuffer_flush function which walks the
        connector->encoder->crtc links and is called from many contexts.
        Some look like they don't acquire mode_config.mutex, so this is
        already racy. Again fixing this is material for a separate patch.
      
      - The radeon hot_plug function to retrain DP links looks at
        connector->dpms. Currently this happens without any locking, so is
        already racy. I think radeon_hotplug_work_func should gain
        mutex_lock/unlock calls for the mode_config.connection_mutex.
      
      - Same applies to i915's intel_dp_hot_plug. But again, this is already
        racy.
      
      - i915 load_detect code needs to acquire this lock. Which means the
        w/w dance due to Rob's work will be nicely contained to _just_ this
        function.
      
      I've added fixme comments everywhere where it looks suspicious but in
      the sysfs code. After a quick irc discussion with Dave Airlie it
      sounds like the lack of locking in there is due to sysfs cleanup fun
      at module unload.
      
      v1: original (only compile tested)
      
      v2: missing mutex_init(), etc (from Rob Clark)
      
      v3: i915 needs more care in the conversion:
      - Protect the edp pp logic with the connection_mutex.
      - Use connection_mutex in the backlight code due to
        get_pipe_from_connector.
      - Use drm_modeset_lock_all in suspend/resume paths.
      - Update lock checks in the overlay code.
      
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      6e9f798d
  21. 23 5月, 2014 2 次提交
    • I
      drm/i915: disable GT power saving early during system suspend · fe5b1886
      Imre Deak 提交于
      Atm, we disable GT power saving during the end of the suspend sequence
      in i915_save_state(). Doing the disabling at that point seems arbitrary.
      One reason to disable it early though is to have a quiescent HW state
      before we do anything else (for example save registers). So move the
      disabling earlier, which also takes care canceling of the deferred RPS
      enabling work done by intel_disable_gt_powersave().
      
      Note that after the move we'll call intel_disable_gt_powersave() only
      in case modeset is enabled, but that's anyway the only case where we
      have it enabled in the first place.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRobert Beckett <robert.beckett@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fe5b1886
    • I
      drm/i915: remove user GTT mappings early during runtime suspend · d6102977
      Imre Deak 提交于
      Currently user space can access GEM buffers mapped to GTT through
      existing mappings concurrently while the platform specific suspend
      handlers are running. Since these handlers may change the HW state in a
      way that would break such accesses, remove the mappings before calling
      the handlers. Spotted by Ville.
      
      Also Chris pointed out that the lists that i915_gem_release_all_mmaps()
      walks through need dev->struct_mutex, so take this lock. There is a
      potential deadlock against a concurrent RPM resume, resolve this by
      aborting and rescheduling the suspend (Daniel).
      
      v2:
      - take struct_mutex around i915_gem_release_all_mmaps() (Chris, Daniel)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRobert Beckett <robert.beckett@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d6102977
  22. 22 5月, 2014 1 次提交
  23. 21 5月, 2014 1 次提交