1. 31 Jan, 2013 9 commits
    • Ben Widawsky's avatar
      drm/i915: Add probe and remove to the gtt ops · baa09f5f
      Ben Widawsky authored
      The idea, and much of the code came originally from:
      
      commit 0712f0249c3148d8cf42a3703403c278590d4de5
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Fri Jan 18 17:23:16 2013 -0800
      
          drm/i915: Create a vtable for i915 gtt
      
      Daniel didn't like the color of that patch series, and so I asked him to
      start something which appealed to his sense of color. The preceding
      patches are those, and now this is going on top of that.
      
      [extracted from the original commit message]
      
      One immediately obvious thing to implement is our gmch probing. The init
      function was getting massively bloated. Fundamentally, all that's needed
      from GMCH probing is the GTT size, and the stolen size. It makes design
      sense to put the mappable calculation in there as well, but the code
      turns out a bit nicer without it (IMO)
      
      The intel_gtt bridge thing is still here, but the subsequent patches
      will finish ripping that out.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      [danvet: Bikeshedded one comment (GMADR is just the PCI aperture, we
      use it for other things than just accessing tiled surfaces through a
      linear view) and cut the newly added long lines a bit. Also one
      checkpatch error.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      baa09f5f
    • Daniel Vetter's avatar
      drm/i915: extract hw ppgtt setup/cleanup code · 3440d265
      Daniel Vetter authored
      At the moment only cosmetics, but being able to initialize/cleanup
      arbitrary ppgtt address spaces paves the way to have more than one of
      them ... Just in case we ever get around to implementing real
      per-process address spaces. Note that in that case another vfunc for
      ppgtt would be beneficial though. But that can wait until the code
      grows a second place which initializes ppgtts.
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      3440d265
    • Daniel Vetter's avatar
      drm/i915: pte_encode is gen6+ · 960e3e42
      Daniel Vetter authored
      All the other gen6+ hw code has the gen6_ prefix, so be consistent
      about it.
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      960e3e42
    • Daniel Vetter's avatar
      drm/i915: vfuncs for ppgtt · def886c3
      Daniel Vetter authored
      Like for the global gtt we want a notch more flexibility here. Only
      big change (besides a few tiny function parameter adjustments) was to
      move gen6_ppgtt_insert_entries up (and remove _sg_ from its name, we
      only have one kind of insert_entries since the last gtt cleanup).
      
      We could also extract the platform ppgtt setup/teardown code a bit
      better, but I don't care that much.
      
      With this we have the hw details of pte writing nicely hidden away
      behind a bit of abstraction. Which should pave the way for
      different/multiple ppgtts (e.g. what we need for real ppgtt support).
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      def886c3
    • Daniel Vetter's avatar
      drm/i915: vfuncs for gtt_clear_range/insert_entries · 7faf1ab2
      Daniel Vetter authored
      We have a few too many differences here, so finally take the prepared
      abstraction and run with it. A few smaller changes are required to get
      things into shape:
      
      - move i915_cache_level up since we need it in the gt funcs
      - split up i915_ggtt_clear_range and move the two functions down to
        where the relevant insert_entries functions are
      - adjustments to a few function parameter lists
      
      Now we have 2 functions which deal with the gen6+ global gtt
      (gen6_ggtt_ prefix) and 2 functions which deal with the legacy gtt
      code in the intel-gtt.c fake agp driver (i915_ggtt_ prefix).
      
      Init is still a bit a mess, but honestly I don't care about that.
      
      One thing I've thought about while deciding on the exact interfaces is
      a flag parameter for ->clear_range: We could use that to decide
      between writing invalid pte entries or scratch pte entries. In case we
      ever get around to fixing all our bugs which currently prevent us from
      filling the gtt with empty ptes for the truly unused ranges ...
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      [bwidawsk: Moved functions to the gtt struct]
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7faf1ab2
    • Ben Widawsky's avatar
      drm/i915: Error state should print /sys/kernel/debug · 2f86f191
      Ben Widawsky authored
      /sys/kernel/debug has more or less been the standard location of debugfs
      for several years now. Other parts of DRM already use this location, so
      we should as well.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarCarl Worth <cworth@cworth.org>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      [danvet: split up long line.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      2f86f191
    • Daniel Vetter's avatar
      drm/i915: move DP save/restore into i915_ums.c · a65e827d
      Daniel Vetter authored
      Note that this slightly changes the order, but we only move it within
      the block of registers that restore encoder state. Specifically LVDS
      is now restored after DP, whereas previously it was done before.
      
      Legacy vga is still restored afterwards, which seems to be the
      important thing (if there's anything important in this restore
      ordering at all).
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a65e827d
    • Daniel Vetter's avatar
      drm/i915: dont save/restore VGA state for kms · 44cec740
      Daniel Vetter authored
      The only thing we really care about that it is off. To do so, reuse
      the recently created i915_redisable_vga function, which is already
      used to put obnoxious firmware into check on lid reopening.
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      44cec740
    • Daniel Vetter's avatar
      drm/i915: extract ums suspend/resume into i915_ums.c · d8157a36
      Daniel Vetter authored
      Similarly to how i915_dma.c is shaping up to be the dungeon hole for
      all things supporting dri1, create a new one to hide all the crazy
      things which are only really useful for ums support. Biggest part is
      the register suspend/resume support.
      
      Unfortunately a lot of it is still intermingled with bits and pieces
      we might still need, so needs more analysis and needs to stay in
      i915_suspend.c for now.
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      
      v2: s/modeset_reg/display_reg/ as suggested by Imre, to avoid
      confusion between the kernel modeset code and display save/restore to
      support ums.
      
      v3: Fixup alphabetical order in the Makefile, spotted by Chris Wilson.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d8157a36
  2. 28 Jan, 2013 2 commits
  3. 27 Jan, 2013 2 commits
  4. 26 Jan, 2013 8 commits
  5. 24 Jan, 2013 19 commits