1. 22 2月, 2011 1 次提交
    • C
      drm/i915: Protect against drm_gem_object not being the first member · c8725226
      Chris Wilson 提交于
      Dave Airlie spotted that we had a potential bug should we ever rearrange
      the drm_i915_gem_object so not the base drm_gem_object was not its first
      member. He noticed that we often convert the return of
      drm_gem_object_lookup() immediately into drm_i915_gem_object and then
      check the result for nullity. This is only valid when the base object is
      the first member and so the superobject has the same address. Play safe
      instead and use the compiler to convert back to the original return
      address for sanity testing.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      c8725226
  2. 08 2月, 2011 1 次提交
  3. 07 2月, 2011 1 次提交
  4. 05 12月, 2010 1 次提交
  5. 02 12月, 2010 1 次提交
    • C
      drm/i915: Pipelined fencing [infrastructure] · d9e86c0e
      Chris Wilson 提交于
      With this change, every batchbuffer can use all available fences (save
      pinned and scanout, of course) without ever stalling the gpu!
      
      In theory. Currently the actual pipelined update of the register is
      disabled due to some stability issues. However, just the deferred update
      is a significant win.
      
      Based on a series of patches by Daniel Vetter.
      
      The premise is that before every access to a buffer through the GTT we
      have to declare whether we need a register or not. If the access is by
      the GPU, a pipelined update to the register is made via the ringbuffer,
      and we track the last seqno of the batches that access it. If by the
      CPU we wait for the last GPU access and update the register (either
      to clear or to set it for the current buffer).
      
      One advantage of being able to pipeline changes is that we can defer the
      actual updating of the fence register until we first need to access the
      object through the GTT, i.e. we can eliminate the stall on set_tiling.
      This is important as the userspace bo cache does not track the tiling
      status of active buffers which generate frequent stalls on gen3 when
      enabling tiling for an already bound buffer.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9e86c0e
  6. 24 11月, 2010 1 次提交
  7. 05 11月, 2010 1 次提交
    • D
      drm/i915: kill mappable/fenceable disdinction · 75e9e915
      Daniel Vetter 提交于
      a00b10c3 "Only enforce fence limits inside the GTT" also
      added a fenceable/mappable disdinction when binding/pinning buffers.
      This only complicates the code with no pratical gain:
      
      - In execbuffer this matters on for g33/pineview, as this is the only
        chip that needs fences and has an unmappable gtt area. But fences
        are only possible in the mappable part of the gtt, so need_fence
        implies need_mappable. And need_mappable is only set independantly
        with relocations which implies (for sane userspace) that the buffer
        is untiled.
      
      - The overlay code is only really used on i8xx, which doesn't have
        unmappable gtt. And it doesn't support tiled buffers, currently.
      
      - For all other buffers it's a bug to pass in a tiled bo.
      
      In short, this disdinction doesn't have any practical gain.
      
      I've also reverted mapping the overlay and context pages as possibly
      unmappable. It's not worth being overtly clever here, all the big
      gains from unmappable are for execbuf bos.
      
      Also add a comment for a clever optimization that confused me
      while reading the original patch by Chris Wilson.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      75e9e915
  8. 29 10月, 2010 1 次提交
    • C
      drm/i915: Only enforce fence limits inside the GTT. · a00b10c3
      Chris Wilson 提交于
      So long as we adhere to the fence registers rules for alignment and no
      overlaps (including with unfenced accesses to linear memory) and account
      for the tiled access in our size allocation, we do not have to allocate
      the full fenced region for the object. This allows us to fight the bloat
      tiling imposed on pre-i965 chipsets and frees up RAM for real use. [Inside
      the GTT we still suffer the additional alignment constraints, so it doesn't
      magic allow us to render larger scenes without stalls -- we need the
      expanded GTT and fence pipelining to overcome those...]
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      a00b10c3
  9. 28 10月, 2010 4 次提交
  10. 27 10月, 2010 1 次提交
    • P
      mm: stack based kmap_atomic() · 3e4d3af5
      Peter Zijlstra 提交于
      Keep the current interface but ignore the KM_type and use a stack based
      approach.
      
      The advantage is that we get rid of crappy code like:
      
      	#define __KM_PTE			\
      		(in_nmi() ? KM_NMI_PTE : 	\
      		 in_irq() ? KM_IRQ_PTE :	\
      		 KM_PTE0)
      
      and in general can stop worrying about what context we're in and what kmap
      slots might be appropriate for that.
      
      The downside is that FRV kmap_atomic() gets more expensive.
      
      For now we use a CPP trick suggested by Andrew:
      
        #define kmap_atomic(page, args...) __kmap_atomic(page)
      
      to avoid having to touch all kmap_atomic() users in a single patch.
      
      [ not compiled on:
        - mn10300: the arch doesn't actually build with highmem to begin with ]
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: fix up drivers/gpu/drm/i915/intel_overlay.c]
      Acked-by: NRik van Riel <riel@redhat.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NChris Metcalf <cmetcalf@tilera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3e4d3af5
  11. 21 9月, 2010 1 次提交
  12. 13 9月, 2010 2 次提交
    • C
      drm/i915: Fix an overlay regression from 7e7d76c3 · f7abfe8b
      Chris Wilson 提交于
      When separating out the prepare/commit into its own separate functions
      we overlooked that the intel_crtc->dpms_mode was being used elsewhere to
      check on the actual status of the pipe.
      
      Track that bit of logic separately from the actual dpms mode, so there
      is no confusion should we be able to handle multiple dpms modes, nor
      any semantic conflict between prepare/commit and dpms.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      f7abfe8b
    • C
      drm/i915/lvds: Ensure panel is unlocked for Ironlake or the panel fitter · e9e331a8
      Chris Wilson 提交于
      Commit 77d07fd9 introduced a regression
      where by not waiting for the panel to be turned off, left the panel and
      PLL registers locked across the modeset. Thus the panel remaining blank.
      
      As pointed out by Daniel Vetter, when testing LVDS it helps to open the
      laptop and look at the actual panel you are purporting to test.
      
      A second issue with the patch was that in order to modify the panel
      fitter before gen5, the pipe and the panel must have be completely
      powered down. So we wait.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      e9e331a8
  13. 12 9月, 2010 1 次提交
  14. 08 9月, 2010 23 次提交