1. 25 Nov, 2019 8 commits
  2. 22 Nov, 2019 1 commit
  3. 20 Nov, 2019 2 commits
  4. 18 Nov, 2019 10 commits
  5. 15 Nov, 2019 2 commits
  6. 14 Nov, 2019 4 commits
  7. 13 Nov, 2019 7 commits
  8. 12 Nov, 2019 4 commits
  9. 11 Nov, 2019 2 commits
    • Ben Hutchings's avatar
      drm/i915/cmdparser: Fix jump whitelist clearing · ea0b163b
      Ben Hutchings authored
      When a jump_whitelist bitmap is reused, it needs to be cleared.
      Currently this is done with memset() and the size calculation assumes
      bitmaps are made of 32-bit words, not longs.  So on 64-bit
      architectures, only the first half of the bitmap is cleared.
      
      If some whitelist bits are carried over between successive batches
      submitted on the same context, this will presumably allow embedding
      the rogue instructions that we're trying to reject.
      
      Use bitmap_zero() instead, which gets the calculation right.
      
      Fixes: f8c08d8f ("drm/i915/cmdparser: Add support for backward jumps")
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarJon Bloomfield <jon.bloomfield@intel.com>
      ea0b163b
    • Ville Syrjälä's avatar
      drm/i915: Preload LUTs if the hw isn't currently using them · f7702137
      Ville Syrjälä authored
      The LUTs are single buffered so in order to program them without
      tearing we'd have to do it during vblank (actually to be 100%
      effective it has to happen between start of vblank and frame start).
      We have no proper mechanism for that at the moment so we just
      defer loading them after the vblank waits have happened. That
      is not quite sufficient (especially when committing multiple pipes
      whose vblanks don't line up) so the LUT load will often leak into
      the following frame causing tearing.
      
      However in case the hardware wasn't previously using the LUT we
      can preload it before setting the enable bit (which is double
      buffered so won't tear). Let's determine if we can do such
      preloading and make it happen. Slight variation between the
      hardware requires some platforms specifics in the checks.
      
      Hans is seeing ugly colored flash on VLV/CHV macchines (GPD win
      and Asus T100HA) when the gamma LUT gets loaded for the first
      time as the BIOS has left some junk in the LUT memory.
      
      v2: Deal with uapi vs. hw crtc state split
          s/GCM/CGM/ typo fix
      
      Cc: Hans de Goede <hdegoede@redhat.com>
      Fixes: 051a6d8d ("drm/i915: Move LUT programming to happen after vblank waits")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191030190815.7359-1-ville.syrjala@linux.intel.comTested-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      (cherry picked from commit 0ccc42a2)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      f7702137