1. 22 Oct, 2013 1 commit
  2. 18 Oct, 2013 4 commits
    • Ben Widawsky's avatar
      drm/i915: Disable GGTT PTEs on GEN6+ suspend · 828c7908
      Ben Widawsky authored
      Once the machine gets to a certain point in the suspend process, we
      expect the GPU to be idle. If it is not, we might corrupt memory.
      Empirically (with an early version of this patch) we have seen this is
      not the case. We cannot currently explain why the latent GPU writes
      occur.
      
      In the technical sense, this patch is a workaround in that we have an
      issue we can't explain, and the patch indirectly solves the issue.
      However, it's really better than a workaround because we understand why
      it works, and it really should be a safe thing to do in all cases.
      
      The noticeable effect other than the debug messages would be an increase
      in the suspend time. I have not measure how expensive it actually is.
      
      I think it would be good to spend further time to root cause why we're
      seeing these latent writes, but it shouldn't preclude preventing the
      fallout.
      
      NOTE: It should be safe (and makes some sense IMO) to also keep the
      VALID bit unset on resume when we clear_range(). I've opted not to do
      this as properly clearing those bits at some later point would be extra
      work.
      
      v2: Fix bugzilla link
      
      Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=65496
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59321Tested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Tested-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Tested-By: default avatarTodd Previte <tprevite@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      828c7908
    • Ben Widawsky's avatar
      drm/i915: Make PTE valid encoding optional · b35b380e
      Ben Widawsky authored
      We need this to work around a corruption when the boot kernel image
      loads the hibernated kernel image from swap on Haswell systems -
      somehow not everything is properly shut off.
      
      This is just the prep work, the next patch will implement the actual
      workaround.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      [danvet: Add a commit message suitable for -fixes and add cc: stable]
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b35b380e
    • Chris Wilson's avatar
      drm: Pad drm_mode_get_connector to 64-bit boundary · bc5bd37c
      Chris Wilson authored
      Pavel Roskin reported that DRM_IOCTL_MODE_GETCONNECTOR was overwritting
      the 4 bytes beyond the end of its structure with a 32-bit userspace
      running on a 64-bit kernel. This is due to the padding gcc inserts as
      the drm_mode_get_connector struct includes a u64 and its size is not a
      natural multiple of u64s.
      
      64-bit kernel:
      
      sizeof(drm_mode_get_connector)=80, alignof=8
      sizeof(drm_mode_get_encoder)=20, alignof=4
      sizeof(drm_mode_modeinfo)=68, alignof=4
      
      32-bit userspace:
      
      sizeof(drm_mode_get_connector)=76, alignof=4
      sizeof(drm_mode_get_encoder)=20, alignof=4
      sizeof(drm_mode_modeinfo)=68, alignof=4
      
      Fortuituously we can insert explicit padding to the tail of our
      structures without breaking ABI.
      Reported-by: default avatarPavel Roskin <proski@gnu.org>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      bc5bd37c
    • Chris Wilson's avatar
      drm: Prevent overwriting from userspace underallocating core ioctl structs · b062672e
      Chris Wilson authored
      Apply the protections from
      
      commit 1b2f1489
      Author: Dave Airlie <airlied@redhat.com>
      Date:   Sat Aug 14 20:20:34 2010 +1000
      
          drm: block userspace under allocating buffer and having drivers overwrite it (v2)
      
      to the core ioctl structs as well, for we found one instance where there
      is a 32-/64-bit size mismatch and were guilty of writing beyond the end
      of the user's buffer.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Airlie <airlied@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b062672e
  3. 15 Oct, 2013 3 commits
  4. 13 Oct, 2013 17 commits
  5. 12 Oct, 2013 10 commits
  6. 11 Oct, 2013 5 commits