Skip to content
  1. Nov 29, 2012
    • Chris Wilson's avatar
      drm/i915: Preallocate next seqno before touching the ring · 9d773091
      Chris Wilson authored
      
      
      Based on the work by Mika Kuoppala, we realised that we need to handle
      seqno wraparound prior to committing our changes to the ring. The most
      obvious point then is to grab the seqno inside intel_ring_begin(), and
      then to reuse that seqno for all ring operations until the next request.
      As intel_ring_begin() can fail, the callers must already be prepared to
      handle such failure and so we can safely add further checks.
      
      This patch looks like it should be split up into the interface
      changes and the tweaks to move seqno wrapping from the execbuffer into
      the core seqno increment. However, I found no easy way to break it into
      incremental steps without introducing further broken behaviour.
      
      v2: Mika found a silly mistake and a subtle error in the existing code;
      inside i915_gem_retire_requests() we were resetting the sync_seqno of
      the target ring based on the seqno from this ring - which are only
      related by the order of their allocation, not retirement. Hence we were
      applying the optimisation that the rings were synchronised too early,
      fortunately the only real casualty there is the handling of seqno
      wrapping.
      
      v3: Do not forget to reset the sync_seqno upon module reinitialisation,
      ala resume.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=863861
      Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> [v2]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      9d773091
    • Daniel Vetter's avatar
      drm/i915: force restore on lid open · 45e2b5f6
      Daniel Vetter authored
      There seem to be indeed some awkwards machines around, mostly those
      without OpRegion support, where the firmware changes the display hw
      state behind our backs when closing the lid.
      
      This force-restore logic has been originally introduced in
      
      commit c1c7af60
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Thu Sep 10 15:28:03 2009 -0700
      
          drm/i915: force mode set at lid open time
      
      but after the modeset-rework we've disabled it in the vain hope that
      it's no longer required:
      
      commit 3b7a89fc
      
      
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Mon Sep 17 22:27:21 2012 +0200
      
          drm/i915: fix OOPS in lid_notify
      
      Alas, no.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54677
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57434
      Tested-by: default avatarKrzysztof Mazur <krzysiek@podlesie.net>
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      45e2b5f6
    • Chris Wilson's avatar
      drm/i915: Wait upon the last request seqno, rather than a future seqno · b5d17794
      Chris Wilson authored
      In commit 69c2fc89
      
      
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jul 20 12:41:03 2012 +0100
      
          drm/i915: Remove the per-ring write list
      
      the explicit flush was removed from i915_ring_idle(). However, we
      continued to wait upon the next seqno which now did not correspond to
      any request (except for the unusual condition of a failure to queue a
      request after execbuffer) and so would wait indefinitely.
      
      This has an important side-effect that i915_gpu_idle() does not cause
      the seqno to be incremented. This is vital if we are to be able to idle
      the GPU to handle seqno wraparound, as in subsequent patches.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b5d17794
    • Mika Kuoppala's avatar
      drm/i915: fix possible NULL dereference of dev_priv · 4f1ba0f8
      Mika Kuoppala authored
      
      
      Dereference dev_priv only after we know it is valid.
      Found with smatch.
      
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4f1ba0f8
    • Chris Wilson's avatar
      drm/i915: Increase the response time for slow SDVO devices · fc37381c
      Chris Wilson authored
      
      
      Some devices may respond very slowly and only flag that the reply is
      pending within the first 15us response window. Be kind to such devices
      and wait a further 15ms, before checking for the pending reply. This
      moves the existing special case delay of 30ms down from the detection
      routine into the common path and pretends to explain it...
      
      v2: Simplify the loop constructs as suggested by Jani Nikula.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=36997
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      fc37381c
    • Paulo Zanoni's avatar
      drm/i915: set the VIC of the mode on the AVI InfoFrame · 9a69b885
      Paulo Zanoni authored
      
      
      We currently set "0" as the VIC value of the AVI InfoFrames. According
      to the specs this should be fine and work for every mode, so to my
      point of view we can't consider the current behavior as a bug. The
      problem is that  we recently received a bug report (Kernel bug #50371)
      from a user that has an AV receiver that gives a black screen for any
      mode with VIC set to 0.
      
      So in order to make at least some modes work for him, this patch sets
      the correct VIC number when sending AVI InfoFrames.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=50371
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      9a69b885
    • Paulo Zanoni's avatar
      drm: add drm_mode_cea_vic · 374a868a
      Paulo Zanoni authored
      
      
      This function returns the VIC of the mode. This value can be used when
      creating AVI InfoFrames.
      
      Cc: Thierry Reding <thierry.reding@avionic-design.de>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=50371
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
      Acked-by: default avatarDave Airlie <airlied@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      374a868a
    • Ben Widawsky's avatar
      drm/i915: Fix pte updates in ggtt clear range · 2ff4aeac
      Ben Widawsky authored
      This bug was introduced by me:
      commit e76e9aeb
      
      
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Sun Nov 4 09:21:27 2012 -0800
      
          drm/i915: Stop using AGP layer for GEN6+
      
      The existing code uses memset_io which follows memset semantics in only
      guaranteeing a write of individual bytes. Since a PTE entry is 4 bytes,
      this can only be correct if the scratch page address is 0.
      
      This caused unsightly errors when we clear the range at load time,
      though I'm not really sure what the heck is referencing that memory
      anyway. I caught this is because I believe we have some other bug where
      the display is doing reads of memory we feel should be cleared (or we
      are relying on scratch pages to be a specific value).
      
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      2ff4aeac
  2. Nov 24, 2012
  3. Nov 23, 2012
  4. Nov 22, 2012