1. 14 2月, 2015 7 次提交
  2. 31 1月, 2015 1 次提交
  3. 27 1月, 2015 16 次提交
  4. 13 1月, 2015 1 次提交
  5. 12 1月, 2015 3 次提交
  6. 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
  7. 16 12月, 2014 2 次提交
  8. 15 12月, 2014 2 次提交
  9. 11 12月, 2014 1 次提交
  10. 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
  11. 03 12月, 2014 1 次提交
  12. 21 11月, 2014 1 次提交
  13. 20 11月, 2014 3 次提交