1. 03 12月, 2014 4 次提交
  2. 02 12月, 2014 1 次提交
    • T
      drm/i915: Don't pin LRC in GGTT when dumping in debugfs · 064ca1d2
      Thomas Daniel 提交于
      LRC object does not need to be mapped into the GGTT when dumping. A side-effect
      of this patch is that a compiler warning goes away (not checking return value
      of i915_gem_obj_ggtt_pin).
      
      v2: Broke out individual context dumping into a new function as the indentation
      was getting a bit crazy.  Added notification of contexts with no gem object for
      debugging purposes.  Removed unnecessary pin_pages and unpin_pages, replaced
      with explicit get_pages for the context object as there may be no backing store
      allocated at this time (Comment for get_pages says "Ensure that the associated
      pages are gathered from the backing storage and pinned into our object").
      Improved error checking - get_pages and get_page are checked for failure.
      Signed-off-by: NThomas Daniel <thomas.daniel@intel.com>
      [danvet: Align paramter continuation lines properly. Also add some
      braces to the nested loops again for readability.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      064ca1d2
  3. 20 11月, 2014 3 次提交
    • V
      drm/i915: Read power well status before other registers for drpc info · 6b312cd3
      Ville Syrjälä 提交于
      Trying to read the status of the power wells right after taking forcewake
      for the other register reads makes little sense. Most of the time the
      power wells will still be up due to the recent forcewake. Instead do the
      power well status read first, and only then read the register needing
      forcewake. This way the reported power well status can actually reflect
      what's going on in the system.
      
      Cc: Deepak S <deepak.s@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDeepak S <deepak.s@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6b312cd3
    • D
      drm/i915: Pin tiled objects for L-shaped configs · 656bfa3a
      Daniel Vetter 提交于
      Let's just throw in the towel on this one and take the cheap way out.
      
      Based on a patch from Chris Wilson, but checking for a different bit.
      Chris' patch checked for even bank layout, this one here for a magic
      bit. Given the evidence we've gathered (not much) both work I think,
      but checking for the magic bit might be more accurate.
      
      Anyway, works on my gm45 here.
      
      For paranoi restrict to gen4 (and mobile), since we've only ever seen
      this on gm45 and i965gm.
      
      Also add some debugfs output so that we can skip the tiled swapping
      tests properly in these cases.
      
      v2: Clean up the quirk'ed pin count in free_object to avoid upsetting
      the WARN_ON. Spotted by Chris.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28813
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45092Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      656bfa3a
    • O
      drm/i915/bdw: Pin the context backing objects to GGTT on-demand · dcb4c12a
      Oscar Mateo 提交于
      Up until now, we have pinned every logical ring context backing object
      during creation, and left it pinned until destruction. This made my life
      easier, but it's a harmful thing to do, because we cause fragmentation
      of the GGTT (and, eventually, we would run out of space).
      
      This patch makes the pinning on-demand: the backing objects of the two
      contexts that are written to the ELSP are pinned right before submission
      and unpinned once the hardware is done with them. The only context that
      is still pinned regardless is the global default one, so that the HWS can
      still be accessed in the same way (ring->status_page).
      
      v2: In the early version of this patch, we were pinning the context as
      we put it into the ELSP: on the one hand, this is very efficient because
      only a maximum two contexts are pinned at any given time, but on the other
      hand, we cannot really pin in interrupt time :(
      
      v3: Use a mutex rather than atomic_t to protect pin count to avoid races.
      Do not unpin default context in free_request.
      
      v4: Break out pin and unpin into functions.  Fix style problems reported
      by checkpatch
      
      v5: Remove unpin_lock as all pinning and unpinning is done with the struct
      mutex already locked.  Add WARN_ONs to make sure this is the case in future.
      
      Issue: VIZ-4277
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NThomas Daniel <thomas.daniel@intel.com>
      Reviewed-by: NAkash Goel <akash.goels@gmail.com>
      Reviewed-by: Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dcb4c12a
  4. 08 11月, 2014 4 次提交
  5. 05 11月, 2014 1 次提交
    • P
      drm/i915: transform INTEL_OUTPUT_* into an enum · 6847d71b
      Paulo Zanoni 提交于
      Because I got annoyed that I had to document what values "int
      ddi_personality" is supposed to hold.
      
      A good side-effect of this change is that now the compilers can do
      some additional checks on our code, which may prevent some bugs in the
      future. A bad side-effect of this change is that now the compilers do
      some additional checks on our code and complain when a switch
      statement doesn't check for all possible values, so we need to add
      "default" cases to all those switches. Hopefully, this may help
      preventing confusions against DRM_MODE_CONNECTOR_* and
      DRM_MODE_ENCODER_*.
      
      I guess that just by looking at the patch, some people will think this
      change is not worth its benefits. In this case, I don't really mind
      dropping the patch.
      
      Also, there's probably still a few more places where we can
      s/int/enum intel_output_type/, but we can change that later, when we
      spot the places.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Resolve conflict due to reordered patches.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6847d71b
  6. 04 11月, 2014 1 次提交
  7. 24 10月, 2014 4 次提交
  8. 01 10月, 2014 1 次提交
  9. 24 9月, 2014 1 次提交
  10. 19 9月, 2014 2 次提交
  11. 05 9月, 2014 1 次提交
    • C
      drm/i915: Check for a stalled page flip after each vblank · d6bbafa1
      Chris Wilson 提交于
      Long ago, back in the racy haydays of 915gm interrupt handling, page
      flips would occasionally go astray and leave the hardware stuck, and the
      display not updating. This annoyed people who relied on their systems
      being able to display continuously updating information 24/7, and so
      some code to detect when the driver missed the page flip completion
      signal was added. Until recently, it was presumed that the interrupt
      handling was now flawless, but once again Simon Farnsworth has found a
      system whose display will stall. Reinstate the pageflip stall detection,
      which works by checking to see if the hardware has been updated to the
      new framebuffer address following each vblank. If the hardware is
      scanning out from the new framebuffer, but we still think the flip is
      pending, then we kick our driver into submision.
      
      This is a continuation of the effort started with
      commit 4e5359cd
      Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
      Date:   Wed Sep 1 17:47:52 2010 +0100
      
          drm/i915: Avoid pageflipping freeze when we miss the flip prepare interrupt
      
      This now includes a belt-and-braces approach to make sure the driver
      (or the hardware) doesn't miss an interrupt and cause us to stop
      updating the display should the unthinkable happen and the pageflip fail - i.e.
      that the user is able to continue submitting flips.
      
      v2: Cleanup, refactor, and rename
      v3: Only start counting vblanks after the flip command has been seen by
          the hardware.
      v4: Record the seqno after we touch the ring, or else there may be no
          seqno allocated yet.
      v5: Rebase on mmio-flip.
      v6: Rebase, rebase.
      Reported-by: NSimon Farnsworth <simon@farnz.org.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75502Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [v4]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d6bbafa1
  12. 04 9月, 2014 1 次提交
  13. 03 9月, 2014 8 次提交
  14. 20 8月, 2014 3 次提交
  15. 13 8月, 2014 2 次提交
    • D
      drm/i915: Only track real ppgtt for a context · ae6c4806
      Daniel Vetter 提交于
      There's a bit a confusion since we track the global gtt,
      the aliasing and real ppgtt in the ctx->vm pointer. And not
      all callers really bother to check for the different cases and just
      presume that it points to a real ppgtt.
      
      Now looking closely we don't actually need ->vm to always point at an
      address space - the only place that cares actually has fixup code
      already to decide whether to look at the per-proces or the global
      address space.
      
      So switch to just tracking the ppgtt directly and ditch all the
      extraneous code.
      
      v2: Fixup the ppgtt debugfs file to not oops on a NULL ctx->ppgtt.
      Also drop the early exit - without aliasing ppgtt we want to dump all
      the ppgtts of the contexts if we have full ppgtt.
      
      v3: Actually git add the compile fix.
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Cc: "Thierry, Michel" <michel.thierry@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      OTC-Jira: VIZ-3724
      [danvet: Resolve conflicts with execlist patches while applying.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ae6c4806
    • D
      drm/i915: Track file_priv, not ctx in the ppgtt structure · 4d884705
      Daniel Vetter 提交于
      Hardware contexts reference a ppgtt, not the other way round. And the
      only user of this (in debugfs) actually only cares about which file
      the ppgtt is associated with. So give it what it wants.
      
      While at it give the ppgtt create function a proper name&place.
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4d884705
  16. 09 8月, 2014 1 次提交
  17. 08 8月, 2014 2 次提交
    • D
      drm/i915: Introduce a for_each_intel_encoder() macro · b2784e15
      Damien Lespiau 提交于
      Following the established idom, let's provide a macro to iterate through
      the encoders.
      
      spatch helps, once more, for the substitution:
      
        @@
        iterator name list_for_each_entry;
        iterator name for_each_intel_encoder;
        struct intel_encoder * encoder;
        struct drm_device * dev;
        @@
        -list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) {
        +for_each_intel_encoder(dev, encoder) {
          ...
        }
      
      I also modified a few call sites by hand where a pointer to mode_config
      was directly used (to avoid overflowing 80 chars).
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Wrap paramters correctly in the macro and remove spurious
      space checkpatch noticed.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2784e15
    • R
      drm/i915: Introduce FBC False Color for debug purposes. · da46f936
      Rodrigo Vivi 提交于
      With this bit enabled, HW changes the color when compressing frames for
      debug purposes.
      
      ALthough the simple way to enable a single bit is over intel_reg_write,
      this value is overwriten on next update_fbc so depending on the workload
      it is not possible to set this bit with intel-gpu-tools. So this patch
      introduces a persistent way to enable false color over debugfs.
      
      v2: Use DEFINE_SIMPLE_ATTRIBUTE as Daniel suggested
      v3: (Ville) only do false color for IVB+ since according to spec bit is
          MBZ before IVB.
      v4: We don't have FBC on valleyview nor on cherryview (Ben)
      v5: s/!HAS_PCH_SPLIT/!HAS_FBC (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      da46f936