1. 08 Jul, 2013 8 commits
    • Daniel Vetter's avatar
      drm/i915: convert debugfs creation/destruction to table · 34b9674c
      Daniel Vetter authored
      At least for the common cases where we only need special file
      operations. The forcewake file is still rather more special.
      
      v2: Fix up the debugfs unregister code.
      
      v3: Actually squash in the right fixup.
      Acked-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      34b9674c
    • Daniel Vetter's avatar
      drm/i915: dvo needs a P2 divisor of 4 · 5d536e28
      Daniel Vetter authored
      Section 1.5.4, "DPLL A Control Register" from Bspec about bit 23
      "FPA0/A1 P2 Clock Divide":
      
      0 = Divide by 2
      1 = Divide by 4. This bit must be set in DVO non-gang mode
      
      So copy the current limits (which should be good for i8xx) and create
      a new set for dvo encoders.
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.oc.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5d536e28
    • Daniel Vetter's avatar
      drm/i915: fix dvo DPLL regression · 4a33e48d
      Daniel Vetter authored
      I've missed that intel_dvo_mode_set changes the dpll configuration.
      Hence when I've reworked the sequence to only enable the dpll in the
      crtc_enable callback in
      
      commit 66e3d5c0
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun Jun 16 21:24:16 2013 +0200
      
          drm/i915: move i9xx dpll enabling into crtc enable function
      
      that special DVO bit was lost. Some BSpec reading confirms that it's
      only needed for DVO encoders. Section 1.5.4, "DPLL A Control Register"
      for bit 30:
      
      "2X Clock Enable. When driving In non-gang DVO modes such as a
      connected flat panel or TV, a 2X" version of the clock is needed. When
      not using the 2X output it should be disabled. This bit cannot be set
      when driving the integrated LVDS port on devices such as Montara-GM."
      
      Fix this regression up.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66516
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reported-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Partially-tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4a33e48d
    • Ben Widawsky's avatar
      drm/i915: Embed drm_mm_node in i915 gem obj · c6cfb325
      Ben Widawsky authored
      Embedding the node in the obj is more natural in the transition to VMAs
      which will also have embedded nodes. This change also helps transition
      away from put_block to remove node.
      
      Though it's quite an uncommon occurrence, it's somewhat convenient to not
      fail at bind time because we cannot allocate the node. Though in
      practice there are other allocations (like the request structure) which
      would probably make this point not terribly useful.
      
      Quoting Daniel:
      Note that the only difference between put_block and remove_node is
      that the former fills up the preallocation cache. Which we don't need
      anyway and hence is just wasted space.
      
      v2: Clean up the stolen preallocation code.
      Rebased on the reserve_node patches
      renames ggtt_ stuff to gtt_ stuff
      WARN_ON if the object is already bound (which doesn't mean it's in the
      bound list, tricky)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c6cfb325
    • Ben Widawsky's avatar
      drm/i915: Kill obj->gtt_offset · edd41a87
      Ben Widawsky authored
      With the getters in place from the previous patch this members serves no
      purpose other than saving one spare pointer chase, which will be killed
      in the next patch anyway.
      
      Moving to VMAs, this members adds unnecessary confusion since an object
      may exist at different offsets in different VMs.
      
      v2: Properly preserve the stolen offset. This code is a bit hacky but it
      all goes away when we embed the drm_mm_node and removes the need for the
      incorrect patch I submitted previously: "Use gtt_space->start for stolen
      reservation"
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      edd41a87
    • Ben Widawsky's avatar
      drm/i915: Getter/setter for object attributes · f343c5f6
      Ben Widawsky authored
      Soon we want to gut a lot of our existing assumptions how many address
      spaces an object can live in, and in doing so, embed the drm_mm_node in
      the object (and later the VMA).
      
      It's possible in the future we'll want to add more getter/setter
      methods, but for now this is enough to enable the VMAs.
      
      v2: Reworked commit message (Ben)
      Added comments to the main functions (Ben)
      sed -i "s/i915_gem_obj_set_color/i915_gem_obj_ggtt_set_color/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_bound/i915_gem_obj_ggtt_bound/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_size/i915_gem_obj_ggtt_size/" drivers/gpu/drm/i915/*.[ch]
      sed -i "s/i915_gem_obj_offset/i915_gem_obj_ggtt_offset/" drivers/gpu/drm/i915/*.[ch]
      (Daniel)
      
      v3: Rebased on new reserve_node patch
      Changed DRM_DEBUG_KMS to actually work (will need fixing later)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f343c5f6
    • Ben Widawsky's avatar
      drm: Change create block to reserve node · 338710e7
      Ben Widawsky authored
      With the previous patch we no longer actually create a node, we simply
      find the correct hole and occupy it. This very well could have been
      squashed with the last patch, but since I already had David's review, I
      figured it's easiest to keep it distinct.
      
      Also update the users in i915. Conveniently this is the only user of the
      interface.
      
      CC: David Airlie <airlied@linux.ie>
      CC: <dri-devel@lists.freedesktop.org>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Acked-by: default avatarDavid Airlie <airlied@linux.ie>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      338710e7
    • Ben Widawsky's avatar
      drm: pre allocate node for create_block · b3a070cc
      Ben Widawsky authored
      For an upcoming patch where we introduce the i915 VMA, it's ideal to
      have the drm_mm_node as part of the VMA struct (ie. it's pre-allocated).
      Part of the conversion to VMAs is to kill off obj->gtt_space. Doing this
      will break a bunch of code, but amongst them are 2 callers of
      drm_mm_create_block(), both related to stolen memory.
      
      It also allows us to embed the drm_mm_node into the object currently
      which provides a nice transition over to the new code.
      
      v2: Reordered to do before ripping out obj->gtt_offset.
      Some minor cleanups made available because of reordering.
      
      v3: s/continue/break on failed stolen node allocation (David)
      Set obj->gtt_space on failed node allocation (David)
      Only unref stolen (fix double free) on failed create_stolen (David)
      Free node, and NULL it in failed create_stolen (David)
      Add back accidentally removed newline (David)
      
      CC: <dri-devel@lists.freedesktop.org>
      Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Acked-by: default avatarDavid Airlie <airlied@linux.ie>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b3a070cc
  2. 05 Jul, 2013 4 commits
  3. 02 Jul, 2013 2 commits
  4. 01 Jul, 2013 26 commits