1. 29 6月, 2015 1 次提交
    • R
      drm/i915: Fix IPS related flicker · 066cf55b
      Rodrigo Vivi 提交于
      We cannot let IPS enabled with no plane on the pipe:
      
      BSpec: "IPS cannot be enabled until after at least one plane has
      been enabled for at least one vertical blank." and "IPS must be
      disabled while there is still at least one plane enabled on the
      same pipe as IPS." This restriction apply to HSW and BDW.
      
      However a shortcut path on update primary plane function
      to make primary plane invisible by setting DSPCTRL to 0
      was leting IPS enabled while there was no
      other plane enabled on the pipe causing flickerings that we were
      believing that it was caused by that other restriction where
      ips cannot be used when pixel rate is greater than 95% of cdclok.
      
      v2: Don't mess with Atomic path as pointed out by Ville.
      
      v3: Rebase after a long time and atomic path changes.
          Accept Ville suggestion of not check !fb
      
      v4: Re-factore on dinq
      
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=85583
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NKenneth Graunke <kenneth@whitecape.org>
      [danvet: Make it compile]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      066cf55b
  2. 25 6月, 2015 1 次提交
  3. 24 6月, 2015 2 次提交
    • D
      drm/i915/psr: Restrict single-shot updates to the PSR pipe · 20c8838b
      Daniel Vetter 提交于
      The frontbuffer code gives us accurate information about activity,
      let's use it. Again this should avoid unecessary updates when multiple
      screens are on.
      
      Also realign function paramaters, I couldn't resist that bit of OCD.
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      20c8838b
    • D
      drm/i915: Clear fb_tracking.busy_bits also for synchronous flips · fdbff928
      Daniel Vetter 提交于
      The current/old frontbuffer might still have gpu frontbuffer rendering
      pending. But once flipped it won't have the corresponding frontbuffer
      bits any more and hence the request retire function won't ever clear
      the corresponding busy bits. The async flip tracking (with the
      flip_prepare and flip_complete functions) already does this, but
      somehow I've forgotten to do this for synchronous flips.
      
      Note that we don't track outstanding rendering of the new framebuffer
      with busy_bits since all our plane update code waits for previous
      rendering to complete before displaying a new buffer. Hence a new
      buffer will never be busy.
      
      v2: Drop the spurious inline Ville spotted.
      
      v3: Don't touch flip_bits in the synchronsou frontbuffer_flip
      function, noticed by Paulo.
      
      v4: Remove one more inline that slipped through (Paulo).
      Reported-by: NPaulo Zanoni <przanoni@gmail.com>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Testcase: igt/kms_frontbuffer_tracking/fbc-modesetfrombusy
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      fdbff928
  4. 23 6月, 2015 1 次提交
    • J
      drm/i915: Update i915_gem_object_sync() to take a request structure · 91af127f
      John Harrison 提交于
      The plan is to pass requests around as the basic submission tracking structure
      rather than rings and contexts. This patch updates the i915_gem_object_sync()
      code path.
      
      v2: Much more complex patch to share a single request between the sync and the
      page flip. The _sync() function now supports lazy allocation of the request
      structure. That is, if one is passed in then that will be used. If one is not,
      then a request will be allocated and passed back out. Note that the _sync() code
      does not necessarily require a request. Thus one will only be created until
      certain situations. The reason the lazy allocation must be done within the
      _sync() code itself is because the decision to need one or not is not really
      something that code above can second guess (except in the case where one is
      definitely not required because no ring is passed in).
      
      The call chains above _sync() now support passing a request through which most
      callers passing in NULL and assuming that no request will be required (because
      they also pass in NULL for the ring and therefore can't be generating any ring
      code).
      
      The exeception is intel_crtc_page_flip() which now supports having a request
      returned from _sync(). If one is, then that request is shared by the page flip
      (if the page flip is of a type to need a request). If _sync() does not generate
      a request but the page flip does need one, then the page flip path will create
      its own request.
      
      v3: Updated comment description to be clearer about 'to_req' parameter (Tomas
      Elf review request). Rebased onto newer tree that significantly changed the
      synchronisation code.
      
      v4: Updated comments from review feedback (Tomas Elf)
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      91af127f
  5. 22 6月, 2015 10 次提交
  6. 16 6月, 2015 2 次提交
  7. 12 6月, 2015 12 次提交
  8. 28 5月, 2015 1 次提交
    • V
      drm/i915: Kill intel_flush_primary_plane() · b12ce1d8
      Ville Syrjälä 提交于
      The primary plane frobbing was removed from the sprite code in
       commit ecce87ea
       Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
       Date:   Tue Apr 21 17:12:50 2015 +0300
      
          drm/i915: Remove implicitly disabling primary plane for now
      
      but the intel_flush_primary_plane() calls were left behind. Replace them
      with straight forward POSTING_READ() of the sprite surface address
      register.
      
      The other user of intel_flush_primary_plane() is g4x_disable_trickle_feed()
      where we can just inline the steps directly.
      
      This allows intel_flush_primary_plane() to be killed off.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b12ce1d8
  9. 22 5月, 2015 2 次提交
    • D
      drm/i915/skl: Deinit/init the display at suspend/resume · 5d96d8af
      Damien Lespiau 提交于
      We need to re-init the display hardware when going out of suspend. This
      includes:
      
        - Hooking the PCH to the reset logic
        - Restoring CDCDLK
        - Enabling the DDB power
      
      Among those, only the CDCDLK one is a bit tricky. There's some
      complexity in that:
      
        - DPLL0 (which is the source for CDCLK) has two VCOs, each with a set
          of supported frequencies. As eDP also uses DPLL0 for its link rate,
          once DPLL0 is on, we restrict the possible eDP link rates the chosen
          VCO.
        - CDCLK also limits the bandwidth available to push pixels.
      
      So, as a first step, this commit restore what the BIOS set, until I can
      do more testing.
      
      In case that's of interest for the reviewer, I've unit tested the
      function that derives the decimal frequency field:
      
        #include <stdio.h>
        #include <stdint.h>
        #include <assert.h>
      
        #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
      
        static const struct dpll_freq {
                unsigned int freq;
                unsigned int decimal;
        } freqs[] = {
                { .freq = 308570, .decimal = 0b01001100111},
                { .freq = 337500, .decimal = 0b01010100001},
                { .freq = 432000, .decimal = 0b01101011110},
                { .freq = 450000, .decimal = 0b01110000010},
                { .freq = 540000, .decimal = 0b10000110110},
                { .freq = 617140, .decimal = 0b10011010000},
                { .freq = 675000, .decimal = 0b10101000100},
        };
      
        static void intbits(unsigned int v)
        {
                int i;
      
                for(i = 10; i >= 0; i--)
                        putchar('0' + ((v >> i) & 1));
        }
      
        static unsigned int freq_decimal(unsigned int freq /* in kHz */)
        {
                return (freq - 1000) / 500;
        }
      
        static void test_freq(const struct dpll_freq *entry)
        {
                unsigned int decimal = freq_decimal(entry->freq);
      
                printf("freq: %d, expected: ", entry->freq);
                intbits(entry->decimal);
                printf(", got: ");
                intbits(decimal);
                putchar('\n');
      
                assert(decimal == entry->decimal);
        }
      
        int main(int argc, char **argv)
        {
                int i;
      
                for (i = 0; i < ARRAY_SIZE(freqs); i++)
                        test_freq(&freqs[i]);
      
                return 0;
        }
      
      v2:
        - Rebase on top of -nightly
        - Use (freq - 1000) / 500 for the decimal frequency (Ville)
        - Fix setting the enable bit of HSW_NDE_RSTWRN_OPT (Ville)
        - Rename skl_display_{resume,suspend} to skl_{init,uninit}_cdclk to
          be consistent with the BXT code (Ville)
        - Store boot CDCLK in ddi_pll_init (Ville)
        - Merge dev_priv's skl_boot_cdclk into cdclk_freq
        - Use LCPLL_PLL_LOCK instead of (1 << 30) (Ville)
        - Replace various '0' by SKL_DPLL0 to be a bit more explicit that
          we're programming DPLL0
        - Busy poll the PCU before doing the frequency change. It takes about
          3/4 cycles, each separated by 10us, to get the ACK from the CPU
          (Ville)
      
      v3:
        - Restore dev_priv->skl_boot_cdclk, leaving unification with
          dev_priv->cdclk_freq for a later patch (Daniel, Ville)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5d96d8af
    • C
      drm/i915: Free RPS boosts for all laggards · e61b9958
      Chris Wilson 提交于
      If the client stalls on a congested request, chosen to be 20ms old to
      match throttling, allow the client a free RPS boost.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: s/rq/req/]
      [danvet: s/0/NULL/ reported by 0-day build]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e61b9958
  10. 21 5月, 2015 3 次提交
    • C
      drm/i915: Convert RPS tracking to a intel_rps_client struct · 2e1b8730
      Chris Wilson 提交于
      Now that we have internal clients, rather than faking a whole
      drm_i915_file_private just for tracking RPS boosts, create a new struct
      intel_rps_client and pass it along when waiting.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: s/rq/req/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2e1b8730
    • C
      drm/i915: Limit mmio flip RPS boosts · bcafc4e3
      Chris Wilson 提交于
      Since we will often pageflip to an active surface, we will often have to
      wait for the surface to be written before issuing the flip. Also we are
      likely to wait on that surface in plenty of time before the vblank.
      Since we have a mechanism for boosting when a flip misses the expected
      vblank, curtain the number of times we RPS boost when simply waiting for
      mmioflip.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: s/rq/req/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bcafc4e3
    • D
      drm/i915: s/\<rq\>/req/g · eed29a5b
      Daniel Vetter 提交于
      The merged seqno->request conversion from John called request
      variables req, but some (not all) of Chris' recent patches changed
      those to just rq. We've had a lenghty (and inconclusive) discussion on
      irc which is the more meaningful name with maybe at most a slight bias
      towards req.
      
      Given that the "don't change names without good reason to avoid
      conflicts" rule applies, so lets go back to a req everywhere for
      consistency. I'll sed any patches for which this will cause conflicts
      before applying.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      [danvet: s/origina/merged/ as pointed out by Chris - the first
      mass-conversion patch was from Chris, the merged one from John.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      eed29a5b
  11. 20 5月, 2015 3 次提交
  12. 08 5月, 2015 2 次提交