1. 10 Dec, 2014 2 commits
    • Damien Lespiau's avatar
      drm/i915/bdw: Fix the write setting up the WIZ hashing mode · 98533251
      Damien Lespiau authored
      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: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      98533251
    • Daniel Vetter's avatar
      drm/i915: Don't complain about stolen conflicts on gen3 · 0b6d24c0
      Daniel Vetter authored
      Apparently stuff works that way on those machines.
      
      I agree with Chris' concern that this is a bit risky but imo worth a
      shot in -next just for fun. Afaics all these machines have the pci
      resources allocated like that by the BIOS, so I suspect that it's all
      ok.
      
      This regression goes back to
      
      commit eaba1b8f
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Jul 4 12:28:35 2013 +0100
      
          drm/i915: Verify that our stolen memory doesn't conflict
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031Tested-by: default avatarlu hua <huax.lu@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: default avatarPaul Menzel <paulepanter@users.sourceforge.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      0b6d24c0
  2. 08 Dec, 2014 1 commit
  3. 05 Dec, 2014 3 commits
  4. 03 Dec, 2014 18 commits
  5. 02 Dec, 2014 16 commits