1. 15 2月, 2014 1 次提交
  2. 14 2月, 2014 1 次提交
    • D
      drm/i915: Consolidate binding parameters into flags · 1ec9e26d
      Daniel Vetter 提交于
      Anything more than just one bool parameter is just a pain to read,
      symbolic constants are much better.
      
      Split out from Chris' vma-binding rework patch.
      
      v2: Undo the behaviour change in object_pin that Chris spotted.
      
      v3: Split out misplaced hunk to handle set_cache_level errors,
      spotted by Jani.
      
      v4: Keep the current over-zealous binding logic in the execbuffer code
      working with a quick hack while the overall binding code gets shuffled
      around.
      
      v5: Reorder the PIN_ flags for more natural patch splitup.
      
      v6: Pull out the PIN_GLOBAL split-up again.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1ec9e26d
  3. 11 1月, 2014 1 次提交
  4. 18 12月, 2013 1 次提交
  5. 01 10月, 2013 1 次提交
  6. 17 9月, 2013 1 次提交
  7. 06 8月, 2013 1 次提交
    • B
      drm/i915: Add VM to pin · c37e2204
      Ben Widawsky 提交于
      To verbalize it, one can say, "pin an object into the given address
      space." The semantics of pinning remain the same otherwise.
      
      Certain objects will always have to be bound into the global GTT.
      Therefore, global GTT is a special case, and keep a special interface
      around for it (i915_gem_obj_ggtt_pin).
      
      v2: s/i915_gem_ggtt_pin/i915_gem_obj_ggtt_pin
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c37e2204
  8. 24 7月, 2013 1 次提交
  9. 13 7月, 2013 1 次提交
  10. 09 7月, 2013 1 次提交
    • B
      drm/i915: Getter/setter for object attributes · f343c5f6
      Ben Widawsky 提交于
      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: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f343c5f6
  11. 13 6月, 2013 1 次提交
  12. 23 5月, 2013 1 次提交
  13. 21 1月, 2013 1 次提交
    • D
      drm/i915: use drm_modeset_lock_all · a0e99e68
      Daniel Vetter 提交于
      Two exceptions:
      - debugfs files only read information which is not related to crtc, so
        can stay on the modeset_config lock.
      - Same holds for the edp vdd work in intel_dp.c. Add a corresponding
        WARN_ON and a comment next to the intel_dp struct fields for
        documentation.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a0e99e68
  14. 18 1月, 2013 1 次提交
    • B
      drm/i915: Create a gtt structure · 5d4545ae
      Ben Widawsky 提交于
      The purpose of the gtt structure is to help isolate our gtt specific
      properties from the rest of the code (in doing so it help us finish the
      isolation from the AGP connection).
      
      The following members are pulled out (and renamed):
      gtt_start
      gtt_total
      gtt_mappable_end
      gtt_mappable
      gtt_base_addr
      gsm
      
      The gtt structure will serve as a nice place to put gen specific gtt
      routines in upcoming patches. As far as what else I feel belongs in this
      structure: it is meant to encapsulate the GTT's physical properties.
      This is why I've not added fields which track various drm_mm properties,
      or things like gtt_mtrr (which is itself a pretty transient field).
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [Ben modified commit messages]
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5d4545ae
  15. 01 12月, 2012 1 次提交
  16. 23 10月, 2012 1 次提交
    • D
      drm/i915: fix overlay on i830M · a9193983
      Daniel Vetter 提交于
      The overlay on the i830M has a peculiar failure mode: It works the
      first time around after boot-up, but consistenly hangs the second time
      it's used.
      
      Chris Wilson has dug out a nice errata:
      
      "1.5.12 Clock Gating Disable for Display Register
      Address Offset:	06200h–06203h
      
      "Bit 3
      Ovrunit Clock Gating Disable.
      0 = Clock gating controlled by unit enabling logic
      1 = Disable clock gating function
      DevALM Errata ALM049: Overlay Clock Gating Must be Disabled:  Overlay
      & L2 Cache clock gating must be disabled in order to prevent device
      hangs when turning off overlay.SW must turn off Ovrunit clock gating
      (6200h) and L2 Cache clock gating (C8h)."
      
      Now I've nowhere found that 0xc8 register and hence couldn't apply the
      l2 cache workaround. But I've remembered that part of the magic that
      the OVERLAY_ON/OFF commands are supposed to do is to rearrange cache
      allocations so that the overlay scaler has some scratch space.
      
      And while pondering how that could explain the hang the 2nd time we
      enable the overlay, I've remembered that the old ums overlay code did
      _not_ issue the OVERLAY_OFF cmd.
      
      And indeed, disabling the OFF cmd results in the overlay working
      flawlessly, so I guess we can workaround the lack of the above
      workaround by simply never disabling the overlay engine once it's
      enabled.
      
      Note that we have the first part of the above w/a already implemented
      in i830_init_clock_gating - leave that as-is to avoid surprises.
      
      v2: Add a comment in the code.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47827
      Cc: stable@vger.kernel.org
      Tested-by: NRhys <rhyspuk@gmail.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a9193983
  17. 12 10月, 2012 1 次提交
    • C
      drm/i915: Disallow preallocation of requests · acb868d3
      Chris Wilson 提交于
      The intention was to allow the caller to avoid a failure to queue a
      request having already written commands to the ring. However, this is a
      moot point as the i915_add_request() can fail for other reasons than a
      mere allocation failure and those failure cases are more likely than
      ENOMEM. So the overlay code already had to handle i915_add_request()
      failures, and due to
      
      commit 3bb73aba
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jul 20 12:40:59 2012 +0100
      
          drm/i915: Allow late allocation of request for i915_add_request()
      
      the error handling code in intel_overlay.c was subject to causing
      double-frees, as found by coverity.
      
      Rather than further complicate i915_add_request() and callers, realise
      the battle is lost and adapt intel_overlay.c to take advantage of the
      late allocation of requests.
      
      v2: Handle callers passing in a NULL seqno.
      v3: Ditto. This time for sure.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      acb868d3
  18. 03 10月, 2012 2 次提交
  19. 24 8月, 2012 1 次提交
  20. 17 8月, 2012 1 次提交
  21. 25 5月, 2012 1 次提交
  22. 04 5月, 2012 1 次提交
    • D
      drm/i915: rip out unnecessary calls to drm_mode_set_crtcinfo · f7bacf19
      Daniel Vetter 提交于
      Our handling of the crtc timing computation has been nicely
      cargo-culted with calls to drm_mode_set_crtcinfo sprinkled all over
      the place. But with
      
      commit f9bef081
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun Apr 15 19:53:19 2012 +0200
      
          drm/i915: don't clobber the special upscaling lvds timings
      
      and
      
      commit ca9bfa7e
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Jan 28 14:49:20 2012 +0100
      
          drm/i915: fixup interlaced vertical timings confusion, part 1
      
      we now only set the crtc timing fields in the encoder->mode_fixup
      (lvds only) and in crtc->mode_fixup (for everyone else). And since
      
      commit 75c13993
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Jan 28 23:48:46 2012 +0100
      
          drm/i915: fixup overlay checks for interlaced modes
      
      the only places we actually need the crtc timings is in the mode_set
      function.
      
      I guess the idea of the drm core is that every time it creates a drm
      mode, it also sets the timings. But afaics it never uses them, safe
      for the precise vblank timestamp code (but that can only run on active
      modes, i.e.  after our mode_fixup functions have been called). The
      problem is that drm core always sets CRTC_INTERLACE_HALVE_V, so the
      timings are pretty much bogus for us anyway (at least with interlaced
      support).
      
      So I guess it's the drivers job that every active modes needs to have
      crtc timings that suits it, and with these patches we should have
      that. drm core doesn't seem to care about modes that just get passed
      around. Hence we can now safely rip out all the remaining calls to
      set_crtcinfo left in the driver and clean up this confusion.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f7bacf19
  23. 03 5月, 2012 4 次提交
  24. 16 2月, 2012 1 次提交
  25. 11 2月, 2012 2 次提交
    • D
      drm/i915: fixup overlay checks for interlaced modes · 75c13993
      Daniel Vetter 提交于
      The drm core _really_ likes to frob around with the crtc timings and
      put halfed vertical timings (in fields) in there. Which confuses the
      overlay code, resulting in it's refusal to display anything at the
      lower half of an interlaced pipe.
      Tested-by: NChristopher Egert <cme3000@gmail.com>
      Reviewed-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      75c13993
    • D
      drm/i915: fixup interlaced vertical timings confusion, part 1 · ca9bfa7e
      Daniel Vetter 提交于
      We have a pretty decent confusion about vertical timings of interlaced
      modes. Peter Ross has written a patch that makes interlace modes work
      on a lot more platforms/output combinations by doubling the vertical
      timings.
      
      The issue with that patch is that core drm _does_ support specifying
      whether we want these vertical timings in fields or frames, we just
      haven't managed to consistently use this facility. The relavant
      function is drm_mode_set_crtcinfo, which fills in the crtc timing
      information.
      
      The first thing to note is that the drm core keeps interlaced modes in
      frames, but displays modelines in fields. So when the crtc modeset
      helper copies over the mode into adjusted_mode it will already contain
      vertical timings in half-frames. The result is that the fixup code in
      intel_crtc_mode_fixup doesn't actually do anything (in most cases at
      least).
      
      Now gen3+ natively supports interlaced modes and wants the vertical
      timings in frames. Which is what sdvo already fixes up, at least under
      some conditions.
      
      There are a few other place that demand vertical timings in fields
      but never actually deal with interlaced modes, so use frame timings
      for consistency, too. These are:
      - lvds panel,
      - dvo encoders - dvo is the only way gen2 could support interlaced
        mode, but currently we don't support any encoders that do.
      - tv out - despite that the tv dac sends out an interlaced signal it
        expects a progressive mode pipe configuration.
      All these encoders enforce progressive modes by resetting
      interlace_allowed.
      
      Hence we always want crtc vertical timings in frames. Enforce this in
      our crtc mode_fixup function and rip out any redudant timing
      computations from the encoders' mode_fixup function.
      
      v2-4: Adjust the vertical timings a bit.
      
      v5: Split out the 'subtract-one for interlaced' fixes.
      
      v6: Clarify issues around tv-out and gen2.
      Reviewed-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NChristopher Egert <cme3000@gmail.com>
      Tested-by: NAlfonso Fiore <alfonso.fiore@gmail.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ca9bfa7e
  26. 26 1月, 2012 1 次提交
  27. 20 9月, 2011 1 次提交
  28. 30 6月, 2011 1 次提交
  29. 28 6月, 2011 2 次提交
  30. 10 6月, 2011 2 次提交
  31. 22 2月, 2011 2 次提交
    • C
      drm/i915: Use a device flag for non-interruptible phases · ce453d81
      Chris Wilson 提交于
      The code paths for modesetting are growing in complexity as we may need
      to move the buffers around in order to fit the scanout in the aperture.
      Therefore we face a choice as to whether to thread the interruptible status
      through the entire pinning and unbinding code paths or to add a flag to
      the device when we may not be interrupted by a signal. This does the
      latter and so fixes a few instances of modesetting failures under stress.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      ce453d81
    • 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
  32. 08 2月, 2011 1 次提交