1. 25 1月, 2014 4 次提交
    • D
      drm/i915: drop ironlake_ prefix from edp panel/backlight functions · 4be73780
      Daniel Vetter 提交于
      They now also work on vlv, which has the regs somewhere else. And
      daring a glance into the looking glass it seems like this
      functionality will continue to work the same for the next few hardware
      platforms.
      
      So it's better to just remove that misleading prefix and have a bit
      shorter code for better readability.
      
      The only exceptions are the panel/backlight functions shared with
      intel_ddi.c, those get an intel_ prefix.
      
      While at it make the vdd_on/off functions static.
      
      And one straggler was missing the edp_ in the name, so make everything
      neatly OCD.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4be73780
    • P
      drm/i915: save some time when waiting the eDP timings · dce56b3c
      Paulo Zanoni 提交于
      The eDP spec defines some points where after you do action A, you have
      to wait some time before action B. The thing is that in our driver
      action B does not happen exactly after action A, but we still use
      msleep() calls directly. What this patch does is that we record the
      timestamp of when action A happened, then, just before action B, we
      look at how much time has passed and only sleep the remaining amount
      needed.
      
      With this change, I am able to save about 5-20ms (out of the total
      200ms) of the backlight_off delay and completely skip the 1ms
      backlight_on delay. The 600ms vdd_off delay doesn't happen during
      normal usage anymore due to a previous patch.
      
      v2: - Rename ironlake_wait_jiffies_delay to intel_wait_until_after and
            move it to intel_display.c
          - Fix the msleep call: diff is in jiffies
      v3: - Use "tmp_jiffies" so we don't need to worry about the value of
            "jiffies" advancing while we're doing the math.
      v4: - Rename function again.
          - Move function to i915_drv.h.
          - Store last_power_cycle at edp_panel_off too.
          - Use msecs_to_jiffies_timeout, then replace the msleep with an
            open-coded version that avoids the extra +1 jiffy.
          - Try to add units to every variable name so we don't confuse
            jiffies with milliseconds.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dce56b3c
    • V
      drm/i915: Prepare to track new pipe config per pipe · 50741abc
      Ville Syrjälä 提交于
      Add a new_config pointer to intel_crtc which will point to the new pipe
      config for said crtc while intel_crtc.config will still contain the old
      config during first parts of the modeset operation. This is a step
      towards having the entire new state available during the compute phase,
      so that we can make accurate decisions about global resource usage.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      50741abc
    • V
      drm/i915: Pre-compute pipe enabled state · 7668851f
      Ville Syrjälä 提交于
      Add 'new_enabled' to intel_crtc and precompute it alongside new_encoder
      and new_crtc. This will allow making decisions about shared resources
      that are affected by the set of active pipes, before we've clobbered
      anything for real.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7668851f
  2. 22 1月, 2014 1 次提交
    • C
      drm/i915: Wait for completion of pending flips when starved of fences · 5dce5b93
      Chris Wilson 提交于
      On older generations (gen2, gen3) the GPU requires fences for many
      operations, such as blits. The display hardware also requires fences for
      scanouts and this leads to a situation where an arbitrary number of
      fences may be pinned by old scanouts following a pageflip but before we
      have executed the unpin workqueue. This is unpredictable by userspace
      and leads to random EDEADLK when submitting an otherwise benign
      execbuffer. However, we can detect when we have an outstanding flip and
      so cause userspace to wait upon their completion before finally
      declaring that the system is starved of fences. This is really no worse
      than forcing the GPU to stall waiting for older execbuffer to retire and
      release their fences before we can reallocate them for the next
      execbuffer.
      
      v2: move the test for a pending fb unpin to a common routine for
      later reuse during eviction
      
      Reported-and-tested-by: dimon@gmx.net
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5dce5b93
  3. 11 1月, 2014 2 次提交
  4. 12 12月, 2013 2 次提交
  5. 11 12月, 2013 1 次提交
    • P
      drm/i915: add initial Runtime PM functions · 8a187455
      Paulo Zanoni 提交于
      This patch adds the initial infrastructure to allow a Runtime PM
      implementation that sets the device to its D3 state. The patch just
      adds the necessary callbacks and the initial infrastructure.
      
      We still don't have any platform that actually uses this
      infrastructure, we still don't call get/put in all the places we need
      to, and we don't have any function to save/restore the state of the
      registers. This is not a problem since no platform uses the code added
      by this patch. We have a few people simultaneously working on runtime
      PM, so this initial code could help everybody make their plans.
      
      V2: - Move some functions to intel_pm.c
          - Remove useless pm_runtime_allow() call at init
          - Remove useless pm_runtime_mark_last_busy() call at get
          - Use pm_runtime_get_sync() instead of 2 calls
          - Add a WARN to check if we're really awake
      
      V3: - Rebase.
      
      V4: - Don't need to call pci_{save,restore}_state and
            pci_set_power_sate, since they're already called by the PCI
            layer
          - Remove wrong pm_runtime_enable() call at init_runtime_pm
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8a187455
  6. 10 12月, 2013 2 次提交
  7. 06 12月, 2013 1 次提交
  8. 28 11月, 2013 2 次提交
  9. 14 11月, 2013 1 次提交
  10. 13 11月, 2013 4 次提交
  11. 11 11月, 2013 1 次提交
  12. 07 11月, 2013 1 次提交
    • J
      drm/i915: make backlight functions take a connector · 752aa88a
      Jesse Barnes 提交于
      On VLV/BYT, backlight controls a per-pipe, so when adjusting the
      backlight we need to pass the correct info.  So make the externally
      visible backlight functions take a connector argument, which can be used
      internally to figure out the pipe backlight to adjust.
      
      v2: make connector pipe lookup check for NULL crtc (Jani)
          fixup connector check in ASLE code (Jani)
      v3: make sure we take the mode config lock around lookups (Daniel)
      v4: fix double unlock in panel_get_brightness (Daniel)
      v5: push ASLE work into a work queue (Daniel)
      v6: separate ASLE work to a prep patch, rebase (Jani)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      752aa88a
  13. 06 11月, 2013 1 次提交
  14. 30 10月, 2013 1 次提交
    • I
      drm/i915: rename i915_init_power_well to init_power_domains_init · ddb642fb
      Imre Deak 提交于
      Similarly rename the other related functions in the power domain
      interface.
      
      Higher level driver code calling these functions knows only about power
      domains, not the underlying power wells which may be different on
      different platforms. Also these functions really init/cleanup/resume
      power domains and only through that all related power wells, so rename
      them accordingly.
      
      Note that I left i915_{request,release}_power_well as is, since that
      really changes the state only of a single power well (and is HSW
      specific). It should also get a better name once we make it more
      generic by controlling things through a new audio power domain.
      
      v4:
      - use intel prefix instead of i915 everywhere (Paulo)
      - use a $prefix_$block_$action format (Daniel)
      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>
      ddb642fb
  15. 29 10月, 2013 1 次提交
  16. 28 10月, 2013 1 次提交
    • 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
  17. 22 10月, 2013 1 次提交
    • I
      drm/i915: enable only the needed power domains during modeset · 6efdf354
      Imre Deak 提交于
      So far the modeset code enabled all power domains if it needed any. It
      wasn't a problem since HW generations so far only had one always-on
      power well and one dynamic power well that can be enabled/disabled. For
      domains powered by always-on power wells (panel fitter on pipe A and the
      eDP transcoder) we didn't do anything, for all other domains we just
      enabled the single dynamic power well.
      
      Future HW generations will change this, as they add multiple dynamic
      power wells. Support for these will be added later, this patch prepares
      for those by making sure we only enable the required domains.
      
      Note that after this change on HSW we'll enable all power domains even
      if it was the domain for the panel fitter on pipe A or the eDP
      transcoder. This isn't a problem since the power domain framework
      already checks if the domain is on an always-on power well and doesn't
      do anything in this case.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6efdf354
  18. 16 10月, 2013 1 次提交
  19. 15 10月, 2013 1 次提交
    • V
      drm/i915: Add intel_pipe_wm and prepare for watermark pre-compute · 0b2ae6d7
      Ville Syrjälä 提交于
      Introduce a new struct intel_pipe_wm which contains all the
      watermarks for a single pipe. Use it to unify the LP0 and LP1+
      watermark computations so that we can just iterate through the
      watermark levels neatly and call ilk_compute_wm_level() for each.
      
      Also add another tool ilk_wm_merge() that merges the LP1+ watermarks
      from all pipes. For that, embed one intel_pipe_wm inside intel_crtc that
      contains the currently valid watermarks for each pipe.
      
      This is mainly preparatory work for pre-computing the watermarks for
      each pipe and merging them at a later time. For now the merging still
      happens immediately.
      
      v2: Add some comments about level 0 DDB split and intel_wm_config
          Add WARN_ON for level 0 being disabled
          s/lp_wm/merged
      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>
      0b2ae6d7
  20. 12 10月, 2013 2 次提交
    • D
      drm/i915: rename intel_fb.c to intel_fbdev.c · 0632fef6
      Daniel Vetter 提交于
      This file is all about the legacy fbdev support. If we want to extract
      framebuffer functions, we better put those into a separate file.
      
      Also rename functions accordingly, only two have used the intel_fb_
      prefix anyway.
      Reviewed-by: NChon Ming Lee <chon.ming.lee@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0632fef6
    • D
      drm/i915: Kconfig option to disable the legacy fbdev support · 4520f53a
      Daniel Vetter 提交于
      Boots Just Fine (tm)!
      
      The only glitch seems to be that at least on Fedora the boot splash
      gets confused and doesn't display much at all.
      
      And since there's no ugly console flickering anymore in between, the
      flicker while switching between X servers (VT support is still enabled)
      is even more jarring.
      
      Also, I'm unsure whether we don't need to somehow kick out vgacon, now
      that nothing else gets in the way. But stuff seems to work, so I
      don't care. Also everything still works as well with VGA_CONSOLE=n
      
      Also the #ifdef mess needs a bit of a cleanup, follow-up patches will
      do just that.
      
      To keep the Kconfig tidy, extract all the i915 options into its own
      file.
      
      v2:
      - Rebase on top of the preliminary hw support option and the
        intel_drv.h cleanup.
      - Shut up warnings in i915_debugfs.c
      
      v3: Use the right CONFIG variable, spotted by Chon Ming.
      
      Cc: Lee, Chon Ming <chon.ming.lee@intel.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NChon Ming Lee <chon.ming.lee@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4520f53a
  21. 11 10月, 2013 1 次提交
  22. 10 10月, 2013 4 次提交
  23. 09 10月, 2013 1 次提交
  24. 04 10月, 2013 1 次提交
    • C
      drm/i915: Boost RPS frequency for CPU stalls · b29c19b6
      Chris Wilson 提交于
      If we encounter a situation where the CPU blocks waiting for results
      from the GPU, give the GPU a kick to boost its the frequency.
      
      This should work to reduce user interface stalls and to quickly promote
      mesa to high frequencies - but the cost is that our requested frequency
      stalls high (as we do not idle for long enough before rc6 to start
      reducing frequencies, nor are we aggressive at down clocking an
      underused GPU). However, this should be mitigated by rc6 itself powering
      off the GPU when idle, and that energy use is dependent upon the workload
      of the GPU in addition to its frequency (e.g. the math or sampler
      functions only consume power when used). Still, this is likely to
      adversely affect light workloads.
      
      In particular, this nearly eliminates the highly noticeable wake-up lag
      in animations from idle. For example, expose or workspace transitions.
      (However, given the situation where we fail to downclock, our requested
      frequency is almost always the maximum, except for Baytrail where we
      manually downclock upon idling. This often masks the latency of
      upclocking after being idle, so animations are typically smooth - at the
      cost of increased power consumption.)
      
      Stéphane raised the concern that this will punish good applications and
      reward bad applications - but due to the nature of how mesa performs its
      client throttling, I believe all mesa applications will be roughly
      equally affected. To address this concern, and to prevent applications
      like compositors from permanently boosting the RPS state, we ratelimit the
      frequency of the wait-boosts each client recieves.
      
      Unfortunately, this techinique is ineffective with Ironlake - which also
      has dynamic render power states and suffers just as dramatically. For
      Ironlake, the thermal/power headroom is shared with the CPU through
      Intelligent Power Sharing and the intel-ips module. This leaves us with
      no GPU boost frequencies available when coming out of idle, and due to
      hardware limitations we cannot change the arbitration between the CPU and
      GPU quickly enough to be effective.
      
      v2: Limit each client to receiving a single boost for each active period.
          Tested by QA to only marginally increase power, and to demonstrably
          increase throughput in games. No latency measurements yet.
      
      v3: Cater for front-buffer rendering with manual throttling.
      
      v4: Tidy up.
      
      v5: Sadly the compositor needs frequent boosts as it may never idle, but
      due to its picking mechanism (using ReadPixels) may require frequent
      waits. Those waits, along with the waits for the vrefresh swap, conspire
      to keep the GPU at low frequencies despite the interactive latency. To
      overcome this we ditch the one-boost-per-active-period and just ratelimit
      the number of wait-boosts each client can receive.
      Reported-and-tested-by: NPaul Neumann <paul104x@yahoo.de>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68716Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Kenneth Graunke <kenneth@whitecape.org>
      Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
      Cc: Owen Taylor <otaylor@redhat.com>
      Cc: "Meng, Mengmeng" <mengmeng.meng@intel.com>
      Cc: "Zhuang, Lena" <lena.zhuang@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: No extern for function prototypes in headers.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b29c19b6
  25. 01 10月, 2013 2 次提交