1. 27 1月, 2015 14 次提交
  2. 13 1月, 2015 1 次提交
  3. 12 1月, 2015 3 次提交
  4. 06 1月, 2015 1 次提交
    • K
      drm/i915: Make sample_c messages go faster on Haswell. · 94411593
      Kenneth Graunke 提交于
      Haswell significantly improved the performance of sampler_c messages,
      but the optimization appears to be off by default.  Later platforms
      remove this bit, and apparently always enable the optimization.
      
      Improves performance in "Counter Strike: Global Offensive" by 18%
      at default settings on Iris Pro.
      
      This may break sampling of paletted formats (P8/A8P8/P8A8).  It's
      unclear whether it affects sampling of paletted formats in general,
      or just the sample_c message (which is never used).
      
      While libva does have support for using paletted formats (primarily
      for OSDs), that support appears to have been broken for at least a
      year, so I couldn't observe a regression from this:
      
      I tried to get libva-intel to use paletted formats, and observe a
      regression...but the only thing I found that used it was mplayer's OSD
      (on screen display).  Even without my patch, the colors were totally
      wrong with that, and it's according to a few distro wikis, that's been
      the case for over a year.
      
      If libva's code for paletted formats /is/ broken, they could always
      add code to disable this bit using the command validator when fixing
      it.
      
      Further investigation from Haihao shows that libva mplayer OSD seems
      to work at least on his setup (still unclear what's wron with Ken's),
      and that it's not affected by this patch. Quoting the discussion
      between Haihao and Ken:
      
      > > > If you use "-vo gl" or "-vo xv", the OSD is solid white text with a black
      > > > border around it.  I presume that it's supposed to be white with vaapi as
      > > > well, but I guess I'm not entirely sure.
      > > >
      > > > It's possible that the optimization doesn't affect the palette as long as
      > > > you never use sample_c with the paletted textures.
      > >
      > > I verified the palette takes effect in the following way:
      > >
      > > 1. Only support P8A8 format in the driver
      > >
      > > 2. ran the above command and I saw white OSD text
      > >
      > > 3. Only support P4A4 format in the driver and don't use
      > > 3DSTATE_SAMPLER_PALETTE_LOAD0 to load the value to the texture palette,
      > > so the palette keeps unchanged.
      > >
      > > 4. ran the above command and I saw black OSD text.
      > >
      > > 5. Load the right value to the texture palette and ran the above command
      > > again, I saw white OSD text.
      > >
      > > Hence I think sample_c with the paletted textures is used in the driver.
      >
      > That sounds like the palette is actually working, then.  Great :)
      >
      > I doubt that libva would use sample_c - sampling with a shadow comparison?
      > It looks like it just uses sample and sample+killpix.
      
      You are right, libva driver doesn't use sample_c message.
      
      > I'm pretty sure the sample_c optimization just uses the palette memory as
      > storage for some stuff, so it's quite possible it just works if you're
      > only using sample and sample+killpix.
      
      Thanks for the explanation, it makes sense to me.
      Signed-off-by: NKenneth Graunke <kenneth@whitecape.org>
      [danvet: Add wa name from Ville's review to the comment and copypaste
      the explanation why we don't care about libva (already broken) from
      Ken. Also add conclusion from libva devs that&why this is all fine.]
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: "Xiang, Haihao" <haihao.xiang@intel.com>
      Cc: libva@lists.freedesktop.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      94411593
  5. 16 12月, 2014 2 次提交
  6. 15 12月, 2014 2 次提交
  7. 11 12月, 2014 1 次提交
  8. 10 12月, 2014 1 次提交
    • D
      drm/i915/bdw: Fix the write setting up the WIZ hashing mode · 98533251
      Damien Lespiau 提交于
      I was playing with clang and oh surprise! a warning trigerred by
      -Wshift-overflow (gcc doesn't have this one):
      
          WA_SET_BIT_MASKED(GEN7_GT_MODE,
                            GEN6_WIZ_HASHING_MASK | GEN6_WIZ_HASHING_16x4);
      
          drivers/gpu/drm/i915/intel_ringbuffer.c:786:2: warning: signed shift result
            (0x28002000000) requires 43 bits to represent, but 'int' only has 32 bits
            [-Wshift-overflow]
              WA_SET_BIT_MASKED(GEN7_GT_MODE,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          drivers/gpu/drm/i915/intel_ringbuffer.c:737:15: note: expanded from macro
            'WA_SET_BIT_MASKED'
              WA_REG(addr, _MASKED_BIT_ENABLE(mask), (mask) & 0xffff)
      
      Turned out GEN6_WIZ_HASHING_MASK was already shifted by 16, and we were
      trying to shift it a bit more.
      
      The other thing is that it's not the usual case of setting WA bits here, we
      need to have separate mask and value.
      
      To fix this, I've introduced a new _MASKED_FIELD() macro that takes both the
      (unshifted) mask and the desired value and the rest of the patch ripples
      through from it.
      
      This bug was introduced when reworking the WA emission in:
      
        Commit 7225342a
        Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
        Date:   Tue Oct 7 17:21:26 2014 +0300
      
            drm/i915: Build workaround list in ring initialization
      
      v2: Invert the order of the mask and value arguments (Daniel Vetter)
          Rewrite _MASKED_BIT_ENABLE() and _MASKED_BIT_DISABLE() with
          _MASKED_FIELD() (Jani Nikula)
          Make sure we only evaluate 'a' once in _MASKED_BIT_ENABLE() (Dave Gordon)
          Add check to ensure the value is within the mask boundaries (Chris Wilson)
      
      v3: Ensure the the value and mask are 16 bits (Dave Gordon)
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      98533251
  9. 03 12月, 2014 1 次提交
  10. 21 11月, 2014 1 次提交
  11. 20 11月, 2014 5 次提交
  12. 19 11月, 2014 5 次提交
    • I
      drm/i915: disable rps irqs earlier during suspend/unload · 2eb5252e
      Imre Deak 提交于
      After the previous patch RPS disabling doesn't depend any more on the
      first level interrupts being disabled, so we can move it everywhere
      earlier. Doing so let's us think about the uninitialization steps
      afterwards independently of any asynchronous RPS events that can happen
      atm. It also makes the system/runtime suspend time RPS disabling more
      uniform. Finally this gets rid of the WARN in
      intel_suspend_gt_powersave(), which we can hit if a final RPS work runs
      after we disabled the first level interrupts.
      
      Testcase: igt/pm_rpm
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=82939Signed-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>
      2eb5252e
    • I
      drm/i915: sanitize rps irq disabling · d4d70aa5
      Imre Deak 提交于
      When disabling the RPS interrupts there is a tricky dependency between
      the thread disabling the interrupts, the RPS interrupt handler and the
      corresponding RPS work. The RPS work can reenable the interrupts, so
      there is no straightforward order in the disabling thread to (1) make
      sure that any RPS work is flushed and to (2) disable all RPS
      interrupts. Currently this is solved by masking the interrupts using two
      separate mask registers (first level display IMR and PM IMR) and doing
      the disabling when all first level interrupts are disabled.
      
      This works, but the requirement to run with all first level interrupts
      disabled is unnecessary making the suspend / unload time ordering of RPS
      disabling wrt. other unitialization steps difficult and error prone.
      Removing this restriction allows us to disable RPS early during suspend
      / unload and forget about it for the rest of the sequence. By adding a
      more explicit method for avoiding the above race, it also becomes easier
      to prove its correctness. Finally currently we can hit the WARN in
      snb_update_pm_irq(), when a final RPS work runs with the first level
      interrupts already disabled. This won't lead to any problem (due to the
      separate interrupt masks), but with the change in this and the next
      patch we can get rid of the WARN, while leaving it in place for other
      scenarios.
      
      To address the above points, add a new RPS interrupts_enabled flag and
      use this during RPS disabling to avoid requeuing the RPS work and
      reenabling of the RPS interrupts. Since the interrupt disabling happens
      now in intel_suspend_gt_powersave(), we will disable RPS interrupts
      explicitly during suspend (and not just through the first level mask),
      but there is no problem doing so, it's also more consistent and allows
      us to unify more of the RPS disabling during suspend and unload time in
      the next patch.
      
      v2/v3:
      - rebase on patch "drm/i915: move rps irq disable one level up" in the
        patchset
      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>
      d4d70aa5
    • I
      drm/i915: sanitize rps irq enabling · 3cc134e3
      Imre Deak 提交于
      Atm we first enable the RPS interrupts then we clear any pending ones.
      By this we could lose an interrupt arriving after we unmasked it. This
      may not be a problem as the caller should handle such a race, but logic
      still calls for the opposite order. Also we can delay enabling the
      interrupts until after all the RPS initialization is ready with the
      following order:
      
      1. disable left-over RPS (earlier via intel_uncore_sanitize)
      2. clear any pending RPS interrupts
      3. initialize RPS
      4. enable RPS interrupts
      
      This also allows us to do the 2. and 4. step the same way for all
      platforms, so let's follow this order to simplifying things.
      
      Also make sure any queued interrupts are also cleared.
      
      v2:
      - rebase on the GEN9 patches where we don't support RPS yet, so we
        musn't enable RPS interrupts on it (Paulo)
      v3:
      - avoid enabling RPS interrupts on GEN>9 too (Paulo)
      - clarify the RPS init sequence in the log message (Chris)
      - add POSTING_READ to gen6_reset_rps_interrupts() (Paulo)
      - WARN if any PM_IIR bits are set in gen6_enable_rps_interrupts()
        (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>
      3cc134e3
    • I
      drm/i915: move rps irq disable one level up · e534770a
      Imre Deak 提交于
      We disable the RPS interrupts for all platforms at the same spot, so
      move it one level up in the callstack to simplify things.
      
      No functional change.
      
      v2:
      - rebase on the GEN9 patches where RPS isn't supported yet, so we don't
        need to disable RPS interrupts on it (Paulo)
      v3:
      - avoid disabling the interrupts on GEN>9 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>
      e534770a
    • T
      drm/i915: Extend pcode mailbox interface · 151a49d0
      Tom O'Rourke 提交于
      In sandybridge_pcode_read and sandybridge_pcode_write,
      extend the mbox parameter from u8 to u32.
      
      On Haswell and Sandybridge, bits 7:0 encode the mailbox
      command and bits 28:8 are used for address control for
      specific commands.
      
      Based on suggestion from Ville Syrjälä.
      Signed-off-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      151a49d0
  13. 17 11月, 2014 3 次提交