1. 11 12月, 2013 2 次提交
  2. 07 12月, 2013 1 次提交
    • P
      drm/i915: change CRTC assertion on LCPLL disable · 798183c5
      Paulo Zanoni 提交于
      Currently, PC8 is enabled at modeset_global_resources, which is called
      after intel_modeset_update_state. Due to this, there's a small race
      condition on the case where we start enabling PC8, then do a modeset
      while PC8 is still being enabled. The racing condition triggers a WARN
      because intel_modeset_update_state will mark the CRTC as enabled, then
      the thread that's still enabling PC8 might look at the data structure
      and think that PC8 is being enabled while a pipe is enabled. Despite
      the WARN, this is not really a bug since we'll wait for the
      PC8-enabling thread to finish when we call modeset_global_resources.
      
      The spec says the CRTC cannot be enabled when we disable LCPLL, so we
      had a check for crtc->base.enabled. If we change to crtc->active we
      will still prevent disabling LCPLL while the CRTC is enabled, and we
      will also prevent the WARN above.
      
      This is a replacement for the previous patch named
          "drm/i915: get/put PC8 when we get/put a CRTC"
      
      Testcase: igt/pm_pc8/modeset-lpsp-stress-no-wait
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      798183c5
  3. 04 12月, 2013 2 次提交
  4. 29 11月, 2013 1 次提交
  5. 28 11月, 2013 2 次提交
    • I
      drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx · ddf9c536
      Imre Deak 提交于
      Atm we call intel_display_power_enabled() from
      i915_capture_error_state() in IRQ context and then take a mutex. To fix
      this add a new intel_display_power_enabled_sw() which returns the domain
      state based on software tracking as opposed to reading the actual HW
      state.
      
      Since we use domain_use_count for this without locking on the reader
      side make sure we increase the counter only after enabling all required
      power wells and decrease it before disabling any of these power wells.
      
      Regression introduced in
      commit 1b02383464b4a915627ef3b8fd0ad7f07168c54c
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Tue Sep 24 16:17:09 2013 +0300
      
          drm/i915: support for multiple power wells
      
      Note that atm we depend on the value returned by
      intel_display_power_enabled_sw() in i915_capture_error_state() to avoid
      unclaimed register access reports. This was never guaranteed though,
      since another thread can disable the power concurrently. If this is a
      problem we need another explicit way to disable the reporting during
      error captures.
      
      v2:
      - remove barriers as the caller can't depend on the value
        returned from i915_capture_error_state_sw() anyway (Ville)
      - dump the state of pipe/transcoder power domain state (Daniel)
      Reported-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ddf9c536
    • D
      drm/i915: Add power well arguments to force wake routines. · c8d9a590
      Deepak S 提交于
      Added power well arguments to all the force wake routines
      to help us individually control power well based on the
      scenario.
      Signed-off-by: NDeepak S <deepak.s@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Resolve conflict with the removed forcewake hack and drop one
      spurious hunk Jesse noticed.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c8d9a590
  6. 27 11月, 2013 3 次提交
  7. 21 11月, 2013 1 次提交
  8. 19 11月, 2013 3 次提交
  9. 16 11月, 2013 1 次提交
    • D
      drm/i915: flush cursors harder · b2ea8ef5
      Daniel Vetter 提交于
      Apparently they need the same treatment as primary planes. This fixes
      modesetting failures because of stuck cursors (!) on Thomas' i830M
      machine.
      
      I've figured while at it I'll also roll it out for the ivb 3 pipe
      version of this function. I didn't do this for i845/i865 since Bspec
      says the update mechanism works differently, and there's some
      additional rules about what can be updated in which order.
      Tested-by: NThomas Richter <thor@math.tu-berlin.de>
      Cc: stable@vger.kernel.org
      Cc:  Thomas Richter <thor@math.tu-berlin.de>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2ea8ef5
  10. 14 11月, 2013 1 次提交
    • J
      drm/i915: remove QUIRK_NO_PCH_PWM_ENABLE · bc0bb9fd
      Jani Nikula 提交于
      The quirk was added as what I'd say was a stopgap measure in
      
      commit e85843be
      Author: Kamal Mostafa <kamal@canonical.com>
      Date:   Fri Jul 19 15:02:01 2013 -0700
      
          drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13 backlight
      
      without really digging into what was going on.
      
      Also, as mentioned in the related bug [1], having the quirk regressed
      some of the machines it was supposed to fix to begin with, and there
      were patches posted to disable the quirk on such machines [2]!
      
      The fact is, we do need the BLM_PCH_PWM_ENABLE bit set to have
      backlight. With the quirk, we've relied on BIOS to have set it, and our
      save/restore code to retain it. With the full backlight setup at enable,
      we have no place for things that rely on previous state.
      
      With the per platform hooks, we've also made a change in the PCH
      platform enable order: setting the backlight duty cycle between CPU and
      PCH PWM enable. Some experimenting and
      
      commit 770c1231
      Author: Takashi Iwai <tiwai@suse.de>
      Date:   Sat Aug 11 08:56:42 2012 +0200
      
          drm/i915: Fix blank panel at reopening lid
      
      indicate that we can't set the backlight before enabling CPU PWM; the
      value just won't stick. But AFAICT we should do it before enabling the
      PCH PWM.
      
      Finally, any fallout we should fix properly, preferrably without quirks,
      and absolutely without quirks that rely on existing state. With the per
      platform hooks have much more flexibility to adjust the sequence as
      required by platforms.
      
      [1] https://bugzilla.kernel.org/show_bug.cgi?id=47941
      [2] http://lkml.kernel.org/r/1378229848-29113-1-git-send-email-kamal@canonical.comSigned-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc0bb9fd
  11. 13 11月, 2013 2 次提交
  12. 11 11月, 2013 1 次提交
  13. 09 11月, 2013 8 次提交
  14. 08 11月, 2013 1 次提交
  15. 07 11月, 2013 2 次提交
  16. 06 11月, 2013 3 次提交
  17. 05 11月, 2013 1 次提交
  18. 02 11月, 2013 1 次提交
  19. 29 10月, 2013 2 次提交
    • D
      drm/i915: Fix the PPT fdi lane bifurcate state handling on ivb · 1fbc0d78
      Daniel Vetter 提交于
      Originally I've thought that this is leftover hw state dirt from the
      BIOS. But after way too much helpless flailing around on my part I've
      noticed that the actual bug is when we change the state of an already
      active pipe.
      
      For example when we change the fdi lines from 2 to 3 without switching
      off outputs in-between we'll never see the crucial on->off transition
      in the ->modeset_global_resources hook the current logic relies on.
      
      Patch version 2 got this right by instead also checking whether the
      pipe is indeed active. But that in turn broke things when pipes have
      been turned off through dpms since the bifurcate enabling is done in
      the ->crtc_mode_set callback.
      
      To address this issues discussed with Ville in the patch review move
      the setting of the bifurcate bit into the ->crtc_enable hook. That way
      we won't wreak havoc with this state when userspace puts all other
      outputs into dpms off state. This also moves us forward with our
      overall goal to unify the modeset and dpms on paths (which we need to
      have to allow runtime pm in the dpms off state).
      
      Unfortunately this requires us to move the bifurcate helpers around a
      bit.
      
      Also update the commit message, I've misanalyzed the bug rather badly.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70507Tested-by: NJan-Michael Brummer <jan.brummer@tabos.org>
      Cc: stable@vger.kernel.org
      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>
      1fbc0d78
    • V
      drm/i915: Clamp cursor coordinates to int16_t range · 92e76c8c
      Ville Syrjälä 提交于
      We store cursor_x/y as int16_t internally, but the user provided
      coordinates are int32_t. Clamp the coordinates so that they don't
      overflow the int16_t. Since the cursor is only 64x64 in size, the
      clamping can't cause any visual changes.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      92e76c8c
  20. 28 10月, 2013 2 次提交
    • V
      drm/i915: Add support for pipe_bpp readout · 4f56d12e
      Ville Syrjälä 提交于
      On CTG+ read out the pipe bpp setting from hardware and fill it into
      pipe config. Also check it appropriately.
      
      v2: Don't do the pipe_bpp extraction inside the PCH only code block on
          ILK+.
          Avoid the PIPECONF read as we already have read it for the
          PIPECONF_EANBLE check.
      
      Note: This is already in drm-intel-next-queued as
      commit 42571aef
      Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Date:   Fri Sep 6 23:29:00 2013 +0300
      
          drm/i915: Add support for pipe_bpp readout
      
      but is needed for the following bugfix.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4f56d12e
    • I
      drm/i915: use power get/put instead of set for power on after init · baa70707
      Imre Deak 提交于
      Currently we make sure that all power domains are enabled during driver
      init and turn off unneded ones only after the first modeset. Similarly
      during suspend we enable all power domains, which will remain on through
      the following resume until the first modeset.
      
      This logic is supported by intel_set_power_well() in the power domain
      framework. It would be nice to simplify the API, so that we only have
      get/put functions and make it more explicit on the higher level how this
      "power well on during init" logic works. This will make it also easier
      if in the future we want to shorten the time the power wells are on.
      
      For this add a new device private flag tracking whether we have the
      power wells on because of init/suspend and use only
      intel_display_power_get()/put(). As nothing else uses
      intel_set_power_well() we can remove it.
      
      This also fixes
      
      commit 6efdf354
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Wed Oct 16 17:25:52 2013 +0300
      
          drm/i915: enable only the needed power domains during modeset
      
      where removing intel_set_power_well() resulted in not releasing the
      reference on the power well that was taken during init and thus leaving
      the power well on all the time. Regression reported by Paulo.
      
      v2:
      - move the init_power_on flag to the power_domains struct (Daniel)
      
      v3:
      - add note about this being a regression fix too (Paulo)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      baa70707